Skip to content

DEP: Undo deprecation for np.dtype() signature used by old pickles (#31177)#31211

Merged
charris merged 2 commits into
numpy:maintenance/2.4.xfrom
charris:backport-31177
Apr 11, 2026
Merged

DEP: Undo deprecation for np.dtype() signature used by old pickles (#31177)#31211
charris merged 2 commits into
numpy:maintenance/2.4.xfrom
charris:backport-31177

Conversation

@charris
Copy link
Copy Markdown
Member

@charris charris commented Apr 11, 2026

Backport of #31177.

Some (very) old pickles pass align=0, copy=1 as integers rather than bools.
This just assumes no user will really do that, and allows it.

It may be possible to also use copyreg to work around it, but since it is a rather specific signature this seems easier/just as well.

(No special tooling)

Closes gh-30786

seberg added 2 commits April 10, 2026 18:12
Some (very) old pickles pass align=0, copy=1 as integers rather than
bools.
This just assumes no user will really do that, and allows it.

It may be possible to also use `copyreg` to work around it, but
since it is a rather specific signature this seems easier/just as
well.
@charris charris added this to the 2.4.5 release milestone Apr 11, 2026
@charris charris added 07 - Deprecation 08 - Backport Used to tag backport PRs labels Apr 11, 2026
@charris charris merged commit b22a613 into numpy:maintenance/2.4.x Apr 11, 2026
74 checks passed
@charris charris deleted the backport-31177 branch April 11, 2026 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

07 - Deprecation 08 - Backport Used to tag backport PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants