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

Drop keepalive from requirements.txt (Closes: #846871) #79

Merged
merged 1 commit into from
Dec 6, 2016
Merged

Drop keepalive from requirements.txt (Closes: #846871) #79

merged 1 commit into from
Dec 6, 2016

Conversation

chrysn
Copy link
Contributor

@chrysn chrysn commented Dec 5, 2016

As keepalive support is a weak dependency (absence makes keepalive enabling only raise a warning and otherwise a no-op), listing it as a dependency causes trouble with test setups. Demoting it to an extra (feature) dependency.


The hard dependency statement has caused trouble with test setups where the contentually unnecessary keepalive package caused a dependency failure. Please consider classifying keepalive as a feature dependency as above or similar.

As keepalive support is a weak dependency (absence makes keepalive
enabling only raise a warning and otherwise a no-op), listing it as a
dependency causes trouble with test setups. Demoting it to an extra
(feature) dependency.
@joernhees
Copy link
Member

history: #70 ... keepalive is used in rdflib's SPARQLStore... https://github.com/RDFLib/rdflib/blob/master/rdflib/plugins/stores/sparqlstore.py#L248

i'm not sure if dropping this is wise, but i can see how debian doesn't want to make an own package for it... @wikier maybe we should either internalize keepalive to SPARQLWrapper or just use some lib like requests / urllib3?

@chrysn
Copy link
Contributor Author

chrysn commented Dec 6, 2016

@joernhees, is that actually the right history / context? i was rather thinking of the "optional dependencies" comment in #37 as context.

this is not about the keepalive functionality (with it absent, tests run through still), but solely about whether it is declared in setup.py as an installation requirement or an extra requirement. afaict, the only ill-effect this can have is that if an application previously required "sparqlwrapper" and expects keepalive functionality to actually work, they will now need to require "sparqlwrapper[keepalive]". (and thus, things that don't need keepalive can have their setup.py dependencies satisfied even in absence of the keepalive package).

as far as debian packaging is concerned, there is no keepalive package right now, but even if there were, unless sparqlwrapper declares it actually depends on keepalive for its operation, it wouldn't be installed in the abovementioned situation.

in other words: there is a mismatch between how setup.py declares the dependencies ("keepalive is required"), and how debian declares it ("keepalive is recommended"). we (debian packagers) could do the "easy" thing and follow setup.py's declaration by sparqlwrapper declare a hard dependency on keepalive, but my opinion is that it wouldn't reflect the actual dependency, and thus setup.py's "install_requires" doesn't either.

using requests / urllib3 would probably solve this issue too (but seems to have been on the roadmap for some time). internalization would not be helpful from the packaging point of view. current status in packaging is that i'm applying the pullrequested patch in debian, taking the risk that programs rely on sparqlwrapper to pull in keepalive implicitly but actually getting no-op there.

@wikier
Copy link
Member

wikier commented Dec 6, 2016

Here my two cents to the discussion from the point of view of SPARQLWrapper:

  • We aim to put order on this (probably switching to requests) for 2.x.
  • In the meantime keepalive is used in other projects, therefore I don; t want to internalize it.
  • But I agree with @chrysn that the dependency should be moved as option (using extras_require I think).

@wikier wikier added this to the 1.8.0 milestone Dec 6, 2016
@wikier wikier self-assigned this Dec 6, 2016
@wikier wikier merged commit d2d099b into RDFLib:master Dec 6, 2016
@chrysn chrysn deleted the make-keepalive-extra branch December 7, 2016 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants