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

Comments

Projects
None yet
3 participants
@gsnedders
Contributor

gsnedders commented Apr 24, 2016

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

This comment has been minimized.

Show comment
Hide comment
@xavfernandez

xavfernandez Apr 24, 2016

Contributor

Where is pip using distlib's markers ?

Contributor

xavfernandez commented Apr 24, 2016

Where is pip using distlib's markers ?

@gsnedders

This comment has been minimized.

Show comment
Hide comment
@gsnedders

gsnedders Apr 24, 2016

Contributor

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

Contributor

gsnedders commented Apr 24, 2016

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

@sergray

This comment has been minimized.

Show comment
Hide comment
@sergray

sergray 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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment