Skip to content

Make error message (for when the admin intervention flag is set) work with Test PyPI #3185

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
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 admin intervention flag is set (meaning that we're under a spam attack and the PyPI admins have temporarily shut off all uploads), 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_admin_flag_set), 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 pretty 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
@brainwane
Copy link
Contributor Author

I believe @saxenanurag is working on this in #3405.

@saxenanurag
Copy link
Contributor

Hi. Sorry I have been moving apartments. I will get back to this soon.

@di di closed this as completed in #3405 Apr 2, 2018
di pushed a commit that referenced this issue Apr 2, 2018
* fix for #3185 in warehouse

* remove whitespace
nitinprakash96 pushed a commit to nitinprakash96/warehouse that referenced this issue Apr 3, 2018
* fix for pypi#3185 in warehouse

* remove whitespace
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