diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 6a56b47e..1abca4ea 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python 3.11 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.11 - name: Install pre-commit @@ -29,7 +29,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.9"] + python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy-3.9"] exclude: # Do not test all minor versions on all platforms, especially if they # are not the oldest/newest supported versions @@ -50,7 +50,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python_version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python_version }} allow-prereleases: true @@ -91,7 +91,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python_version }} - name: Install project and dependencies @@ -127,7 +127,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python_version }} - name: Install project and dependencies @@ -155,7 +155,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python_version }} - name: Install downstream project and dependencies @@ -180,7 +180,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python_version }} - name: Install project and tests dependencies diff --git a/dev-requirements.txt b/dev-requirements.txt index 933e6909..35c529fe 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -9,7 +9,7 @@ psutil tornado # To be able to test numpy specific things # but do not build numpy from source on Python nightly -numpy >=1.18.5; python_version <= '3.8' +numpy >=1.18.5; python_version <= '3.12' # Code coverage uploader for Travis: codecov coverage diff --git a/tests/cloudpickle_test.py b/tests/cloudpickle_test.py index af5ef3e3..c7daaef2 100644 --- a/tests/cloudpickle_test.py +++ b/tests/cloudpickle_test.py @@ -1506,7 +1506,10 @@ def test_importing_multiprocessing_does_not_impact_whichmodule(self): ) out, _ = proc.communicate() self.assertEqual(proc.wait(), 0) - self.assertEqual(out, b"numpy.core._multiarray_umath\n") + assert out.strip() in ( + b"numpy.core._multiarray_umath", # numpy 1 + b"numpy._core._multiarray_umath", # numpy 2 + ) def test_unrelated_faulty_module(self): # Check that pickling a dynamically defined function or class does not @@ -2484,6 +2487,12 @@ def inner_function(): inner_func = depickled_factory() assert inner_func() == _TEST_GLOBAL_VARIABLE + @pytest.mark.skipif( + sys.version_info < (3, 9), + reason="Can cause CPython 3.8 to segfault", + ) + # TODO: remove this xfail when we drop support for Python 3.8. We don't + # plan to fix it because Python 3.8 is EOL. def test_recursion_during_pickling(self): class A: def __getattribute__(self, name): diff --git a/tox.ini b/tox.ini index 5985d534..a9d3eded 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{38, 39, 310, 311, 312, py3} +envlist = py{38, 39, 310, 311, 312, 313, py3} [testenv] deps = -rdev-requirements.txt