tox-dev/pyproject-fmt

Removes 3 and 3.12 classifiers

hugovk opened this issue · 5 comments

hugovk commented

Re: hugovk/pepotron#44

The pyproject-fmt upgrade from 0.10.0 → 0.13.0 removes these classifiers:

  "Programming Language :: Python :: 3",
...
  "Programming Language :: Python :: 3.12",

Looks like this was introduced by #90 in https://github.com/tox-dev/pyproject-fmt/releases/tag/0.11.0.

Interestingly, when I run it locally on macOS, only the first one is removed; the 3.12 one is left alone.

I'd like to keep these classifiers, especially the 3.12 one.

I don't see value in the 3 only version with 2 EOL. For 3.12 to be added you need tox to be present https://github.com/tox-dev/pyproject-fmt/blob/main/src/pyproject_fmt/formatter/project.py#L25 to know if 3.12 support is declared or not. A PR that would allow setting the max py version via some toml config is welcome. This project will assume max is 3.11 until 3.12.0 is released.

hugovk commented

Aha, thanks, I have tox installed locally, hence the difference with the CI.

We can add tox as an additional_dependencies for pyproject-fmt in pre-commit and it'll detect the 3.12 version:

hugovk/pepotron@ae57810

So that's good enough for me. Thanks!

I am trying to upgrade several projects for Python 3.12 (SCHEDULED TO SHIP TOMORROW) and pre-commit keeps removing Python 3.12 from the trove classifiers. This is even the case when requires-python = ">=3.8,<3.13"!!

Not all projects use tox nor should they be forced to use tox to properly format their pyproject.toml files.

hugovk commented

Hmm, I've now run into this problem on a repo that doesn't use tox and it's removing the 3.13 classifier.

I don't see value in the 3 only version with 2 EOL. For 3.12 to be added you need tox to be present main/src/pyproject_fmt/formatter/project.py#L25 to know if 3.12 support is declared or not. A PR that would allow setting the max py version via some toml config is welcome. This project will assume max is 3.11 until 3.12.0 is released.