Skip to content

Graph.update with SPARQLStore should return Exception #1032

@white-gecko

Description

@white-gecko

When I instantiate a Graph with the SPARQLStore and call query() on it I get:

TypeError: update() takes from 2 to 3 positional arguments but 5 were given

while I would expect an Exception.

Reproduce it with:

from rdflib import Graph
graph = Graph(store="SPARQLStore")
graph.update("insert data {graph <urn:ex> {<urn:s> <urn:p> <urn:o>}}")

This is caused by the fact, that the SPARQLStore inherits from SPARQLConnector:

class SPARQLStore(SPARQLConnector, Store):

Two issues:

  • Why does SPARQLStore inherit from SPARQLConnector?
  • The SPARQLStore should define update and return en Exception.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions