tox-dev / pyproject-fmt

MIT License
167 stars 27 forks source link

Removes 3.13, CPython and PyPy classifiers #198

Closed hugovk closed 4 months ago

hugovk commented 4 months ago

Exciting to see the new release! 🎉

I have this in pre-commit:

  - repo: https://github.com/tox-dev/pyproject-fmt
    rev: 2.0.2
    hooks:
      - id: pyproject-fmt
        additional_dependencies: [tox]

And py313 in tox.ini:

[tox]
requires =
    tox>=4.2
env_list =
    cog
    cli
    lint
    pins
    py{py3, 313, 312, 311, 310, 39, 38}

But pyproject-fmt 2.0.2 is removing the 3.13 Trove classifier:

   "Programming Language :: Python :: 3.10",
   "Programming Language :: Python :: 3.11",
   "Programming Language :: Python :: 3.12",
-  "Programming Language :: Python :: 3.13",
-  "Programming Language :: Python :: Implementation :: CPython",
-  "Programming Language :: Python :: Implementation :: PyPy",

https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version says it should read the tox config for the upper bound.

For example: https://github.com/hugovk/norwegianblue/pull/212

I'd also like to keep the "Implementation" classifiers to make it clear PyPy is supported.


Edit: PR https://github.com/tox-dev/pyproject-fmt-rust/pull/4 will preserve the Implementation classifiers.

gaborbernat commented 4 months ago

Check with https://github.com/tox-dev/pyproject-fmt/releases/tag/2.0.3 for 3.13 we no longer parse tox.ini so you need to do https://pyproject-fmt.readthedocs.io/en/latest/#configuration-file or https://pyproject-fmt.readthedocs.io/en/latest/#pyproject-fmt---max-supported-python in your pre-commit flags.

hugovk commented 4 months ago

Thanks, the config file will do.


For this bit of the docs:

https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version

image

Should we remove that YAML snippet? It doesn't really add anything, we just had an almost identical example YAML in the previous section about pre-commit.

gaborbernat commented 4 months ago

Yes.