Skip to content

Make error message (for invalid project name) work with Test PyPI #3186

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
brainwane opened this issue Mar 8, 2018 · 2 comments
Closed

Make error message (for invalid project name) work with Test PyPI #3186

brainwane opened this issue Mar 8, 2018 · 2 comments
Labels
APIs/feeds feature request good first issue This issue is ideal for first-time contributors! help needed We'd love volunteers to advise on or help fix/implement this. testing Test infrastructure and individual tests

Comments

@brainwane
Copy link
Contributor

Right now, when someone tries to upload a package to PyPI but the project name they want to use is not a project name we allow, the error message we send them includes -- hardcoded -- the URL https://pypi.org. Instead, we should use Pyramid's URL routing to refer to the URL of the PyPI in question, thus ensuring that we send error messages that, as appropriate, refer to pypi.org, test.pypi.org, or any other future PyPI.

To fix this, look at warehouse/forklift/legacy.py and tests/unit/forklift/test_legacy.py (the test is test_fails_with_invalid_names), and make changes similar to the changes I made in #3183. If you're used to string substitution/string formatting in Python, this should be a relatively approachable first Warehouse issue.


Good First Issue: This issue is good for first time contributors. If you've already contributed to Warehouse, please work on another issue without this label instead. If there is not a corresponding pull request for this issue, it is up for grabs. For directions for getting set up, see our Getting Started Guide. If you are working on this issue and have questions, please feel free to ask them here, #pypa-dev on Freenode, or the pypa-dev mailing list.

@brainwane brainwane added good first issue This issue is ideal for first-time contributors! help needed We'd love volunteers to advise on or help fix/implement this. feature request testing Test infrastructure and individual tests APIs/feeds labels Mar 8, 2018
@brainwane brainwane added this to the 6. Post Legacy Shutdown milestone Mar 8, 2018
@pgadige
Copy link
Contributor

pgadige commented Mar 16, 2018

I'm working on this issue.

@brainwane
Copy link
Contributor Author

Hi @pgadige! Saw your question in IRC about logging in within your local developer environment. As Dustin said, check https://warehouse.readthedocs.io/development/getting-started/#logging-in-to-warehouse . Glad to have you joining us!

You mentioned you're interested in the larger process of building something like Warehouse. I recommend you take a look at:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APIs/feeds feature request good first issue This issue is ideal for first-time contributors! help needed We'd love volunteers to advise on or help fix/implement this. testing Test infrastructure and individual tests
Projects
None yet
Development

No branches or pull requests

2 participants