You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repo and believe that this is not a duplicate.
I have searched the documentation and believe that my question is not covered.
Feature Request
TL;DR: I would like to ask about supporting capitalized package names.
In light of PEP 8, I understand the design choice to convert package name to lowercase when publishing to PyPI. I am aware that it is possible to kind-of-override this behavior by using something like packages = [{include = "myPackage"}] in pyproject.toml, as pointed out in #1538.
Working example
I just tested this for an upcoming package named D47calib (see further down for why the D should be uppercase):
I first created and published D47calib v0.0.1 using twine, which resulted in a PyPI project page named D47calib.
I then made some minor edit, changed version to 0.0.2, and published it with flit, which preserved the PyPI project name (still D47calib).
Finally, I made new minor edits, changed version to 0.0.3, re-created pyproject.toml with poetry (v1.1.7), with packages = [{include = "D47calib"}] as suggested above, and published that with poetry.
The last step, surprisingly, changed the PyPI project name to d47calib (with lowercase d). In spite of this, both pip install D47calib and import D47calib still work as before.
Why enable non-PEP-8-compliant names in some cases?
For context: I am the author of the D47crunch package used by geochemists, and I am looking to switch to poetry from flit. There are two strong reasons I will not change the package name at this point:
Asking users to switch to a new name is going to be a mess;
Semantically, in geochemistry there is a critical difference between d47 and D47, so in this case the uppercase D is part of the message.
I am a big fan of style guidelines, both for code and for writing in general, but I also believe it's important to know how/when to deviate from the default style. It would be great if poetry offered a simple way to force preservation of the original capitalization, perhaps with a strongly worded warning pointing to PEP 8. If this is simply not technically possible and/or unacceptable on philosophical grounds, authors of existing capitalized packages will have to do without poetry, which would suck.
At this point, it seems that the remaining issues are with build and publish. I've tried manually editing the sdist and wheel files (replacing all occurrences of d47 by D47 and providing new hash values), but this was not enough to restore proper capitalization in PyPI.
Thanks for hearing me out and for the great work you've done so far.
The text was updated successfully, but these errors were encountered:
Feature Request
TL;DR: I would like to ask about supporting capitalized package names.
In light of PEP 8, I understand the design choice to convert package name to lowercase when publishing to PyPI. I am aware that it is possible to kind-of-override this behavior by using something like
packages = [{include = "myPackage"}]
inpyproject.toml
, as pointed out in #1538.Working example
I just tested this for an upcoming package named
D47calib
(see further down for why theD
should be uppercase):D47calib v0.0.1
usingtwine
, which resulted in a PyPI project page namedD47calib
.0.0.2
, and published it withflit
, which preserved the PyPI project name (stillD47calib
).0.0.3
, re-createdpyproject.toml
withpoetry
(v1.1.7), withpackages = [{include = "D47calib"}]
as suggested above, and published that withpoetry
.The last step, surprisingly, changed the PyPI project name to
d47calib
(with lowercased
). In spite of this, bothpip install D47calib
andimport D47calib
still work as before.Why enable non-PEP-8-compliant names in some cases?
For context: I am the author of the D47crunch package used by geochemists, and I am looking to switch to
poetry
fromflit
. There are two strong reasons I will not change the package name at this point:d47
andD47
, so in this case the uppercaseD
is part of the message.I am a big fan of style guidelines, both for code and for writing in general, but I also believe it's important to know how/when to deviate from the default style. It would be great if
poetry
offered a simple way to force preservation of the original capitalization, perhaps with a strongly worded warning pointing to PEP 8. If this is simply not technically possible and/or unacceptable on philosophical grounds, authors of existing capitalized packages will have to do withoutpoetry
, which would suck.At this point, it seems that the remaining issues are with
build
andpublish
. I've tried manually editing the sdist and wheel files (replacing all occurrences ofd47
byD47
and providing new hash values), but this was not enough to restore proper capitalization in PyPI.Thanks for hearing me out and for the great work you've done so far.
The text was updated successfully, but these errors were encountered: