Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: start testing with python 3.12 #1117

Merged
merged 8 commits into from
Oct 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
experimental: [false]
fail-fast: false
continue-on-error: ${{ matrix.experimental }}
Expand All @@ -72,7 +72,9 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: pdm install -d -Gspeed -Gdocs -Gvoice
run: |
pdm update --pre aiohttp # XXX: temporarily install aiohttp prerelease for 3.12
pdm install -d -Gspeed -Gdocs -Gvoice

- name: Add .venv/bin to PATH
run: dirname "$(pdm info --python)" >> $GITHUB_PATH
Expand Down Expand Up @@ -129,8 +131,6 @@ jobs:

# run the libcst parsers and check for changes
- name: libcst codemod
env:
LIBCST_PARSER_TYPE: "native"
run: |
nox -s codemod -- run-all
if [ -n "$(git status --porcelain)" ]; then
Expand All @@ -147,7 +147,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: ["windows-latest", "ubuntu-latest", "macos-latest"]
experimental: [false]
fail-fast: true
Expand All @@ -167,11 +167,13 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: pdm install -dG test # needed for coverage
run: |
pdm update --pre aiohttp # XXX: temporarily install aiohttp prerelease for 3.12
pdm install -dG test # needed for coverage

- name: Test package install
run: |
python -m pip install .
python -m pip install --pre . # XXX: temporarily install aiohttp prerelease for 3.12; remove --pre flag again later

- name: Run pytest
id: run_tests
Expand Down
1 change: 1 addition & 0 deletions changelog/1117.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Start testing with Python 3.12 in CI.
4 changes: 1 addition & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
"PDM_IGNORE_SAVED_PYTHON": "1",
},
)
# support the python parser in case the native parser isn't available
os.environ.setdefault("LIBCST_PARSER_TYPE", "native")


nox.options.error_on_external_run = True
Expand Down Expand Up @@ -204,7 +202,7 @@ def pyright(session: nox.Session) -> None:
pass


@nox.session(python=["3.8", "3.9", "3.10", "3.11"])
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"])
@nox.parametrize(
"extras",
[
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,19 @@ tools = [
]
codemod = [
# run codemods on the respository (mostly automated typing)
"libcst~=0.4.9",
"libcst~=1.1.0",
"black==23.9.1",
"autotyping==23.2.0",
]
typing = [
# this is not pyright itself, but the python wrapper
"pyright==1.1.291",
"typing-extensions~=4.5.0",
"typing-extensions~=4.8.0",
# only used for type-checking, version does not matter
"pytz",
]
test = [
"pytest~=7.2.1",
"pytest~=7.4.2",
"pytest-cov~=4.0.0",
"pytest-asyncio~=0.20.3",
"looptime~=0.2",
Expand Down Expand Up @@ -120,7 +120,7 @@ runner = "pdm run"

[tool.black]
line-length = 100
target-version = ["py38", "py39", "py310", "py311"]
target-version = ["py38", "py39", "py310", "py311", "py312"]

[tool.isort]
profile = "black"
Expand Down