Skip to content

rdflib 4.2.2: ConjunctiveGraph.parse() return a Graph object #939

@flacout

Description

@flacout

The parse function of ConjunctiveGraph modify in place the ConjunctiveGraph but return a Graph object. This is a minor issue but it can create issues down the road if the parse methode is called like so g = g.parse(source="test.ttl", format='turtle')

Demonstration:

from rdflib import Graph, ConjunctiveGraph

g = ConjunctiveGraph()
g.parse(source="test.ttl", format='turtle')
print(type(g)) # <class 'rdflib.graph.ConjunctiveGraph'>

g = ConjunctiveGraph()
g = g.parse(source="test.ttl", format='turtle')
print(type(g)) # <class 'rdflib.graph.Graph'>

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeThis involves or proposes breaking RDFLib's public API.good first issueGood for newcomersid-as-cntxttracking related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions