Skip to content

Commit c49d16b

Browse files
authored
Add support for Python 3.13 (#1061)
* GitHub: Use Python 3.11.9 by default * GitHub: Run tests with Python 3.13 * RTD: Update to Python 3.11 and latest Ubuntu * service: Update dependencies for Python 3.13 * service: Update poetry.lock * generator: Python 3.13 needs new grpcio-tools * generator: Update poetry.lock
1 parent 1a75a25 commit c49d16b

12 files changed

Lines changed: 202 additions & 22 deletions

File tree

.github/workflows/Publish_NIMS.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ concurrency: publish_to_pypi
1010
env:
1111
# Versions are also listed in PR.yml
1212
POETRY_VERSION: 1.8.2
13-
PYTHON_VERSION: 3.9
13+
PYTHON_VERSION: 3.11.9
1414

1515
jobs:
1616
check_nims:
@@ -22,7 +22,7 @@ jobs:
2222
# package version that doesn't exist yet.
2323
build:
2424
name: Build
25-
runs-on : ubuntu-latest
25+
runs-on : ubuntu-latest
2626
steps:
2727
- name: Check out repo
2828
uses: actions/checkout@v4
@@ -48,12 +48,12 @@ jobs:
4848
run: |
4949
poetry version ${{ steps.vars.outputs.tag }}
5050
working-directory: ./packages/service
51-
51+
5252
- name: Update NIMG package version based on tag name.
5353
run: |
5454
poetry version ${{ steps.vars.outputs.tag }}
5555
working-directory: ./packages/generator
56-
56+
5757
- name: Update SDK package version based on tag name.
5858
run: |
5959
poetry version ${{ steps.vars.outputs.tag }}
@@ -71,13 +71,13 @@ jobs:
7171
git commit -m "Promote NIMS and NIMG package version" -a
7272
echo "version_changed=true" >> $GITHUB_OUTPUT
7373
fi
74-
74+
7575
- name: Push changes to the appropriate branch
7676
if: ${{ steps.commit.outputs.version_changed && (startsWith(github.event.release.target_commitish, 'main') || startsWith(github.event.release.target_commitish, 'releases/')) }}
7777
uses: CasperWA/push-protected@v2
7878
with:
7979
token: ${{ secrets.ADMIN_PAT }}
80-
branch: ${{ github.event.release.target_commitish }}
80+
branch: ${{ github.event.release.target_commitish }}
8181
unprotect_reviews: true
8282

8383
# To Test the Publish use : poetry publish --build --username __token__ --password ${{ secrets.TEST_PYPI_TOKEN }} -r test-pypi
@@ -86,7 +86,7 @@ jobs:
8686
run: |
8787
poetry publish --build --username __token__ --password ${{ secrets.PYPI_TOKEN }}
8888
working-directory: ./packages/service
89-
89+
9090
- name: Build NIMG Python package and publish to PyPI
9191
if: ${{ startsWith(github.event.release.target_commitish, 'main') || startsWith(github.event.release.target_commitish, 'releases/') }}
9292
run: |
@@ -101,7 +101,7 @@ jobs:
101101

102102
- name: Create archives of the examples
103103
env:
104-
EXAMPLE_ARCHIVE: measurement-plugin-python-examples-${{ steps.vars.outputs.tag }}
104+
EXAMPLE_ARCHIVE: measurement-plugin-python-examples-${{ steps.vars.outputs.tag }}
105105
run: |
106106
# Use --prefix for the tarball but not the zip file. Windows zip tools often create a directory automatically.
107107
rm -rf dist

.github/workflows/check_examples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
env:
88
POETRY_VERSION: 1.8.2
9-
PYTHON_VERSION: 3.9
9+
PYTHON_VERSION: 3.11.9
1010

1111
jobs:
1212
check_examples:

.github/workflows/check_nimg.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
env:
88
POETRY_VERSION: 1.8.2
9-
PYTHON_VERSION: 3.9
9+
PYTHON_VERSION: 3.11.9
1010

1111
jobs:
1212
check_nimg:

.github/workflows/check_nims.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
env:
88
POETRY_VERSION: 1.8.2
9-
PYTHON_VERSION: 3.9
9+
PYTHON_VERSION: 3.11.9
1010

1111
jobs:
1212
check_nims:

.github/workflows/run_unit_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [windows-latest, ubuntu-latest]
17-
python-version: [3.9, '3.10', 3.11, 3.12]
17+
python-version: [3.9, '3.10', 3.11, 3.12, 3.13]
1818
# Fail-fast skews the pass/fail ratio and seems to make pytest produce
1919
# incomplete JUnit XML results.
2020
fail-fast: false

.readthedocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
version: 2
22

33
build:
4-
os: ubuntu-22.04
4+
os: ubuntu-24.04
55
tools:
6-
python: "3.9"
6+
python: "3.11"
77
jobs:
88
post_create_environment:
99
- pip install poetry==1.8.2

packages/generator/poetry.lock

Lines changed: 90 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/generator/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ bandit = { version = ">=1.7", extras = ["toml"] }
4343
tox = ">=4.0"
4444
grpcio-tools = [
4545
{version = "1.49.1", python = ">=3.9,<3.12"},
46-
{version = "1.59.0", python = "^3.12"},
46+
{version = "1.59.0", python = ">=3.12,<3.13"},
47+
{version = "1.67.0", python = "^3.13"},
4748
]
4849

4950
[tool.poetry.scripts]

packages/generator/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[tox]
77
isolated_build = true
8-
envlist = clean, py{39,310,311,312}, py39-{pb4,pb5,pb6}
8+
envlist = clean, py{39,310,311,312,313}, py39-{pb4,pb5,pb6}
99

1010
[testenv]
1111
skip_install = true

0 commit comments

Comments
 (0)