-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
Fix universal lock handling of the none
ABI.
#2270
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The `none` ABI indicates no native ABI attachment; and so just the standard guarantees of pure Python. In general this means no breaks within a major version (just fixes and additions). Although it's known CPython does deal breaks within a major version span (some deprecated items are removed), the de-facto standard presented by PyPA's packaging library indicate the `none` ABI is backwards compatible for all minor versions in the major version range (much like the `abi3` ABI for Python 3). As such, fix universal lock handling to accept a `*<major>*-none-*.whl` for all minor versions of Python `<major>`. Fixes pex-tool#2268
jsirois
commented
Nov 2, 2023
"2", | ||
"--pex-root", | ||
pex_root, | ||
).assert_success() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prior to the fix above, this test fails as expected (in the same way the real case failed for @eginez, the issue reporter:
$ ./dtox.sh -epy311-integration -- --devpi -vvsk test_issue_2268 -n2
...
=================================== FAILURES ===================================
__________________ test_abi_none_locking[pip-legacy-resolver] __________________
[gw0] linux -- Python 3.11.6 /development/pex/.tox/py311-integration/bin/python
...
E AssertionError: integration test failed: return_code=1, output=, error=pid 877 -> /tmp/pytest-of-jsirois/pytest-13/popen-gw0/test_abi_none_locking_pip_lega0/pex_root/venvs/f646e8ec93937037a1a0dd448a5db57db632bd73/a21ef60f2b1adcb6fb7c6a50aa0e7e07a678e7bc/bin/python -sE /tmp/pytest-of-jsirois/pytest-13/popen-gw0/test_abi_none_locking_pip_lega0/pex_root/venvs/f646e8ec93937037a1a0dd448a5db57db632bd73/a21ef60f2b1adcb6fb7c6a50aa0e7e07a678e7bc/pex --disable-pip-version-check --no-python-version-warning --exists-action a --no-input --use-deprecated legacy-resolver -q --cache-dir /tmp/pytest-of-jsirois/pytest-13/popen-gw0/test_abi_none_locking_pip_lega0/pex_root/pip/20.3.4-patched/pip_cache --log /tmp/pex-pip-log.cc9l_rd5/pip.log download --dest /tmp/tmpn098tmyx/development.pex..tox.py311-integration.bin.python python-forge==18.6.0 --retries 5 --timeout 15 exited with 1 and STDERR:
E ERROR: Could not find a version that satisfies the requirement python-forge==18.6.0 (from versions: none)
E ERROR: No matching distribution found for python-forge==18.6.0
testing/__init__.py:374: AssertionError
___________________ test_abi_none_locking[pip-2020-resolver] ___________________
[gw1] linux -- Python 3.11.6 /development/pex/.tox/py311-integration/bin/python
...
E AssertionError: integration test failed: return_code=1, output=, error=pid 878 -> /tmp/pytest-of-jsirois/pytest-13/popen-gw1/test_abi_none_locking_pip_20200/pex_root/venvs/f646e8ec93937037a1a0dd448a5db57db632bd73/a21ef60f2b1adcb6fb7c6a50aa0e7e07a678e7bc/bin/python -sE /tmp/pytest-of-jsirois/pytest-13/popen-gw1/test_abi_none_locking_pip_20200/pex_root/venvs/f646e8ec93937037a1a0dd448a5db57db632bd73/a21ef60f2b1adcb6fb7c6a50aa0e7e07a678e7bc/pex --disable-pip-version-check --no-python-version-warning --exists-action a --no-input -q --cache-dir /tmp/pytest-of-jsirois/pytest-13/popen-gw1/test_abi_none_locking_pip_20200/pex_root/pip/20.3.4-patched/pip_cache --log /tmp/pex-pip-log.xdty2u9h/pip.log download --dest /tmp/tmpaoej4mji/development.pex..tox.py311-integration.bin.python python-forge==18.6.0 --retries 5 --timeout 15 exited with 1 and STDERR:
E ERROR: Could not find a version that satisfies the requirement python-forge==18.6.0
E ERROR: No matching distribution found for python-forge==18.6.0
testing/__init__.py:374: AssertionError
=========================== short test summary info ============================
FAILED tests/integration/cli/commands/test_issue_2268.py::test_abi_none_locking[pip-legacy-resolver] - AssertionError: integration test failed: return_code=1, output=, error=pid ...
FAILED tests/integration/cli/commands/test_issue_2268.py::test_abi_none_locking[pip-2020-resolver] - AssertionError: integration test failed: return_code=1, output=, error=pid ...
============================== 2 failed in 4.64s ===============================
kaos
approved these changes
Nov 2, 2023
Eensure it can retrieve the ambient Pip version if needed on its own.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
none
ABI indicates no native ABI attachment; and so just thestandard guarantees of pure Python. In general this means no breaks
within a major version (just fixes and additions). Although it's known
CPython does deal breaks within a major version span (some deprecated
items are removed), the de-facto standard presented by PyPA's packaging
library indicate the
none
ABI is compatible for all minor versions inthe major version range (much like the
abi3
ABI for Python 3). Assuch, fix universal lock handling to accept a
*<major>*-none-*.whl
forall minor versions of Python
<major>
.Fixes #2268