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

fix: Adhere to case-insensivity in 'matched_by_list' #147

Merged
merged 1 commit into from Sep 9, 2020

Conversation

patrick-ringl-by
Copy link
Contributor

This will lead to e.g. blacklisting 'cython' and 'Cython' being the same thing.

This will lead to e.g. blacklisting 'cython' and 'Cython' being the same thing.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.444% when pulling 54c7af7 on adhere_to_case_insensivity into ac1683b on master.

@patrick-ringl-by patrick-ringl-by marked this pull request as ready for review September 9, 2020 08:52
@@ -61,7 +61,7 @@ def matched_by_list(package, version, requirements):
version = pkg_resources.safe_version('{}'.format(version))
package = pkg_resources.safe_name(package)
matches = (
package == requirement.project_name and version in requirement
package.lower() == requirement.key and version in requirement
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just wondering. Will key always be in lower case or should that also be explicitly lower-cased?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to https://setuptools.readthedocs.io/en/latest/pkg_resources.html:

key
dist.key is short for dist.project_name.lower(). It’s used for case-insensitive comparison and indexing of distributions by project name.

@stephan-erb-by
Copy link

LGTM. I cannot (easily) approve button though - my new Github BY account is not a contributor yet :)

@matthias-bach-by matthias-bach-by merged commit 6a7b76d into master Sep 9, 2020
@matthias-bach-by
Copy link
Collaborator

@patrick-ringl-by : Do you feel comfortable packaging up a release or should I try to squeeze this in some time today? Required for release would be:

  • Update change log
  • Tag commit so that new release is packaged and uploaded.

@matthias-bach-by matthias-bach-by deleted the adhere_to_case_insensivity branch September 9, 2020 09:13
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.

None yet

4 participants