Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
flacout opened this issue Oct 14, 2019 · 0 comments · May be fixed by #2563
Open

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

flacout opened this issue Oct 14, 2019 · 0 comments · May be fixed by #2563
Labels
breaking change This involves or proposes breaking RDFLib's public API. good first issue Good for newcomers id-as-cntxt tracking related issues

Comments

@flacout
Copy link

flacout commented Oct 14, 2019

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'>
JervenBolleman added a commit to JervenBolleman/rdflib that referenced this issue Dec 18, 2019
@ghost ghost mentioned this issue Dec 14, 2021
@ghost ghost added the id-as-cntxt tracking related issues label Dec 24, 2021
@aucampia aucampia added good first issue Good for newcomers breaking change This involves or proposes breaking RDFLib's public API. labels May 22, 2023
mielvds added a commit to mielvds/rdflib that referenced this issue Aug 31, 2023
@mielvds mielvds linked a pull request Aug 31, 2023 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This involves or proposes breaking RDFLib's public API. good first issue Good for newcomers id-as-cntxt tracking related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants