Skip to content

MAINT: Ensure correct handling for very large unicode strings #27905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 4, 2024

Conversation

charris
Copy link
Member

@charris charris commented Dec 4, 2024

Backport of #27875.

In the future, we can handle these strings (in parts we already can maybe), but for now have to stick to int length because more of the code needs cleanup to actually use it safely. (For user dtypes this is less of a problem, although corner cases probably exist.)

This adds necessary checks to avoid large unicode dtypes.

@charris charris added 03 - Maintenance 08 - Backport Used to tag backport PRs labels Dec 4, 2024
@charris charris added this to the 2.1.4 release milestone Dec 4, 2024
@charris
Copy link
Member Author

charris commented Dec 4, 2024

The doc build is failing. I am not going to worry about it, as long as the wheels work I'm happy.

EDIT: Fixed last month. I hadn't pulled down the latest upstream updates before making the backport.

In the future, we can handle these strings (in parts we already
can maybe), but for now have to stick to `int` length because
more of the code needs cleanup to actually use it safely.
(For user dtypes this is less of a problem, although corner cases
probably exist.)

This adds necessary checks to avoid large unicode dtypes.
Also add future proof guard, just in case we got a larger string
in addition.
@charris charris merged commit e1964dc into numpy:maintenance/2.1.x Dec 4, 2024
66 checks passed
@charris charris deleted the backport-27875 branch December 4, 2024 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
03 - Maintenance 08 - Backport Used to tag backport PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants