Skip to content

Commit ef26758

Browse files
authored
Add support for Python 3.11 (#177)
* ni_measurement_generator: Use in-project virtualenvs * Upgrade pytest to support Python 3.10 * Rerun poetry lock * PR workflow: Run tests on Python 3.10 * GitHub workflows: Quote version strings to preserve trailing zeroes * GitHub workflows: Remove unnecessary quotes * ni-measurement-generator: Don't add test-pypi repo * Update poetry lock * GitHub workflow: Try removing grpcio from Poetry cache * GitHub workflow: Extend previous hack * Update poetry lock * Remove dependency on typed-ast typed-ast is end-of-life and does not support Python 3.11. Mypy only needs typed-ast with Python 3.7 and older, which MeasurementLink does not support. * Update poetry lock * PR workflow: Add Python 3.11 * GitHub workflows: Upgrade to Gr1N/setup-poetry@v8 for Python 3.11 support
1 parent ddcf6a9 commit ef26758

4 files changed

Lines changed: 10 additions & 41 deletions

File tree

.github/workflows/PR.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- uses: actions/setup-python@v2
1919
with:
2020
python-version: ${{ env.PYTHON_VERSION }}
21-
- uses: Gr1N/setup-poetry@v7
21+
- uses: Gr1N/setup-poetry@v8
2222
with:
2323
poetry-version: ${{ env.POETRY_VERSION }}
2424
- name: Check for lock changes (measurement service)
@@ -27,6 +27,8 @@ jobs:
2727
with:
2828
path: ~/.cache/pypoetry/virtualenvs
2929
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
30+
- name: HACK - Remove grpcio from Poetry cache
31+
run: poetry cache clear pypi:gprcio:1.51.0
3032
- name: Install the Package
3133
run: poetry install -vvv
3234
- name: Lint the Code
@@ -50,7 +52,7 @@ jobs:
5052
- uses: actions/setup-python@v2
5153
with:
5254
python-version: ${{ env.PYTHON_VERSION }}
53-
- uses: Gr1N/setup-poetry@v7
55+
- uses: Gr1N/setup-poetry@v8
5456
with:
5557
poetry-version: ${{ env.POETRY_VERSION }}
5658
- name: Check for lock changes (generator)
@@ -60,6 +62,8 @@ jobs:
6062
with:
6163
path: ~/.cache/pypoetry/virtualenvs
6264
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
65+
- name: HACK - Remove grpcio from Poetry cache
66+
run: poetry cache clear pypi:gprcio:1.51.0
6367
- name: Install the Package
6468
run: poetry install -vvv
6569
- name: Lint the Code
@@ -70,14 +74,14 @@ jobs:
7074
strategy:
7175
matrix:
7276
os: [macos-latest, windows-latest, ubuntu-latest]
73-
python-version: [3.8, 3.9, '3.10']
77+
python-version: [3.8, 3.9, '3.10', 3.11]
7478
steps:
7579
- uses: actions/checkout@v2
7680
- uses: actions/setup-python@v2
7781
with:
7882
python-version: ${{ matrix.python-version }}
7983

80-
- uses: Gr1N/setup-poetry@v7
84+
- uses: Gr1N/setup-poetry@v8
8185
with:
8286
poetry-version: ${{ env.POETRY_VERSION }}
8387
- uses: actions/cache@v2

.github/workflows/Publish_NIMS.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: actions/setup-python@v2
2121
with:
2222
python-version: ${{ env.PYTHON_VERSION }}
23-
- uses: Gr1N/setup-poetry@v7
23+
- uses: Gr1N/setup-poetry@v8
2424
with:
2525
poetry-version: ${{ env.POETRY_VERSION }}
2626

poetry.lock

Lines changed: 1 addition & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ pytest-cov = "^3.0.0"
4444
mypy = "^0.961"
4545
mypy-protobuf = "^3.4"
4646
types-protobuf = "^4.21"
47-
typed-ast = "*"
4847
types-pkg-resources = "*"
4948
mako = "*"
5049

0 commit comments

Comments
 (0)