Skip to content

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

@abravalheri

Description

@abravalheri

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions