Skip to content

PyPI does not always give a specific reason for why a name is not allowed #11872

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

Closed
seanthegeek opened this issue Jul 18, 2022 · 5 comments
Closed
Labels
APIs/feeds UX/UI design, user experience, user interface

Comments

@seanthegeek
Copy link

seanthegeek commented Jul 18, 2022

Describe the bug
I received a client error 400 when I try to upload a package named yaramail

(venv) sean@sean-desktop ~/d/yaramail (main)> hatch publish
Enter your username: Sean.Whalen
Enter your credentials:
dist/yaramail-1.0.0-py3-none-any.whl ... failed
Client error '400 The name 'yaramail' isn't allowed. See https://pypi.org/help/#project-name for more information.' for url 'https://upload.pypi.org/legacy/'
For more information check: https://httpstatuses.com/400

When I tried to upload yara-mail to Test PyPI after successfully uploading yaramail to Test PyPI, I got a much more specific error message that said the name was too similar to an existing project, until I deleted the yaramail project in Test PyPI.

(venv) sean@sean-desktop ~/d/yaramail (main) [1]> hatch publish -r test
dist/yara_mail-1.0.0-py3-none-any.whl ... failed
Client error '400 The name 'yara-mail' is too similar to an existing project. See https://test.pypi.org/help/#project-name for more information.' for url 'https://test.pypi.org/legacy/'
For more information check: https://httpstatuses.com/400

Expected behavior

PyPI should always give a specific reason when a name is not allowed

To Reproduce

Attempt to upload a project named yaramail.

My Platform
Ubuntu 20.04 LTS
Python 3.8.10
Hatch 1.3.1

@seanthegeek seanthegeek added bug 🐛 requires triaging maintainers need to do initial inspection of issue labels Jul 18, 2022
@seanthegeek seanthegeek changed the title Multiple unrealted project names are not allowed, even though there no projects in PyPI with those names PyPI does not always give a specific reason for why a name is not allowed Jul 18, 2022
@domdfcoding
Copy link
Contributor

Related: #11139

@di
Copy link
Member

di commented Jul 19, 2022

This error message is the result of the name being specifically prohibited. Would language like:

The name 'yaramail' has been prohibited

make that more clear?

@di di added UX/UI design, user experience, user interface APIs/feeds and removed requires triaging maintainers need to do initial inspection of issue bug 🐛 labels Jul 19, 2022
@seanthegeek
Copy link
Author

Adding why it is prohibited would be helpful.

@di
Copy link
Member

di commented Jul 19, 2022

Just to push back on that a bit: why? The process for acquiring the name is the same regardless of the reason why the name is prohibited.

To give a bit more context: there are lots of reasons why a project name might be prohibited, and they might not all make sense to an end user, or make sense to share with the end user.

@seanthegeek
Copy link
Author

I suppose it's more curiosity than an actual need. I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APIs/feeds UX/UI design, user experience, user interface
Projects
None yet
Development

No branches or pull requests

3 participants