diff --git a/.github/workflows/base.yml b/.github/workflows/base.yml index 18d199ab..716d8725 100644 --- a/.github/workflows/base.yml +++ b/.github/workflows/base.yml @@ -68,12 +68,17 @@ jobs: allow-build: info cache-build: true - - name: Install python 3.9 for nox + - name: Install python 3.12 for nox uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.12 architecture: x64 + - name: pin virtualenv==20.15.1 in old python versions + # pinned to keep compatibility with old versions, see https://github.com/MatteoH2O1999/setup-python/issues/28#issuecomment-1745613621 + if: contains(fromJson('["2.7", "3.5", "3.6"]'), matrix.nox_session.python ) + run: sed -i "s/virtualenv/virtualenv==20.15.1/g" noxfile-requirements.txt + - name: Install noxfile requirements run: pip install -r noxfile-requirements.txt diff --git a/docs/changelog.md b/docs/changelog.md index 01856108..f60fb16d 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,12 @@ # Changelog +### 3.7.0 - python 3.12 + + - Added official support for Python 3.10, 3.11 and 3.12. Fixes [#314](https://github.com/smarie/python-pytest-cases/issues/314) + - Fixed `ModuleNotFoundError: distutils` on Python 3.12 thanks to `packaging`. PR + [#312](https://github.com/smarie/python-pytest-cases/pull/312) by [@jayqi](https://github.com/jayqi). + - Internal: switched to virtualenv backend. + ### 3.6.14 - bugfixes - Fixed `AttributeError` issue in `is_case_function` when an inspected symbol is a parametrized type hint diff --git a/noxfile-requirements.txt b/noxfile-requirements.txt index 60a2ce29..3b4ab32a 100644 --- a/noxfile-requirements.txt +++ b/noxfile-requirements.txt @@ -1,4 +1,4 @@ -virtualenv==20.15.1 # pinned to keep compatibility with old versions, see https://github.com/MatteoH2O1999/setup-python/issues/28#issuecomment-1745613621 +virtualenv nox toml makefun diff --git a/noxfile.py b/noxfile.py index e5f7cfaf..18b2cbb6 100644 --- a/noxfile.py +++ b/noxfile.py @@ -10,7 +10,7 @@ # add parent folder to python path so that we can import noxfile_utils.py # note that you need to "pip install -r noxfile-requiterements.txt" for this file to work. sys.path.append(str(Path(__file__).parent / "ci_tools")) -from nox_utils import PY27, PY37, PY36, PY35, PY38, PY39, PY310, power_session, rm_folder, rm_file, PowerSession, DONT_INSTALL # noqa +from nox_utils import PY27, PY37, PY36, PY35, PY38, PY39, PY310, PY311, PY312, power_session, rm_folder, rm_file, PowerSession, DONT_INSTALL # noqa pkg_name = "pytest_cases" @@ -19,8 +19,9 @@ ENVS = { - # python 3.10 is not available on conda yet - # (PY310, "pytest-latest"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": ""}}, + (PY312, "pytest-latest"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": ""}}, + (PY311, "pytest-latest"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": ""}}, + (PY310, "pytest-latest"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": ""}}, # python 3.9 - put first to detect easy issues faster. (PY39, "pytest-latest"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": ""}}, (PY39, "pytest6.x"): {"coverage": False, "pkg_specs": {"pip": ">19", "pytest": "<7"}}, diff --git a/pyproject.toml b/pyproject.toml index 8ed17bdb..056a1e44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,14 +8,3 @@ build-backend = "setuptools.build_meta" # pip: no ! does not work in old python 2.7 and not recommended here # https://setuptools.readthedocs.io/en/latest/userguide/quickstart.html#basic-use - -[tool.conda] -# Declare that the following packages should be installed with conda instead of pip -# Note: this includes packages declared everywhere, here and in setup.cfg -conda_packages = [ - "setuptools", - "wheel", - "pip", - # "pytest", -] -# pytest: not with conda ! does not work in old python 2.7 and 3.5