Skip to content
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

Make it possible to programmatically yank a release #12708

Open
jefftlin123 opened this issue Dec 21, 2022 · 1 comment · May be fixed by #16912
Open

Make it possible to programmatically yank a release #12708

jefftlin123 opened this issue Dec 21, 2022 · 1 comment · May be fixed by #16912

Comments

@jefftlin123
Copy link

jefftlin123 commented Dec 21, 2022

What's the problem this feature will solve?

It doesn't seem possible to yank/unyank a release from outside of the pypi.org website's UI. For instance, it would be nice to do it from command line or from code.

Describe the solution you'd like

I would like to be able to make an http request that is the same as the one pypi makes when I click the yank release option in the dropdown menu on pypi.org's page for my package. Right now, the blockers to that are related to origin, referrer, and CSRF.

Additional context

I wrote this up as a question to find out if it's possible to programmatically yank my release: pypa/packaging-problems#633 A day of trying different options seems to suggest it's not possible. Attempting to curl from the command line gave:

<title>400 Bad CSRF Origin</title>

400 Bad CSRF Origin

Access is denied. This server can not verify that the origin or referrer of your request matches the current site. Either your browser supplied the wrong Origin or Referrer or it did not supply one at all.

Origin checking failed - missing Origin or Referer. %

This happened no matter the combination of other factors I changed from attempt to attempt, including obtaining the CSRF token using a GET operation and supplying both that and the cookie to the POST operation.

@jefftlin123 jefftlin123 added feature request requires triaging maintainers need to do initial inspection of issue labels Dec 21, 2022
@di di removed the requires triaging maintainers need to do initial inspection of issue label Jun 9, 2023
@zanieb
Copy link

zanieb commented Jan 5, 2024

This would be great for testing purposes! Has there been any consideration of implementing this? Are there major blockers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants