Skip to content

Update vendored cloudpickle tests to v3.1.2 - #126

Merged
honnibal merged 3 commits into
v2.xfrom
fix/cloudpickle-tests
Sep 27, 2026
Merged

honnibal merged 3 commits into
v2.xfrom
fix/cloudpickle-tests

Conversation

@honnibal

Copy link
Copy Markdown
Member

The vendored cloudpickle was updated to 3.1.2 in a10431b, but its tests were still the v2.2.0 copies. They import the removed srsly.cloudpickle.compat module and fail to collect, so CI on v2.x is currently red on every Python version.

  • Re-vendor the tests from upstream v3.1.2 (same file set as before), with imports rewritten to srsly.cloudpickle and srsly.tests.cloudpickle.testutils.
  • Local adaptations for how srsly's CI runs pytest:
    • skip the two stdout/stderr pickling tests, which need pytest -s (upstream sets addopts = -s)
    • ignore the itertools pickling DeprecationWarning in test_itertools_count, since CI runs with -Werror
    • skip the memory-leak test on macOS, where upstream notes its 50MB bound is tight (it failed 4 of 12 local runs)
  • Ship the mock_local_folder fixture in the sdist. It isn't a package, so find_packages skipped it and a test failed when installed from the sdist, as CI does.

Tested with the CI flow (sdist install, pytest --pyargs srsly -Werror) on Python 3.9–3.14, three runs each, together with the other pending v2.x fixes.

Closes #121.

🤖 Generated with Claude Code

honnibal and others added 3 commits September 27, 2026 12:04
The vendored cloudpickle was updated to 3.1.2 in a10431b, but its tests
were still the v2.2.0 copies, which import the removed
srsly.cloudpickle.compat module and fail to collect. Re-vendor the tests
from upstream v3.1.2 (same file set as before), rewriting imports to
srsly.cloudpickle and srsly.tests.cloudpickle.testutils.

Local adaptations, both for how srsly's CI runs pytest:
- Skip the two stdout/stderr pickling tests, which need `pytest -s`
  (upstream sets addopts = -s).
- Ignore the itertools pickling DeprecationWarning in
  test_itertools_count, since CI runs with -Werror.

Closes #121.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It isn't a package, so find_packages skips it, and the cloudpickle
by-value pickling test fails when srsly is installed from the sdist, as
CI does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Upstream notes the 50MB growth bound is only tight on macOS (~1MB on
Linux). Locally it exceeded the bound in 4 of 12 runs. It still runs on
Linux and Windows.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@honnibal
honnibal merged commit c042474 into v2.x Sep 27, 2026
8 checks passed
This was referenced Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant