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

[master] change regex for pkg name match #66880

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

avelin
Copy link

@avelin avelin commented Sep 11, 2024

What does this PR do?

Change the regex to accept underscore as an acceptable symbol in package name.

What issues does this PR fix or reference?

According to python normalization rules the underscore (_) is allowed symbol in package name. Note the examples there allow for underscore.

Previous Behavior

When trying to install package with underscore in the name with pip.installed, although the installation is successful, there's a problem with confirming if the package is installed (and always will trigger changes). It doesn't matter if you refer in pip.installed to the package with original name (with underscore) or with "normalized" name (with dash), always you have one of the following:

  • Comment: There was no error installing package 'requests_ntlm' although it does not show when calling 'pip.freeze'.
  • Comment: There was no error installing package 'requests-ntlm' although it does not show when calling 'pip.freeze'.

Note, the JSON output is with original name:

{"name": "requests_ntlm", "version": "1.3.0"}

@avelin avelin requested a review from a team as a code owner September 11, 2024 13:57
Copy link

welcome bot commented Sep 11, 2024

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title change regex for pkg name match [master] change regex for pkg name match Sep 11, 2024
Copy link
Contributor

@twangboy twangboy left a comment

Choose a reason for hiding this comment

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

Please create a changelog and a simple test. This could also probably go on the 3006.x branch

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.

2 participants