-
Notifications
You must be signed in to change notification settings - Fork 251
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
Work around platform.python_version() returning non PEP 440 compliant version for non-tagged CPython builds #802
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
1 task
sbidoul
force-pushed
the
python_full_version-plus
branch
from
May 19, 2024 10:24
bf268e7
to
582ca41
Compare
sbidoul
force-pushed
the
python_full_version-plus
branch
from
May 19, 2024 10:25
582ca41
to
178ea2f
Compare
pradyunsg
approved these changes
May 19, 2024
pradyunsg
changed the title
Work around platform.python_version() returning non PEP 440 compliant version for non-tagged Python builds
Work around platform.python_version() returning non PEP 440 compliant version for non-tagged CPython builds
May 20, 2024
Closed
kodiakhq bot
referenced
this pull request
in cloudquery/plugin-sdk-python
Jul 1, 2024
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [packaging](https://github.com/pypa/packaging) | minor | `==24.0` -> `==24.1` | --- ### Release Notes <details> <summary>pypa/packaging (packaging)</summary> ### [`v24.1`](https://github.com/pypa/packaging/releases/tag/24.1) [Compare Source](https://github.com/pypa/packaging/compare/24.0...24.1) #### What's Changed - pyupgrade/black/isort/flake8 → ruff by [@​DimitriPapadopoulos](https://github.com/DimitriPapadopoulos) in [https://github.com/pypa/packaging/pull/769](https://github.com/pypa/packaging/pull/769) - Add support for Python 3.13 and drop EOL 3.7 by [@​hugovk](https://github.com/hugovk) in [https://github.com/pypa/packaging/pull/783](https://github.com/pypa/packaging/pull/783) - Bump the github-actions group with 4 updates by [@​dependabot](https://github.com/dependabot) in [https://github.com/pypa/packaging/pull/782](https://github.com/pypa/packaging/pull/782) - Fix typo in `_parser` docstring by [@​pradyunsg](https://github.com/pradyunsg) in [https://github.com/pypa/packaging/pull/784](https://github.com/pypa/packaging/pull/784) - Modernise type annotations using FA rules from ruff by [@​pradyunsg](https://github.com/pradyunsg) in [https://github.com/pypa/packaging/pull/785](https://github.com/pypa/packaging/pull/785) - Document `markers.default_environment()` by [@​edgarrmondragon](https://github.com/edgarrmondragon) in [https://github.com/pypa/packaging/pull/753](https://github.com/pypa/packaging/pull/753) - Bump the github-actions group with 3 updates by [@​dependabot](https://github.com/dependabot) in [https://github.com/pypa/packaging/pull/789](https://github.com/pypa/packaging/pull/789) - Work around platform.python_version() returning non PEP 440 compliant version for non-tagged CPython builds by [@​sbidoul](https://github.com/sbidoul) in [https://github.com/pypa/packaging/pull/802](https://github.com/pypa/packaging/pull/802) #### New Contributors - [@​dependabot](https://github.com/dependabot) made their first contribution in [https://github.com/pypa/packaging/pull/782](https://github.com/pypa/packaging/pull/782) - [@​edgarrmondragon](https://github.com/edgarrmondragon) made their first contribution in [https://github.com/pypa/packaging/pull/753](https://github.com/pypa/packaging/pull/753) **Full Changelog**: pypa/packaging@24.0...24.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuMyIsInVwZGF0ZWRJblZlciI6IjM3LjQyMS4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
jaraco
reviewed
Aug 16, 2024
Comment on lines
+313
to
+315
# compliant for non-tagged Python builds. We preserve default_environment()'s | ||
# behavior of returning platform.python_version() verbatim, and leave it to the | ||
# caller to provide a syntactically valid version if they want to override it. |
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.
What was the motivation for preserving the non-compliant version number and expecting the caller to do this same logic? That leads to other callers like pipx encountering the same bug. Is the expectation that all downstream users should have to provide their own fix?
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.
Fixes #678
Since #678 will make things difficult for pip 24.1 users using non-tagged python builds, I'm proposing this solution.
We could also work around it in pip but this would be messier and would not solve the problem for
packaging
users.CPython could also be changed, but it is likely more complex to achieve and probably not doable for older CPython versions.