Skip to content

Commit

Permalink
Add support for Python 3.13.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois committed Jan 5, 2024
1 parent 614c159 commit 0abce6f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 13 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:
tox-env: typecheck
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
- name: Check ${{ matrix.check-name }}
uses: pantsbuild/actions/run-tox@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7
with:
tox-env: ${{ matrix.tox-env }}
unit-tests:
Expand All @@ -38,7 +38,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [[2, 7], [3, 7], [3, 8], [3, 9], [3, 10], [3, 11], [3, 12, "0-beta.2"]]
python-version: [[2, 7], [3, 7], [3, 8], [3, 9], [3, 10], [3, 11], [3, 12], [3, 13, "0-alpha.2"]]
os: [ubuntu-22.04, macos-12]
exclude:
- os: macos-12
Expand All @@ -49,14 +49,16 @@ jobs:
python-version: [3, 9]
- os: macos-12
python-version: [3, 10]
- os: macos-12
python-version: [3, 11]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Python ${{ join(matrix.python-version, '.') }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "${{ join(matrix.python-version, '.') }}"
- name: Run Unit Tests
uses: pantsbuild/actions/run-tox@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7
with:
tox-env: py${{ matrix.python-version[0] }}${{ matrix.python-version[1] }} -- -vvs
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ jobs:
id-token: write
steps:
- name: Checkout ${{ needs.determine-tag.outputs.release-tag }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ needs.determine-tag.outputs.release-tag }}
- name: Setup Python 3.9
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Package ${{ needs.determine-tag.outputs.release-tag }}
uses: pantsbuild/actions/run-tox@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7
with:
tox-env: package
- name: Publish ${{ needs.determine-tag.outputs.release-tag }}
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Utilities",
]
requires-python = ">=2.7,<3.13,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*"
requires-python = ">=2.7,<3.14,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*"
requires = [
"setuptools; python_version <= '3.5'",
"importlib-metadata; python_version == '3.6' or python_version == '3.7'",
Expand Down
10 changes: 8 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ envlist =
py310
py311
py312
py313

[testenv]
deps =
pex==2.1.137; python_version < "3.12"
shiv==1.0.3; python_version >= "3.6"
pex==2.1.156; python_version < "3.13"

# The fix for shiv under Python 3.123 is off for review in https://github.com/linkedin/shiv/pull/249
shiv==1.0.4; python_version >= "3.6" and python_version < "3.13"
git+https://github.com/jsirois/shiv@0c8b3e83238327e51955d66ba4fee28c4fc7107f#egg=shiv; python_version >= "3.13"

pytest==4.6.11; python_version < "3.6"
pytest==6.2.5; python_version >= "3.6"
commands =
Expand Down Expand Up @@ -70,6 +75,7 @@ commands =
mypy --python-version 3.10 .
mypy --python-version 3.11 .
mypy --python-version 3.12 .
mypy --python-version 3.13 .

[_flit]
basepython = python3
Expand Down

0 comments on commit 0abce6f

Please sign in to comment.