diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7ef1f97a..6e54feee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -130,6 +130,10 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.13' + cache: 'pip' - uses: actions/setup-python@v5 with: python-version: '3.12' @@ -244,7 +248,7 @@ jobs: fail-fast: false matrix: arch: [x86_64, aarch64] - python: [cp38, cp39, cp310, cp311, cp312] + python: [cp38, cp39, cp310, cp311, cp312, cp313] env: SCCACHE_GHA_ENABLED: "true" steps: @@ -274,7 +278,7 @@ jobs: fail-fast: false matrix: os: [macos-13, macos-14] - python: [cp38, cp39, cp310, cp311, cp312] + python: [cp38, cp39, cp310, cp311, cp312, cp313] exclude: # Python 3.8 not natively available for Apple Silicon. cibuildwheel # tries to do a cross build, which fails. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8d898810..362170a4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -56,6 +56,11 @@ repos: args: [requirements.in, -o, requirements-3.12.txt] language_version: python3.12 files: '^(?:requirements\.in|requirements-3\.12\.txt)$' + - name: pip-compile (py 3.13) + id: pip-compile + args: [requirements.in, -o, requirements-3.13.txt] + language_version: python3.13 + files: '^(?:requirements\.in|requirements-3\.13\.txt)$' - name: pip-compile (readthedocs) id: pip-compile args: [requirements-readthedocs.in, -o, requirements-readthedocs.txt] diff --git a/doc/dev-setup.rst b/doc/dev-setup.rst index 547978ae..f9ac03d5 100644 --- a/doc/dev-setup.rst +++ b/doc/dev-setup.rst @@ -34,7 +34,8 @@ of editable installs. Also install the development runtime dependencies: .. code-block:: sh pip install -r requirements.txt # If Python < 3.12 - pip install -r requirements-3.12.txt # If Python >= 3.12 + pip install -r requirements-3.12.txt # If Python = 3.12 + pip install -r requirements-3.13.txt # If Python >= 3.13 Now you should be able to run the unit tests by executing :command:`pytest`. It is expected that some tests will be skipped, because they require specific @@ -142,10 +143,11 @@ Committing ---------- Before committing, remember to run :command:`pre-commit install` to set up pre-commit. One of the pre-commit hooks checks that the requirements files are -up to date, and (at the time of writing) depends on having both -:command:`python3.8` and :command:`python3.12` commands on the path. If you're -not touching the requirements, you can skip this hook by setting the -environment variable :envvar:`SKIP=pip-compile` when committing. +up to date, and (at the time of writing) depends on having +:command:`python3.8`, :command:`python3.12` and :command:`python3.13` commands +on the path. If you're not touching the requirements, you can skip this hook +by setting the environment variable :envvar:`SKIP=pip-compile` when +committing. .. _ninja-build: https://ninja-build.org/ .. _pyenv: https://github.com/pyenv/pyenv/ diff --git a/pyproject.toml b/pyproject.toml index 85e42633..277649cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -114,7 +114,7 @@ py_version = 38 [tool.black] line-length = 100 -target-versions = ["py38", "py39", "py310", "py311", "py312"] +target-versions = ["py38", "py39", "py310", "py311", "py312", "py313"] [tool.ruff] select = ["E", "F", "W", "UP", "PYI", "RUF100"] diff --git a/requirements-3.12.txt b/requirements-3.12.txt index 177673d9..ebbb5769 100644 --- a/requirements-3.12.txt +++ b/requirements-3.12.txt @@ -10,7 +10,7 @@ llvmlite==0.43.0 # via numba netifaces2==0.0.22 # via -r requirements.in -numba==0.60.0 +numba==0.60.0 ; python_version < "3.13" # via -r requirements.in numpy==2.0.2 # via diff --git a/requirements-3.13.txt b/requirements-3.13.txt new file mode 100644 index 00000000..5ce47a0c --- /dev/null +++ b/requirements-3.13.txt @@ -0,0 +1,32 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --output-file=requirements-3.13.txt requirements.in +# +iniconfig==2.0.0 + # via pytest +netifaces2==0.0.22 + # via -r requirements.in +numpy==2.1.2 + # via + # -r requirements.in + # scipy +packaging==24.1 + # via pytest +pluggy==1.5.0 + # via pytest +pytest==8.3.3 + # via + # -r requirements.in + # pytest-asyncio + # pytest-custom-exit-code + # pytest-timeout +pytest-asyncio==0.24.0 + # via -r requirements.in +pytest-custom-exit-code==0.3.0 + # via -r requirements.in +pytest-timeout==2.3.1 + # via -r requirements.in +scipy==1.14.1 + # via -r requirements.in diff --git a/requirements-readthedocs.txt b/requirements-readthedocs.txt index e50c6655..44572659 100644 --- a/requirements-readthedocs.txt +++ b/requirements-readthedocs.txt @@ -37,7 +37,7 @@ markupsafe==2.1.5 # via jinja2 netifaces2==0.0.22 # via -r requirements-3.12.txt -numba==0.60.0 +numba==0.60.0 ; python_version < "3.13" # via -r requirements-3.12.txt numpy==2.0.2 # via diff --git a/requirements.in b/requirements.in index 9af733de..ae1edb46 100644 --- a/requirements.in +++ b/requirements.in @@ -1,5 +1,5 @@ netifaces2 -numba +numba; python_version<"3.13" # numba doesn't yet support 3.13 numpy pytest pytest-asyncio diff --git a/requirements.txt b/requirements.txt index e9b20d91..50b29ffe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,7 @@ llvmlite==0.41.1 # via numba netifaces2==0.0.22 # via -r requirements.in -numba==0.58.1 +numba==0.58.1 ; python_version < "3.13" # via -r requirements.in numpy==1.24.4 # via