Skip to content

Commit

Permalink
Set UNSAFE_PYO3_SKIP_VERSION_CHECK=1 for Python 3.13 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Apr 30, 2024
1 parent 3cf80db commit fee5cc5
Show file tree
Hide file tree
Showing 22 changed files with 170 additions and 41 deletions.
3 changes: 3 additions & 0 deletions repo_helper/files/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,9 @@ def testenv_py312_dev(self) -> None:
for fixup_version in ["3.12-dev", "3.12", "3.13-dev"]:
if fixup_version in self["python_versions"]:
setenv = self.get_setenv(False, False)
if fixup_version.startswith("3.13"):
setenv.append("UNSAFE_PYO3_SKIP_VERSION_CHECK=1")

env_name = f"testenv:py{fixup_version.replace('.', '')}"
if env_name in self._ini:
self._ini[env_name]["setenv"] = indent_join(setenv)
Expand Down
7 changes: 4 additions & 3 deletions tests/test_files/test_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ def set_globals(
demo_environment.globals["mypy_deps"] = list(mypy_deps)
demo_environment.globals["mypy_version"] = mypy_version
demo_environment.globals["python_versions"] = {
"py36": {"experimental": False},
"py37": {"experimental": False},
"py38": {"experimental": False},
"3.6": {"experimental": False},
"3.7": {"experimental": False},
"3.8": {"experimental": False},
"3.13-dev": {"experimental": True},
}
demo_environment.globals["tox_requirements"] = list(tox_requirements)
demo_environment.globals["tox_build_requirements"] = list(tox_build_requirements)
Expand Down
12 changes: 12 additions & 0 deletions tests/test_files/test_testing_/test_make_tox_matrix.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ envlist =
py36-attrs{19.3,20.1,20.2,latest}
py37-attrs{19.3,20.1,20.2,latest}
py38-attrs{19.3,20.1,20.2,latest}
py313-dev-attrs{19.3,20.1,20.2,latest}
mypy
build
skip_missing_interpreters = True
Expand All @@ -40,6 +41,7 @@ test =
py36-attrs{19.3,20.1,20.2,latest}
py37-attrs{19.3,20.1,20.2,latest}
py38-attrs{19.3,20.1,20.2,latest}
py313-dev-attrs{19.3,20.1,20.2,latest}
qa = mypy, lint
cov = py36-attrs19.3, coverage

Expand All @@ -60,6 +62,11 @@ commands =
[testenv:.package]
setenv = PIP_DISABLE_PIP_VERSION_CHECK=1

[testenv:py313-dev]
setenv =
PIP_DISABLE_PIP_VERSION_CHECK=1
UNSAFE_PYO3_SKIP_VERSION_CHECK=1

[testenv:build]
setenv =
PIP_DISABLE_PIP_VERSION_CHECK=1
Expand Down Expand Up @@ -198,3 +205,8 @@ toplevel = hello_world.py
[pytest]
addopts = --color yes --durations 25
timeout = 300
[testenv:py313-dev-attrs{19.3,20.1,20.2,latest}]
setenv =
PIP_DISABLE_PIP_VERSION_CHECK=1
UNSAFE_PYO3_SKIP_VERSION_CHECK=1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# * pytest

[tox]
envlist = py36, py37, py38, mypy, build
envlist = py36, py37, py38, py313-dev, mypy, build
skip_missing_interpreters = True
isolated_build = True
requires =
Expand All @@ -31,7 +31,7 @@ requires =
virtualenv!=20.16.0

[envlists]
test = py36, py37, py38
test = py36, py37, py38, py313-dev
qa = mypy, lint
cov = py36, coverage

Expand All @@ -50,6 +50,12 @@ setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1

[testenv:py313-dev]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
UNSAFE_PYO3_SKIP_VERSION_CHECK=1

[testenv:docs]
setenv = SHOW_TODOS = 1
passenv = SPHINX_BUILDER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# * pytest

[tox]
envlist = py36, py37, py38, mypy, build
envlist = py36, py37, py38, py313-dev, mypy, build
skip_missing_interpreters = True
isolated_build = True
requires =
Expand All @@ -31,7 +31,7 @@ requires =
virtualenv!=20.16.0

[envlists]
test = py36, py37, py38
test = py36, py37, py38, py313-dev
qa = mypy, lint
cov = py36, coverage

Expand All @@ -47,6 +47,11 @@ commands =
[testenv:.package]
setenv = PIP_DISABLE_PIP_VERSION_CHECK=1

[testenv:py313-dev]
setenv =
PIP_DISABLE_PIP_VERSION_CHECK=1
UNSAFE_PYO3_SKIP_VERSION_CHECK=1

[testenv:docs]
setenv = SHOW_TODOS = 1
passenv = SPHINX_BUILDER
Expand Down
10 changes: 8 additions & 2 deletions tests/test_files/test_testing_/test_tox_enable_docs_docs_.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# * pytest

[tox]
envlist = py36, py37, py38, mypy, build
envlist = py36, py37, py38, py313-dev, mypy, build
skip_missing_interpreters = True
isolated_build = True
requires =
Expand All @@ -31,7 +31,7 @@ requires =
virtualenv!=20.16.0

[envlists]
test = py36, py37, py38
test = py36, py37, py38, py313-dev
qa = mypy, lint
cov = py36, coverage

Expand All @@ -50,6 +50,12 @@ setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1

[testenv:py313-dev]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
UNSAFE_PYO3_SKIP_VERSION_CHECK=1

[testenv:docs]
setenv = SHOW_TODOS = 1
passenv = SPHINX_BUILDER
Expand Down
10 changes: 8 additions & 2 deletions tests/test_files/test_testing_/test_tox_enable_docs_no_docs_.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# * pytest

[tox]
envlist = py36, py37, py38, mypy, build
envlist = py36, py37, py38, py313-dev, mypy, build
skip_missing_interpreters = True
isolated_build = True
requires =
Expand All @@ -31,7 +31,7 @@ requires =
virtualenv!=20.16.0

[envlists]
test = py36, py37, py38
test = py36, py37, py38, py313-dev
qa = mypy, lint
cov = py36, coverage

Expand All @@ -50,6 +50,12 @@ setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1

[testenv:py313-dev]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
UNSAFE_PYO3_SKIP_VERSION_CHECK=1

[testenv:build]
setenv =
PYTHONDEVMODE=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# * pytest

[tox]
envlist = py36, py37, py38, mypy, build
envlist = py36, py37, py38, py313-dev, mypy, build
skip_missing_interpreters = True
isolated_build = True
requires =
Expand All @@ -28,7 +28,7 @@ requires =
virtualenv!=20.16.0

[envlists]
test = py36, py37, py38
test = py36, py37, py38, py313-dev
qa = mypy, lint

[testenv]
Expand All @@ -46,6 +46,12 @@ setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1

[testenv:py313-dev]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
UNSAFE_PYO3_SKIP_VERSION_CHECK=1

[testenv:docs]
setenv = SHOW_TODOS = 1
passenv = SPHINX_BUILDER
Expand Down
10 changes: 8 additions & 2 deletions tests/test_files/test_testing_/test_tox_enable_tests_tests_.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# * pytest

[tox]
envlist = py36, py37, py38, mypy, build
envlist = py36, py37, py38, py313-dev, mypy, build
skip_missing_interpreters = True
isolated_build = True
requires =
Expand All @@ -31,7 +31,7 @@ requires =
virtualenv!=20.16.0

[envlists]
test = py36, py37, py38
test = py36, py37, py38, py313-dev
qa = mypy, lint
cov = py36, coverage

Expand All @@ -50,6 +50,12 @@ setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1

[testenv:py313-dev]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
UNSAFE_PYO3_SKIP_VERSION_CHECK=1

[testenv:docs]
setenv = SHOW_TODOS = 1
passenv = SPHINX_BUILDER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# * pytest

[tox]
envlist = py36, py37, py38, mypy, build
envlist = py36, py37, py38, py313-dev, mypy, build
skip_missing_interpreters = True
isolated_build = True
requires =
Expand All @@ -31,7 +31,7 @@ requires =
virtualenv!=20.16.0

[envlists]
test = py36, py37, py38
test = py36, py37, py38, py313-dev
qa = mypy, lint
cov = py36, coverage

Expand All @@ -50,6 +50,12 @@ setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1

[testenv:py313-dev]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
UNSAFE_PYO3_SKIP_VERSION_CHECK=1

[testenv:docs]
setenv = SHOW_TODOS = 1
passenv = SPHINX_BUILDER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# * pytest

[tox]
envlist = py36, py37, py38, mypy, build
envlist = py36, py37, py38, py313-dev, mypy, build
skip_missing_interpreters = True
isolated_build = True
requires =
Expand All @@ -31,7 +31,7 @@ requires =
virtualenv!=20.16.0

[envlists]
test = py36, py37, py38
test = py36, py37, py38, py313-dev
qa = mypy, lint
cov = py36, coverage

Expand All @@ -50,6 +50,12 @@ setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1

[testenv:py313-dev]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
UNSAFE_PYO3_SKIP_VERSION_CHECK=1

[testenv:docs]
setenv = SHOW_TODOS = 1
passenv = SPHINX_BUILDER
Expand Down
10 changes: 8 additions & 2 deletions tests/test_files/test_testing_/test_tox_mypy_version_0_782_.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# * pytest

[tox]
envlist = py36, py37, py38, mypy, build
envlist = py36, py37, py38, py313-dev, mypy, build
skip_missing_interpreters = True
isolated_build = True
requires =
Expand All @@ -31,7 +31,7 @@ requires =
virtualenv!=20.16.0

[envlists]
test = py36, py37, py38
test = py36, py37, py38, py313-dev
qa = mypy, lint
cov = py36, coverage

Expand All @@ -50,6 +50,12 @@ setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1

[testenv:py313-dev]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
UNSAFE_PYO3_SKIP_VERSION_CHECK=1

[testenv:docs]
setenv = SHOW_TODOS = 1
passenv = SPHINX_BUILDER
Expand Down
10 changes: 8 additions & 2 deletions tests/test_files/test_testing_/test_tox_mypy_version_0_790_.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# * pytest

[tox]
envlist = py36, py37, py38, mypy, build
envlist = py36, py37, py38, py313-dev, mypy, build
skip_missing_interpreters = True
isolated_build = True
requires =
Expand All @@ -31,7 +31,7 @@ requires =
virtualenv!=20.16.0

[envlists]
test = py36, py37, py38
test = py36, py37, py38, py313-dev
qa = mypy, lint
cov = py36, coverage

Expand All @@ -50,6 +50,12 @@ setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1

[testenv:py313-dev]
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
UNSAFE_PYO3_SKIP_VERSION_CHECK=1

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

0 comments on commit fee5cc5

Please sign in to comment.