diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 14778882..ac5e2557 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -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", "3.13", "3.14", "pypy-3.9"] + python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "pypy-3.12"] exclude: # Do not test all minor versions on all platforms, especially if they # are not the oldest/newest supported versions @@ -37,13 +37,13 @@ jobs: python_version: 3.8 # as of 4/02/2020, psutil won't build under PyPy + Windows - os: windows-latest - python_version: "pypy-3.9" + python_version: "pypy-3.12" - os: macos-latest python_version: 3.8 - os: macos-latest # numpy triggers: RuntimeError: Polyfit sanity test emitted a # warning - python_version: "pypy-3.9" + python_version: "pypy-3.12" runs-on: ${{ matrix.os }} diff --git a/cloudpickle/cloudpickle.py b/cloudpickle/cloudpickle.py index 08882306..7ac3bf61 100644 --- a/cloudpickle/cloudpickle.py +++ b/cloudpickle/cloudpickle.py @@ -1339,7 +1339,7 @@ def __init__(self, file, protocol=None, buffer_callback=None): self.globals_ref = {} self.proto = int(protocol) - if not PYPY: + if not hasattr(pickle.Pickler, "dispatch"): # pickle.Pickler is the C implementation of the CPython pickler and # therefore we rely on reduce_override method to customize the pickler # behavior.