Skip to content

Commit

Permalink
Declare support for Python 3.12 (#103)
Browse files Browse the repository at this point in the history
* Declare support for Python 3.12

* nox: temporarily set AIOHTTP_NO_EXTENSIONS for 3.12
  • Loading branch information
gotmax23 committed Oct 5, 2023
1 parent 1eac010 commit 0ad5aed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Setup nox
uses: wntrblm/nox@2023.04.22
with:
python-versions: "3.9, 3.10, 3.11"
python-versions: "3.9, 3.10, 3.11, 3.12"
- name: Run unit tests
run: |
nox -v -e test
Expand Down
8 changes: 6 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@ def install(session: nox.Session, *args, editable=False, **kwargs):
# This ensures that the wheel contains all of the correct files.
if editable and ALLOW_EDITABLE:
args = ("-e", *args)
# TODO: Remove this once aiohttp's extension module supports Python 3.12
if session.python == "3.12":
kwargs.setdefault("env", {})["AIOHTTP_NO_EXTENSIONS"] = "1"

session.install(*args, "-U", **kwargs)


@nox.session(python=["3.9", "3.10", "3.11"])
@nox.session(python=["3.9", "3.10", "3.11", "3.12"])
def test(session: nox.Session):
install(
session,
Expand All @@ -42,7 +46,7 @@ def test(session: nox.Session):
)
covfile = Path(session.create_tmp(), ".coverage")
more_args = []
if session.python == "3.11":
if session.python == "3.12":
more_args.append("--error-for-skips")
session.run(
"pytest",
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Typing :: Typed",
]
requires-python = ">=3.9"
Expand Down

0 comments on commit 0ad5aed

Please sign in to comment.