Skip to content

Fix scipy file-object dataset pickling#11347

Open
puneetdixit200 wants to merge 10 commits into
pydata:mainfrom
puneetdixit200:fix/11323-scipy-pickle
Open

Fix scipy file-object dataset pickling#11347
puneetdixit200 wants to merge 10 commits into
pydata:mainfrom
puneetdixit200:fix/11323-scipy-pickle

Conversation

@puneetdixit200
Copy link
Copy Markdown

Description

Closes #11323.

This keeps the scipy file-object netCDF workaround class stable across opens by defining it at module scope again. That avoids replacing the class object that pickle resolves for an already-open dataset when another scipy file object is opened.

The regression test opens two scipy file-object-backed datasets and pickles the first while the second remains open.

Checklist

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.
      Tools: OpenAI GPT-5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

io topic-backends topic-hypothesis Strategies or tests using the hypothesis library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2026.4.0 breaks pickling with backends.scipy_

1 participant