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

Added support for python 3.10, 3.11 and 3.12. #315

Merged
merged 12 commits into from
Oct 10, 2023
Merged
9 changes: 7 additions & 2 deletions .github/workflows/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion noxfile-requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 4 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"}},
Expand Down
11 changes: 0 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading