Amending PEP 427 (and PEP 625) on package normalization rules

One semi-related issue I had recently is that I created a project named pkg-resources. The name wasn’t a big issue to me, and I used a hyphen for no really good reason other than I had to pick something. But it turned out that some of the tools I used (I can’t recall which right now) didn’t really like unnormalised project names. So I’ve switched to thinking of the project as pkg_resources and referring to it as that everywhere.

However, PyPI still considers the hyphenated form as the canonical name of the project. I haven’t dated try uploading a new version with the package metadata changed to use the underscore form for the name, but I suspect that wouldn’t work.

Ideally, I’d like to rename the project. Or if that’s not feasible, then delete it and re-upload everything with the new name. But of course I can’t do that either as deletion of projects isn’t allowed.

So maybe PyPI should allow renaming of projects when the old and new names both have the same canonical form?

(And yes, I know I could ask the PyPI admins for assistance renaming my project, but that seems like a lot of effort for them, just for a cosmetic change, and I know they are busy with much more important requests…)

1 Like