diff --git a/pyproject.toml b/pyproject.toml index 4bc78323..ef842845 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ name = "tractor" version = "0.1.0a6dev0" description = 'structured concurrent `trio`-"actors"' authors = [{ name = "Tyler Goodlet", email = "goodboy_foss@protonmail.com" }] -requires-python = ">=3.12, <3.14" +requires-python = ">=3.12, <3.15" readme = "docs/README.rst" license = "AGPL-3.0-or-later" keywords = [ @@ -31,6 +31,7 @@ classifiers = [ "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: System :: Distributed Computing", ] dependencies = [ diff --git a/tractor/_testing/pytest.py b/tractor/_testing/pytest.py index 1d803c9e..c33406ff 100644 --- a/tractor/_testing/pytest.py +++ b/tractor/_testing/pytest.py @@ -227,7 +227,13 @@ def pytest_addoption( def pytest_configure(config): backend = config.option.spawn_backend from tractor.spawn._spawn import try_set_start_method - try_set_start_method(backend) + try: + try_set_start_method(backend) + except RuntimeError as err: + # e.g. `--spawn-backend=subint` on Python < 3.14 — turn the + # runtime gate error into a clean pytest usage error so the + # suite exits with a helpful banner instead of a traceback. + raise pytest.UsageError(str(err)) from err # register custom marks to avoid warnings see, # https://docs.pytest.org/en/stable/how-to/writing_plugins.html#registering-custom-markers