Repository navigation
MAINT: parse ndarray.flags keys as unicode directly (gh-15317) - #32305
Merged
Merged
Conversation
nakasan617
marked this pull request as draft
August 15, 2026 19:29
nakasan617
force-pushed
the
maint-flagsobject-key-unicode
branch
2 times, most recently
from
August 16, 2026 00:01
e3a1d6c to
37f0fd7
Compare
nakasan617
marked this pull request as ready for review
August 16, 2026 00:16
ngoldbaum
reviewed
Aug 17, 2026
nakasan617
force-pushed
the
maint-flagsobject-key-unicode
branch
from
August 18, 2026 01:30
37f0fd7 to
a5316cf
Compare
nakasan617
marked this pull request as draft
August 18, 2026 01:30
nakasan617
marked this pull request as ready for review
August 18, 2026 01:40
Member
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR summary
This is one of the code that's trying to resolve numpy#15317 which is to take out the code as below
which is all over this repo. This is problematic as
PyUnicode_AsASCIIString(obj);could throw UnicodeEncodeError, which does not describe the issue accurately. In this PR, I'm replacing one for the function getitem to have simply key errors instead of encoding errors. For the function setitem, it would have the exact same behavior, but we're removing thePyUnicode_AsASCIIStringfunction in the code and simplifying the code.AI Disclosure
Code, tests, and release notes are AI-generated (Claude model Opus). PR summaries and comments are mine. I've looked into the code extensively, so I should know what's going on fully.