Skip to content

Commit

Permalink
Test on Python 3.12 and PyPy 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Apr 11, 2023
1 parent 4098d73 commit 2f1db06
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 14 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/python_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: "windows-2019"
continue-on-error: ${{ matrix.config.experimental }}
env:
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,pypy-3.6,pypy-3.7,pypy-3.8'
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12.0-alpha.7,pypy-3.6,pypy-3.7,pypy-3.8,pypy-3.9'

strategy:
fail-fast: False
Expand All @@ -33,10 +33,12 @@ jobs:
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
- {python-version: "3.10", testenvs: "py310,build", experimental: False}
- {python-version: "3.11", testenvs: "py311-dev,build", experimental: True}
- {python-version: "3.11", testenvs: "py311,build", experimental: False}
- {python-version: "3.12.0-alpha.7", testenvs: "py312-dev,build", experimental: True}
- {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False}
- {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True}
- {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True}
- {python-version: "pypy-3.9", testenvs: "pypy39", experimental: True}

steps:
- name: Checkout 🛎️
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/python_ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: "ubuntu-20.04"
continue-on-error: ${{ matrix.config.experimental }}
env:
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,pypy-3.6,pypy-3.7,pypy-3.8'
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12.0-alpha.7,pypy-3.6,pypy-3.7,pypy-3.8,pypy-3.9'

strategy:
fail-fast: False
Expand All @@ -34,10 +34,12 @@ jobs:
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
- {python-version: "3.10", testenvs: "py310,build", experimental: False}
- {python-version: "3.11", testenvs: "py311-dev,build", experimental: True}
- {python-version: "3.11", testenvs: "py311,build", experimental: False}
- {python-version: "3.12.0-alpha.7", testenvs: "py312-dev,build", experimental: True}
- {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False}
- {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True}
- {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True}
- {python-version: "pypy-3.9", testenvs: "pypy39", experimental: True}

steps:
- name: Checkout 🛎️
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/python_ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: "macos-latest"
continue-on-error: ${{ matrix.config.experimental }}
env:
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,pypy-3.7,pypy-3.8'
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12.0-alpha.7,pypy-3.7,pypy-3.8,pypy-3.9'

strategy:
fail-fast: False
Expand All @@ -33,9 +33,11 @@ jobs:
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
- {python-version: "3.10", testenvs: "py310,build", experimental: False}
- {python-version: "3.11", testenvs: "py311-dev,build", experimental: True}
- {python-version: "3.11", testenvs: "py311,build", experimental: False}
- {python-version: "3.12.0-alpha.7", testenvs: "py312-dev,build", experimental: True}
- {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True}
- {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True}
- {python-version: "pypy-3.9", testenvs: "pypy39", experimental: True}

steps:
- name: Checkout 🛎️
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
Expand Down Expand Up @@ -135,7 +136,7 @@ base-classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
python-versions = [ "3.6", "3.7", "3.8", "3.9", "3.10",]
python-versions = [ "3.6", "3.7", "3.8", "3.9", "3.10", "3.11",]
python-implementations = [ "CPython", "PyPy",]
platforms = [ "Windows", "macOS", "Linux",]
license-key = "MIT"
Expand Down
4 changes: 3 additions & 1 deletion repo_helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ python_versions:
- '3.8'
- '3.9'
- "3.10"
- 3.11-dev
- "3.11"
- 3.12-dev
- pypy36
- pypy37
- pypy38
- pypy39

classifiers:
- 'Development Status :: 4 - Beta'
Expand Down
11 changes: 7 additions & 4 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import datetime
import os
import pathlib
import sys
from collections import OrderedDict
from decimal import Decimal
from typing import Any, Dict, MutableMapping
Expand Down Expand Up @@ -212,10 +213,12 @@ def test_decimal():
with pytest.raises(TypeError, match="expected str, bytes or os.PathLike object, not list"):
load([]) # type: ignore[call-overload]

with pytest.raises(
TypeError,
match="argument should be a str object or an os.PathLike object returning str, not <class 'bytes'>"
):
if sys.version_info < (3, 12):
error_msg = "argument should be a str object or an os.PathLike object returning str, not <class 'bytes'>"
else:
error_msg = "argument should be a str or an os.PathLike object where __fspath__ returns a str, not 'bytes"

with pytest.raises(TypeError, match=error_msg):
load(b"test.toml") # type: ignore[call-overload]


Expand Down
22 changes: 20 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ envlist =
py38
py39
py310
py311-dev
py311
py312-dev
pypy36
pypy37
pypy38
pypy39
mypy
build
skip_missing_interpreters = True
Expand All @@ -40,7 +42,18 @@ requires =
virtualenv!=20.16.0

[envlists]
test = py36, py37, py38, py39, py310, py311-dev, pypy36, pypy37, pypy38
test =
py36
py37
py38
py39
py310
py311
py312-dev
pypy36
pypy37
pypy38
pypy39
qa = mypy, lint
cov = py38, coverage

Expand All @@ -59,6 +72,11 @@ setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1

[testenv:py312-dev]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1

[testenv:docs]
setenv = SHOW_TODOS = 1
passenv = SPHINX_BUILDER
Expand Down

0 comments on commit 2f1db06

Please sign in to comment.