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

python_requires gets rewriten even when --min-py-version is **not** specified #230

Closed
Cube707 opened this issue Mar 15, 2024 · 5 comments
Closed

Comments

@Cube707
Copy link

Cube707 commented Mar 15, 2024

Currently setup-cfg-fmt applies the default setting of 3.8 even to config files that specify they allow smaller python version. This should happen in my opinion, only if the user specifies a --min-py-version should it override the existing values.

steps to reproduce:

assume the following setup.cfg:

[metadata]
name = tinker
classifiers =
    Programming Language :: Python :: 3
    Programming Language :: Python :: 3 :: Only
    Programming Language :: Python :: 3.7
    Programming Language :: Python :: 3.8

[options]
python_requires = >=3.7

now running setup-cfg-fmt --include-version-classifiers setup.cfg will update the version-classifiers and require_python to a minimum of 3.8

Notes

this is already fixed in #178. installing pip install -U git+https://github.com/mxr/setup-cfg-fmt#parse-min and running the command again results in the expected behavior

@asottile
Copy link
Owner

you found the duplicate and yet still made an issue?

@Cube707
Copy link
Author

Cube707 commented Mar 15, 2024

I do not believe this is a duplicate. Both #178 and #179 started out about different things. Its only a happy accident that the fix for theses also fixes this.

This is still an existing problem in the current version that others might face, so please keep it open until the PR is merged.

@asottile
Copy link
Owner

no, I'm not changing this behavior

@Cube707
Copy link
Author

Cube707 commented Mar 15, 2024

than #179 is not beeing continued?

@asottile
Copy link
Owner

not in it's current state, no

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

No branches or pull requests

2 participants