How to delete all uploaded releases and now also how to reclaim package name on TestPyPI

Hi :waving_hand:

My project Gala does a test upload to TestPyPI on pushes to main or releases. I ran out of space on TestPyPI, which is causing the test uploads to fail. I wanted to clear all of the past releases, and found this issue: Issue: clear all releases from test PyPI: torchani · Issue #528 · pypi/support · GitHub - so I deleted the project and intended to immediately re-upload a version to reclaim the name “gala”. However, now when I try to upload, I’m getting a 400 error with “The name ‘gala’ is too similar to an existing project”. So, two questions:

  1. Is there a different recommended way to delete all of the releases from a project on TestPyPI? There were like >100 releases, and I did not want to go one by one (which requires manually typing the name of the project each time…).
  2. How can I re-claim “gala” and why am I getting a “too similar” error? I didn’t make an issue on Python Packaging Authority · GitHub because this is not a PEP541 request – I am the maintainer and previously already had the name “gala” on TestPyPI.

thanks!

1 Like

Why are you pushing your package to TestPyPI? What is your intended usecase for that?

Pushing to TestPyPI is a way to check that an automated release process works without making an actual release to PyPI.

4 Likes

Yes, but why do that on every single push/release, even when they don’t touch the process? This is just a waste of resources.

1 Like

I don’t push or release often. Pushes happen when PRs are merged. When I do, I want to make sure that when I eventually release, the upload to pypi works. But your comment is somewhat adjacent to both of my questions.

Once upon a time it was the only relatively reliable way to be sure someone hadn’t flubbed a classifier string or something since the last release you’d uploaded to PyPI, in order to determine whether what you’re about to tag will be accepted or rejected when you go to upload it. Once you’ve tagged a release that Warehouse won’t accept, you’re forever carrying a bad version in Git that will never have corresponding packages on PyPI.

These days, if it’s a pyproject.toml based package, the validate-pyproject · PyPI tool is a quicker and easier solution to the problem, but if you’re still using setup.py/setup.cfg for some of your metadata it won’t lint that. Also it’s still self-identifying as an experimental tool, so some projects may be hesitant to rely on it yet.

1 Like

I’m still planning on pushing PEP 694 over the line this year, and that will provide a much better way to validate releases.

1 Like