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

Modifying capitalisation in package name #13284

Closed
deepadmax opened this issue Mar 23, 2023 · 7 comments
Closed

Modifying capitalisation in package name #13284

deepadmax opened this issue Mar 23, 2023 · 7 comments
Labels
feature request requires triaging maintainers need to do initial inspection of issue

Comments

@deepadmax
Copy link

What's the problem this feature will solve?
You cannot currently change the capitalisation of a package's name as it is listed on the PyPI, despite that it's case insensitive and wouldn't cause any issues.

Describe the solution you'd like
It would be nice to be able to change how a package's name is capitalised post having published it.

Additional context
I had mistakenly published a package where the module's name should've been lowercase but in the entry, the name should've had a letter capitalised. I tried even to delete the project entirely to see if republishing it from scratch with the name corrected would solve it. It did not.

@deepadmax deepadmax added feature request requires triaging maintainers need to do initial inspection of issue labels Mar 23, 2023
@dstufft
Copy link
Member

dstufft commented Mar 23, 2023

You can change it by publishing a new version with the metadata in the package set to how you want it to be, if that doesn't work then one of the tools you're using is lowercasing it.

@di
Copy link
Member

di commented Mar 23, 2023

This is likely due to pypa/twine#920.

@deepadmax
Copy link
Author

You can change it by publishing a new version with the metadata in the package set to how you want it to be, if that doesn't work then one of the tools you're using is lowercasing it.

I've already published a new version already, moving it from 0.1.0 to 1.0.0, so I can't really try this again as I'd have to move it up to 2.0.0.

This is likely due to pypa/twine#920.

That issues appears to be about hyphenation and underscores. I can't find anything online about twine converting uppercase to lowercase. But if this is an issue with twine, how do you reckon I publish in the future? And how can I get it fixed now without republishing?

@dstufft
Copy link
Member

dstufft commented Mar 23, 2023

That issues appears to be about hyphenation and underscores. I can't find anything online about twine converting uppercase to lowercase.

That issue is about twine normalizing names before sending them to PyPI, underscore to hyphens is one of those normalizations, so is uppercase to lowercase.

But if this is an issue with twine, how do you reckon I publish in the future?

I don't have a particularly great answer for you here.

And how can I get it fixed now without republishing?

You can't.

@deepadmax
Copy link
Author

That issue is about twine normalizing names before sending them to PyPI, underscore to hyphens is one of those normalizations, so is uppercase to lowercase.

It's a little silly since twine is what the official guide to publishing suggests.

And how can I get it fixed now without republishing?

You can't.

Then I reckon this is a good feature request to keep around. In the meanwhile, I shall have to cope and seethe.

Thank you for reading and for your answers.

@di
Copy link
Member

di commented Mar 23, 2023

Posting a new release is our supported method for changing the project name or any project metadata, see #1919 for more details.

We treat release files and their corresponding metadata as immutable, and this includes the project name (even for cases where the name would normalize to be the same). We're also very unlikely to change this, so given that I'm going to close this, but thanks for raising the issue.

@di di closed this as completed Mar 23, 2023
@deepadmax
Copy link
Author

Posting a new release is our supported method for changing the project name or any project metadata, see #1919 for more details.

I've already published a new version already, moving it from 0.1.0 to 1.0.0, so I can't really try this again as I'd have to move it up to 2.0.0.

I presumed it required posting a new major release. That's my mistake.

That issue is about twine normalizing names before sending them to PyPI, underscore to hyphens is one of those normalizations, so is uppercase to lowercase.

It turns out this wasn't even about twine. twine isn't normalising anything for me. However, it's been poetry as the builder that has been normalising the name. Switching to using regular pyproject.toml fields, it remains as proclaimed.

I am left a little embarrassed. But hey. You live and you learn. Thank you for your time and answers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request requires triaging maintainers need to do initial inspection of issue
Projects
None yet
Development

No branches or pull requests

3 participants