Skip to content

test: match Python 3.14's finalizer warnings and report weakref callback errors - #4699

Merged
d-v-b merged 3 commits into
zarr-developers:mainfrom
d-v-b:claude/trusting-kapitsa-e49283
Dec 4, 2026
Merged

d-v-b merged 3 commits into
zarr-developers:mainfrom
d-v-b:claude/trusting-kapitsa-e49283

Conversation

@d-v-b

@d-v-b d-v-b commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Update our regex to catch new text that Python 3.14's uses different text for finalizer warnings, and also catch the text from weakref callback errors

Author attestation

  • I am a human, these are my changes, and I have reviewed and understood every change and can explain why each is correct.

TODO

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/user-guide/*.md
  • Changes documented as a new file in changes/
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

d-v-b added 3 commits December 3, 2026 14:57
Python 3.14 reports an error in a finalizer as "Exception ignored while ..."
where earlier versions say "Exception ignored in: ...". The filters for leaked
event loops, sockets and s3fs sessions did not match the new wording, so on
3.14 such a leak could fail whichever test was running when it was finalized.

Assisted-by: ClaudeCode:claude-opus-5-5
The filter for s3fs sessions that were never entered also ignored every error
in a weakref callback run by the garbage collector on Python 3.14 (except the
free-threaded build), because its "on calling weakref callback" alternative had
no condition on the error. It now requires "Session was never entered" in all
cases.

Assisted-by: ClaudeCode:claude-opus-5-5
@d-v-b
d-v-b merged commit ef24be4 into zarr-developers:main Dec 4, 2026
36 checks passed
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