-
Notifications
You must be signed in to change notification settings - Fork 92
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
Normalize package names with lowercase #460
Merged
nitzmahone
merged 1 commit into
ansible:devel
from
dsavineau:case_sensitive_double_requirement
Apr 25, 2023
Merged
Normalize package names with lowercase #460
nitzmahone
merged 1 commit into
ansible:devel
from
dsavineau:case_sensitive_double_requirement
Apr 25, 2023
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
nitzmahone
requested changes
Mar 29, 2023
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.
dsavineau
force-pushed
the
case_sensitive_double_requirement
branch
from
March 29, 2023 19:24
c6262ae
to
4d20d31
Compare
When a python package is listed multiple time but with uppercase/lowercase changes then introspect sanitization won't handle it. In db9e74a, only the underscore/dash scenario has been solved. As a result, the assemble script will fail with a double requirement error. ERROR: Double requirement given: Jinja2==3.0.3 (from -r /tmp/src/requirements.txt (line 40)) (already in jinja2>=2.8 (from -r /tmp/src/requirements.txt (line 12)), name='Jinja2') While this isn't an issue for recent pip version, older versions with python 3.8 and 3.9 runtimes on RHEL 8 based distributions are affected by this. This replaces the setuptools runtime usage by importlib.metadata which provides builtin method to normalize package names. Unlike pkg_resources.safe_name, the dash character is changed to underscore. Closes: ansible#408 https://packaging.python.org/en/latest/specifications/name-normalization Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
dsavineau
force-pushed
the
case_sensitive_double_requirement
branch
from
April 6, 2023 20:30
4d20d31
to
82285ac
Compare
Akasurde
requested changes
Apr 7, 2023
nitzmahone
approved these changes
Apr 25, 2023
Akasurde
approved these changes
Apr 25, 2023
@nitzmahone @Akasurde Do you agree to backport this to 3.0 and 1.2 branches so current AAP 2.3 release and next AAP 2.4 will be fixed ? |
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.
When a python package is listed multiple time but with uppercase/lowercase changes then introspect sanitization won't handle it. In db9e74a, only the underscore/dash scenario has been solved. As a result, the assemble script will fail with a double requirement error.
ERROR: Double requirement given: Jinja2==3.0.3 (from -r /tmp/src/requirements.txt (line 40)) (already in jinja2>=2.8 (from -r /tmp/src/requirements.txt (line 12)), name='Jinja2')
While this isn't an issue for recent pip version, older versions with python 3.8 and 3.9 runtimes on RHEL 8 based distributions are affected by this.
This replaces the setuptools runtime usage by importlib.metadata which provides builtin method to normalize package names.
Unlike pkg_resources.safe_name, the dash character is changed to underscore.
Closes: #408
https://packaging.python.org/en/latest/specifications/name-normalization