Skip to content

Commit

Permalink
Merge branch 'test-with-cpython-3.13' into py313b1
Browse files Browse the repository at this point in the history
  • Loading branch information
ogrisel committed Jul 31, 2024
2 parents 3c300a0 + 103f9ec commit 05b5c82
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 10 additions & 1 deletion tests/cloudpickle_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 05b5c82

Please sign in to comment.