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

Deprecation of dashes affects other project settings #2595

Closed
jaraco opened this issue Mar 7, 2021 · 1 comment · Fixed by #2600
Closed

Deprecation of dashes affects other project settings #2595

jaraco opened this issue Mar 7, 2021 · 1 comment · Fixed by #2600
Labels
bug good first issue Needs Implementation Issues that are ready to be implemented. Needs Investigation Issues which are likely in scope but need investigation to figure out the cause

Comments

@jaraco
Copy link
Member

jaraco commented Mar 7, 2021

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)

@webknjaz webknjaz added bug good first issue Needs Implementation Issues that are ready to be implemented. Needs Investigation Issues which are likely in scope but need investigation to figure out the cause labels Mar 7, 2021
jaraco added a commit that referenced this issue Mar 14, 2021
…scope

Reduce scope of dash deprecation warning. Fixes #2595
@jaraco
Copy link
Member Author

jaraco commented Mar 14, 2021

Short answer, no. It was unintentional to affect config for other projects.

This was referenced Mar 14, 2021
This was referenced Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Needs Implementation Issues that are ready to be implemented. Needs Investigation Issues which are likely in scope but need investigation to figure out the cause
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants