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

Add requirement for requests to setup.py #969

Merged

Conversation

white-gecko
Copy link
Member

The requests package is required by the sparql plugin at several places.

The current issue is reproducible with:

In a new virtualenv

$ pip install git+https://github.com/RDFLib/rdflib@master
$ python3
>>> import rdflib
>>> graph = rdflib.Graph()
>>> graph.query("select * {?s ?p ?o}")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/natanael/.virtualenvs/rdflib-try/lib/python3.7/site-packages/rdflib/graph.py", line 1073, in query
    result = plugin.get(result, query.Result)
  File "/home/natanael/.virtualenvs/rdflib-try/lib/python3.7/site-packages/rdflib/plugin.py", line 107, in get
    return p.getClass()
  File "/home/me/.virtualenvs/rdflib-try/lib/python3.7/site-packages/rdflib/plugin.py", line 69, in getClass
    module = __import__(self.module_path, globals(), locals(), [""])
  File "/home/me/.virtualenvs/rdflib-try/lib/python3.7/site-packages/rdflib/plugins/sparql/__init__.py", line 37, in <module>
    from .processor import prepareQuery, processUpdate
  File "/home/me/.virtualenvs/rdflib-try/lib/python3.7/site-packages/rdflib/plugins/sparql/processor.py", line 18, in <module>
    from rdflib.plugins.sparql.evaluate import evalQuery
  File "/home/me/.virtualenvs/rdflib-try/lib/python3.7/site-packages/rdflib/plugins/sparql/evaluate.py", line 20, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'
>>>

The requests package is required by the sparql plugin at several places.
@coveralls
Copy link

coveralls commented Mar 14, 2020

Coverage Status

Coverage remained the same at 75.758% when pulling 6ca6210 on white-gecko:feature/addRequirementForRequests into 0e5efef on RDFLib:master.

@tgbugs
Copy link
Contributor

tgbugs commented Mar 14, 2020

This should be in extras because the plugin is not required for core.

@white-gecko white-gecko merged commit cbe9c9d into RDFLib:master Mar 16, 2020
@white-gecko white-gecko deleted the feature/addRequirementForRequests branch March 16, 2020 09:10
@white-gecko white-gecko added this to the rdflib 5.0.0 milestone Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants