Skip to content

Deprecation of dashes affects other project settings #2595

Closed
@jaraco

Description

@jaraco

Hi! I checked https://setuptools.readthedocs.io/en/latest/history.html#v54-1-0 but I wasn't entirely clear: is this meant to warn for all keys using hyphens in setup.cfg? For example, I see warnings for these Flake8 options:

$ cat setup.cfg
[flake8]
extend-ignore = E203
max-line-length = 88

[isort]
profile = black

[tool:pytest]
addopts = -ra --color=yes
testpaths = Tests
$ python setup.py --version
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/dist.py:633: UserWarning: Usage of dash-separated 'extend-ignore' will not be supported in future versions. Please use the underscore name 'extend_ignore' instead
  warnings.warn(
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/dist.py:633: UserWarning: Usage of dash-separated 'max-line-length' will not be supported in future versions. Please use the underscore name 'max_line_length' instead
  warnings.warn(
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/dist.py:633: UserWarning: Usage of dash-separated 'extend-ignore' will not be supported in future versions. Please use the underscore name 'extend_ignore' instead
  warnings.warn(
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/dist.py:633: UserWarning: Usage of dash-separated 'max-line-length' will not be supported in future versions. Please use the underscore name 'max_line_length' instead
  warnings.warn(
8.2.0.dev0

Flake8 themselves say both underscores and hyphens are fine in setup.cfg:

https://flake8.pycqa.org/en/latest/user/configuration.html#project-configuration

Thanks!

Originally posted by @hugovk in #2588 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs ImplementationIssues that are ready to be implemented.Needs InvestigationIssues which are likely in scope but need investigation to figure out the causebuggood first issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions