diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 207dc9b717c..14718ddcb6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,6 +114,7 @@ jobs: - "3.10" - "3.11" - "3.12" + - "3.13" steps: - uses: actions/checkout@v4 @@ -167,7 +168,8 @@ jobs: # - "3.9" # - "3.10" # - "3.11" - - "3.12" + - "3.12" # Comment out when 3.13 is final + - "3.13" group: [1, 2] steps: @@ -175,6 +177,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} + allow-prereleases: true # We use C:\Temp (which is already available on the worker) # as a temporary directory for all of the tests because the diff --git a/news/12620.trivial.rst b/news/12620.trivial.rst new file mode 100644 index 00000000000..52fa571ed17 --- /dev/null +++ b/news/12620.trivial.rst @@ -0,0 +1 @@ +Enable Python 3.13 CI tests diff --git a/noxfile.py b/noxfile.py index dc74654da53..92d0e243838 100644 --- a/noxfile.py +++ b/noxfile.py @@ -67,7 +67,7 @@ def should_update_common_wheels() -> bool: # ----------------------------------------------------------------------------- # Development Commands # ----------------------------------------------------------------------------- -@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3"]) +@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3"]) def test(session: nox.Session) -> None: # Get the common wheels. if should_update_common_wheels(): diff --git a/tests/requirements.txt b/tests/requirements.txt index 5ecb21f6bf6..7fba866c745 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,3 +1,4 @@ +cffi @ https://github.com/python-cffi/cffi/archive/refs/heads/main.zip; python_version > "3.12" # Temporary workaround for Python 3.13 until next CFFI release cryptography freezegun installer diff --git a/tests/unit/test_cache.py b/tests/unit/test_cache.py index d0fee69c39b..30cdb6ebece 100644 --- a/tests/unit/test_cache.py +++ b/tests/unit/test_cache.py @@ -13,11 +13,11 @@ def test_falsey_path_none() -> None: assert wc.cache_dir is None -def test_subdirectory_fragment() -> None: +def test_subdirectory_fragment(tmp_path: Path) -> None: """ Test the subdirectory URL fragment is part of the cache key. """ - wc = WheelCache("/tmp/.foo/") + wc = WheelCache(os.fspath(tmp_path)) link1 = Link("git+https://g.c/o/r#subdirectory=d1") link2 = Link("git+https://g.c/o/r#subdirectory=d2") assert wc.get_path_for_link(link1) != wc.get_path_for_link(link2)