\n added to query in sparqlstore.py · Issue #521 · RDFLib/rdflib (original) (raw)

These lines cause a spurious '\n' to be inserted in the query string:

https://github.com/RDFLib/rdflib/blob/master/rdflib/plugins/stores/sparqlstore.py#L77-L81

Example:

from rdflib.plugins.stores import sparqlstore

store = sparqlstore.SPARQLStore()
query = "SELECT DISTINCT * WHERE {?s ?p ?o} LIMIT 10"

store.setQuery(query)
print repr(store.queryString)

This prints '\nSELECT DISTINCT * WHERE {?s ?p ?o} LIMIT 10'