Skip to content

MAINT: Ensure graceful handling of large header sizes#22393

Merged
mattip merged 1 commit intonumpy:mainfrom
seberg:npy_header
Oct 6, 2022
Merged

MAINT: Ensure graceful handling of large header sizes#22393
mattip merged 1 commit intonumpy:mainfrom
seberg:npy_header

Conversation

@seberg
Copy link
Copy Markdown
Member

@seberg seberg commented Oct 6, 2022

This ensures graceful handling of large header files. Unfortunately, it may be a bit inconvenient for users, thus the new kwarg and the work-around of also accepting allow-pickle.

See also the documation here:
https://docs.python.org/3.10/library/ast.html#ast.literal_eval

@seberg seberg requested a review from mattip October 6, 2022 13:40
@seberg seberg added the 09 - Backport-Candidate PRs tagged should be backported label Oct 6, 2022
@seberg seberg force-pushed the npy_header branch 3 times, most recently from ad1d46a to 635706c Compare October 6, 2022 14:47
Copy link
Copy Markdown
Member

@mattip mattip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Maybe open_memmap could get a kwarg-only *, but not critical.

This ensures graceful handling of large header files.  Unfortunately,
it may be a bit inconvenient for users, thus the new kwarg and the
work-around of also accepting allow-pickle.

See also the documation here:
https://docs.python.org/3.10/library/ast.html#ast.literal_eval
@mattip mattip merged commit 384c13e into numpy:main Oct 6, 2022
@mattip
Copy link
Copy Markdown
Member

mattip commented Oct 6, 2022

Thanks @seberg. Is this going to be backported?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants