-
Notifications
You must be signed in to change notification settings - Fork 983
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 a UI to check if a project name is allowed #11408
Comments
Thanks for the issue. I think this is a duplicate of #2082 but I'll let you decide. |
Reserving names would make this feature unnecessary, but I would find this useful while reserving names is not possible. I don't know what the likely timescale on a name reservation feature is, or whether this is simple enough to be worth considering as a short-term approach. One thing that is particularly annoying, though, is that it's currently not possible to be sure you're not going to trigger the "too similar to another package" check. Is the algorithm used to check similarity documented anywhere? If it is, then it would be possible to write a tool that did the check independently, and that would solve the short term problem without a warehouse change. |
The name collision algorithm is currently a Postgres function that is run as a step of a package upload. |
OK. If I were to lift that and make a Python package that checked if a name was allowed, what's the chances you'd change the rules and my code would need modifying? (To be clear, I don't care much for personal use, but if I publish it, I don't want to make claims of accuracy that I can't maintain). |
I'm not sure it really would make sense to externalize? To use a recent example, if you wanted to (externally) determine why To answer your question though: this is something that we're probably going to want to continue to tweak, and I wouldn't consider it set in stone. So there's a good chance it an external version wouldn't remain accurate in the future. |
OK, so a personal script that takes the simple index, ultranormalizes everything, and to check a name ultranormalizes it and reports "OK" or "Clashes with [list of stuff that normalizes the same]" seems like the best idea for now. If others want to do something similar, they can find this issue and either upvote it if they want something "official", or make their own script along the lines I described here. That sounds reasonable to me. Feel free to close this issue if you want. Thanks for the help. |
What's the problem this feature will solve?
At the moment, the only way to register a project is to upload it. That's fine, but you need to choose a project name, and there is no way to know in advance if PyPI will reject that project name when you upload it.
Describe the solution you'd like
A UI and/or API that allows users to enter a project name and get a response saying whether it will be allowed, or if not, why not (the same sort of output as you get when trying to upload a new project).
Additional context
See https://discuss.python.org/t/how-can-i-request-a-package-to-be-added/15834 for a case where this occurred.
It is, of course, possible to create and upload an empty package, just to reserve the name. But do we really want to encourage people to upload junk packages? It's too easy (at least, it is if you're me!) to start a project, and get distracted and never actually get it to a releasable state.
One downside is that just because a name was allowable one day, doesn't mean it will still be allowable a week later when the project is ready for upload. We could implement some sort of "reservation" of names for a short period, but I believe this is overkill, and the simpler approach of just allowing people to check (maybe giving a warning saying that the check doesn't guarantee that the name will remain available) is perfectly adequate for the majority of cases.
The text was updated successfully, but these errors were encountered: