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

SPARQLStore does not transform Literal('') into Literal('None') anymore, fixes #457 #459

Merged
merged 4 commits into from
Feb 25, 2015

Conversation

joernhees
Copy link
Member

fixes #457

@joernhees
Copy link
Member Author

hrmm, seems as if the introduced test fails on py3

@ghost
Copy link

ghost commented Feb 25, 2015

Can't recall the origin of the code offhand but that False was in the original commit.

The fragment is obsolete and can be deleted to leave just:

if 'datatype' in node.attrib:
    dT = URIRef(node.attrib['datatype'])
    return Literal(value, datatype=dT)

A fix for the test:

from rdflib.py3compat import b
s = b("""<ns0:literal xmlns:ns0="http://www.w3.org/2005/sparql-results#" />""")

I'll leave it up to you to decide whether to update the PR or make a separate commit.

Cheers

Graham

@joernhees
Copy link
Member Author

thanks for the feedback. had to leave yesterday, i'll just update the PR.

joernhees added a commit that referenced this pull request Feb 25, 2015
SPARQLStore does not transform Literal('') into Literal('None') anymore, fixes #457
@joernhees joernhees merged commit 1a25c0c into RDFLib:master Feb 25, 2015
@joernhees joernhees deleted the sparql_store_empty_literals branch February 25, 2015 13:02
@joernhees joernhees added store Related to a store. SPARQL labels Feb 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SPARQL store Related to a store.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad SPARQLStore handling of empty literals
1 participant