Python 3.14 compat#5493
Merged
Merged
Conversation
This avoids breakage with Python 3.14 which changes the string representation of unions from `typing.Union[a,b]` to `a | b`. Signed-off-by: Danila Fedorin <daniel.fedorin@hpe.com>
Also adds a script for re-generating update_numeric_unicodes.py Signed-off-by: Danila Fedorin <daniel.fedorin@hpe.com>
Signed-off-by: Danila Fedorin <daniel.fedorin@hpe.com>
Signed-off-by: Danila Fedorin <daniel.fedorin@hpe.com>
23c17cd to
5af16f3
Compare
5af16f3 to
664f91a
Compare
jabraham17
approved these changes
May 19, 2026
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.
The individual commits describe the changes pretty well.
typing.Union. In Python 3.14, seems like this was switched to just|for disjunction. Instead of relying on strings, add a new helper that explicitly interrogates a type to ensure it's a union with the right elements.numeric. Python 3.14 updates to a newer Unicode, with morenumericcharacters. Arkouda's own unicode tables do not include those, so the test, which expected Arkouda to concur that strings that Python considers numeric are, indeed, numeric, fails. To fix, update the Unicode tables to match Python 3.14's. This is a purely additive change, and is therefore backwards compatible: strings consider by Python 3.13 to be numeric are still numeric, and strings that AREN'T numeric are made from inserting alphabetic characters, which are still not numeric. Also, add a script based onchapel.replaceto auto-generate new Unicodenumerictables using Python as reference. I used this script for this change.chplcheck2.8 included a newUnattachedCurlyrule that enforces curly braces on the same line asif/else. This failed 9 times and only in one file, so I updated the file to match the conventions of the rest of Arkouda.Reviewed by @jabraham17 -- thanks!