Skip to content

Commit

Permalink
Add Python 3.12 to tests and CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzymadness committed Oct 30, 2023
1 parent 0c98732 commit 4612252
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ jobs:
py311-pip213,
py311-piplatest,
py311-pipgit,
py312-pip192,
py312-pip193,
py312-pip203,
py312-pip213,
py312-piplatest,
py312-pipgit,
mypy,
]

Expand Down
9 changes: 9 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import pytest
import os
import subprocess
import sys
from tempfile import TemporaryDirectory

try:
Expand Down Expand Up @@ -51,6 +52,14 @@ def _venv_install_pip(venv):

if MICROPIPENV_TEST_SETUPTOOLS_VERSION is not None:
venv.install(f"setuptools{MICROPIPENV_TEST_SETUPTOOLS_VERSION}")
elif sys.version_info >= (3, 12):
# pytest-venv does not work with Python 3.12
# because it uses pkg_resources in venv but
# setuptools is not in the venv by default for 3.12+
# This branch can be removed when
# https://github.com/mmerickel/pytest-venv/issues/5
# is fixed and released
venv.install("setuptools")


def _venv_get_version_or_none(self, package):
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ envlist =
py310-pip{latest,git}-pytoml
py310-pip{latest,git}-tomli
py311-pip{192,193,203,213,latest,git}
py312-pip{192,193,203,213,latest,git}
mypy

[testenv]
Expand Down

0 comments on commit 4612252

Please sign in to comment.