tox-dev/pyproject-fmt

Support for adding classifiers for not yet final Python version without Tox

Closed this issue · 1 comments

From the docs:

if you’re adding support for a not yet final Python version the tool offers a functionality that it will invoke tox for you and inspect the test environments and use the latest python version tested against.

This is currently the only way to force the tool to add the prerelease PROGRAMMING LANGUAGE :: PYTHON :: 3.13 classifier.

For projects that don't use Tox, there's the simple workaround of adding a tox.ini file or a tool.tox table in pyproject.toml.

I propose a new CLI flag --max-supported-python-is-prerelease (terrible and maybe too long, open to ideas 😅) and the following priority order:

  1. Check for the max version in requires-python
  2. If no value was passed, try to use Tox
  3. If that fails, check the proposed flag. If true, use a new constant _PY_PRERELEASE_VERSION
  4. Fall back to latest stable release, i.e. _PY_MAX_VERSION

PR welcome.