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

Use pypa/packaging. #831

Merged
merged 2 commits into from
Dec 27, 2019
Merged

Use pypa/packaging. #831

merged 2 commits into from
Dec 27, 2019

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Dec 26, 2019

Vendoring pypa/packaging allows us to eliminate our copies of
pep425tags.py and glibc.py from pip as well as eliminate custom
environment marker setup code. We accomplish the latter by re-working
the responsibility split between PythonIdentity and Platform.

Platform now just handles parsing extended platform specifiers and
all capability testing is moved into PythonIdentity which consults
packaging at runtime to determine the compatible tag set and
appropriate environment markers.

Work towards #823
Fixes #696

@jsirois
Copy link
Member Author

jsirois commented Dec 26, 2019

Reviewers, note that 64c0ad8 is the vendoring commit. The only manual edits there are two small ones to pex/vendor/__{init,main}__.py.

pex/environment.py Show resolved Hide resolved
pex/interpreter.py Show resolved Hide resolved
Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to see so much custom code be removed! Thanks!

pex/environment.py Show resolved Hide resolved
Vendoring pypa/packaging allows us to eliminate our copies of
`pep425tags.py` and `glibc.py` from pip as well as eliminate custom
environment marker setup code. We accomplish the latter by re-working
the responsibility split between `PythonIdentity` and `Platform`.

`Platform` now just handles parsing extended platform specifiers and
all capability testing is moved into `PythonIdentity` which consults
`packaging` at runtime to determine the compatible tag set and
appropriate environment markers.

Work towards pex-tool#823
Fixes pex-tool#696
@jsirois jsirois merged commit 2a8b950 into pex-tool:master Dec 27, 2019
@jsirois jsirois deleted the pep425tags/kill branch December 27, 2019 19:24
jsirois added a commit to jsirois/pex that referenced this pull request Dec 28, 2019
Eliminate encode_identity by inlining where its used. This keeps the
symmetry of encode/decode local within a few lines of each other in the
same function.
@jsirois jsirois mentioned this pull request Dec 28, 2019
11 tasks
jsirois added a commit to jsirois/pex that referenced this pull request Jan 23, 2020
The last use was deleted in pex-tool#831 and not removing the file then was an
oversight.
jsirois added a commit that referenced this pull request Jan 24, 2020
The last use was deleted in #831 and not removing the file then was an
oversight.
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.

Eliminate copies of glibc.py and pep425tags.py
3 participants