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

pip has multiple environment marker parsers #3624

Closed
gsnedders opened this issue Apr 24, 2016 · 3 comments
Closed

pip has multiple environment marker parsers #3624

gsnedders opened this issue Apr 24, 2016 · 3 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@gsnedders
Copy link
Contributor

The various projects pip vendors in leads it to have three environment marker parsers:

  • pip/_vendor/pkg_resources/__init__.py (line 1583/4 for the exposed API)
  • pip/_vendor/packaging/markers.py
  • pip/_vendor/distlib/markers.py

pip uses the pkg_resources and distlib ones, as far as I can tell. Unfortunately, packaging is the one I believe we want to be using (it's compatible with PEP 345, PEP 508, and other relevant PEPs, as well as being backwards compatible with both pkg_resources and distilb with the sole exception of distilb's undocumented platform_in_venv marker, which I can find no evidence of anyone using anywhere).

More recent releases of setuptools have pkg_resources just call packaging, which deals with that duplication (and hence we should solve that by merely upgrading our version of pkg_resources).

When it comes to distilb, we should move all our code that uses that to one of the other ones so then we're using a single implementation in all PyPA stuff, and then we have consistency and interoperability.

@xavfernandez
Copy link
Member

Where is pip using distlib's markers ?

@gsnedders
Copy link
Contributor Author

@xavfernandez in pip.req.req_install.InstallRequirement.match_markers

@sergray
Copy link

sergray commented Jul 29, 2016

@dstufft @gsnedders could you please take a look at #3781? it seems to be a regression preventing installation of some published packages using 8.1.2

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

3 participants