-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add new check: package-name should correspond uniquely to module-name #100
Comments
It's not unusual to have packages called "python-something" for python integration of libraries called "something" especially when somebody tried to implement "something" and abandoned it half-way. So disqualifying them isn't a good idea. But certainly warning against it makes sense. |
For packages that have been this way for a long time, changing them to be consistent would cause problems or unnecessary churn for users having to update their code or dependencies. The suggestion from a warning would make things worse for forks intended as drop-in replacements: they would no longer be drop-in replacements. |
Pillow is the only exception I've come across so far where that was intentionally violating this rule. Packages declare their dependencies via package-name, not by module-name. The Django-community has been diabolically promoting "django-foo" + "import foo" for many years. python-foo remains a very bad name for a python-package, |
Give my example above, I would indeed like to see corrections in new releases:
Semantic versioning can flag the backwards compatibility, and dependent code can use an import-alias:
better then maintaining private forks, no? flask-dotenv does correctly: |
I guess there are no Pypi-classifiers to indicate a package is a compatible drop-in replacement for another package? |
Hmm, none come to mind right now. Being a Pillow maintainer may skew my viewpoint though! Nope, no classifier for that, as far as I'm aware. |
When you publish a package on pypi, the package-name is unique across all packages.
Unfortunately some packages choose a very different name for their toplevel module.
They use a module-name that actually corresponds to a different package-name.
For example:
These package by themselves could score 10/10 in pyroma.
You can install them via their unique package-name:
But, they all use the same top-level module-name.
therefore one package is shadowing another,
making them unusable in the same project.
IMHO the package named
dotenv
should score 10/10 in pyroma,but the
django-dotenv
andpython-dotenv
should be disqualified with 0/10.So the modulename should be unique across all python-packages:
The text was updated successfully, but these errors were encountered: