Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

What to do with the deprecation warnings for dash-separated and uppercase keys in setup.cfg after due date? #4672

Open
abravalheri opened this issue Oct 7, 2024 · 0 comments

Comments

@abravalheri
Copy link
Contributor

When working recently on setuptools changes I noticed that some deprecations have reached due date:

if '-' in opt:
SetuptoolsDeprecationWarning.emit(
"Invalid dash-separated options",
f"""
Usage of dash-separated {opt!r} will not be supported in future
versions. Please use the underscore name {underscore_opt!r} instead.
""",
see_docs="userguide/declarative_config.html",
due_date=(2024, 9, 26),
# Warning initially introduced in 3 Mar 2021
)

if section != 'metadata' or opt.islower():
return opt
lowercase_opt = opt.lower()
SetuptoolsDeprecationWarning.emit(
"Invalid uppercase configuration",
f"""
Usage of uppercase key {opt!r} in {section!r} will not be supported in
future versions. Please use lowercase {lowercase_opt!r} instead.
""",
see_docs="userguide/declarative_config.html",
due_date=(2024, 9, 26),
# Warning initially introduced in 6 Mar 2021
)

The problem is that I don't think that the community have moved towards fixing those usages, as indicated by this GitHub search: https://github.com/search?q=%2Fauthor-email%7Cmaintainer-email%7Clong-description%7Clicense-file%2F+path%3Asetup.cfg&type=code&p=5. Disclaimer: I don't know if these results use the setup.cfg format of a tool that is different than setuptools and accepts dashes (I don't know for example if pbr accepts dashes).

What should we do now that we are arriving the end of the deprecation period? Should we simply transform the warnings in errors? Would that be too disruptive in the community?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant