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

Include new package name mistake suggestions #9034

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

Conversation

nathanjmcdougall
Copy link
Contributor

Summary

This list of known discrepancies between package vs. import package name is missing a few very popular packages:

  • PIL
  • GitPython
  • PyYAML

I have added these and a number of others I am aware of. These projects are of varying popularity, so I would understand if you don't want to include all of these, lest it gets out of control. These are just some suggestions to start a conversation.

Test Plan

No tests, since this is just adding to a JSON file. The list should be manually reviewed.

These projects are of varying popularity, so I would understand if you don't want to include all of these, lest it gets out of control. These are just some suggestions to start a conversation.

From my perspective, the most important to include, I think are:

- PIL
- GitPython
- PyYAML
["cv2", "opencv-python"],
["docx", "python-docx"],
["dotenv", "python-dotenv"],
["fitz", "pymupdf"],
Copy link
Member

Choose a reason for hiding this comment

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

What's this one?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@nathanjmcdougall nathanjmcdougall Nov 12, 2024

Choose a reason for hiding this comment

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

See here

This is an older thing that was changed at some point - in the past the import name fitz was the only one exposed by pymupdf, now it looks like they have moved away from that except as a fallback.

@charliermarsh
Copy link
Member

Thank you! As-is, I think these are only shown when a build failures, and not when a resolution fails. So we might need to change that for this to take effect.

@nathanjmcdougall
Copy link
Contributor Author

nathanjmcdougall commented Nov 12, 2024

Good point. There are a variety of ways things could go wrong:

  • Mistake name doesn't exist on PyPI at all (e.g. git, arcpy)
  • Mistake name does exist on PyPI but doesn't have a >0.0 release (e.g. absl)
  • Mistake name does exist on PyPI and will build but it is a dummy package designed to avoid typosquatting (e.g. bs4)
  • Mistake name does exist but release is so old that it will almost always fail (e.g. pil)

The last case should probably be the focus of this PR for now.

There's also the case of two, well used and maintained packages competing over the same import name, but I don't think we could do anything about that.

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.

3 participants