You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a unit test failure with Python 3.9 (as observed on Fedora 33 and on Debian Unstable).
__ test_numeric_chars_contains_all_valid_unicode_numeric_and_digit_characters __
def test_numeric_chars_contains_all_valid_unicode_numeric_and_digit_characters():
set_numeric_hex = set(numeric_hex)
set_numeric_chars = set(numeric_chars)
set_digit_chars = set(digit_chars)
set_decimal_chars = set(decimal_chars)
for i in range(0X110000):
try:
a = chr(i)
except ValueError:
break
if a in "0123456789":
continue
if unicodedata.numeric(a, None) is not None:
> assert i in set_numeric_hex
E assert 69573 in {178, 179, 185, 188, 189, 190, ...}
tests/test_unicode_numbers.py:49: AssertionError
Doing a little bit of debugging, indeed on Python < 3.9, unicodedata.numeric(chr(69573)) throws a ValueError, while on Python 3.9, it returns 1.0. Thus, it seems that new numeric hex value(s) have been added in Python 3.9? Is the solution to add 0x10FC5 to unicode_numeric_hex.py, but will that break things on older Pythons?
The text was updated successfully, but these errors were encountered:
swt2c
added a commit
to swt2c/natsort
that referenced
this issue
Nov 3, 2020
Yeah, an update like this is expected with each Python minor release since new valid unicode characters get added - #104 was the merge request for when Python 3.8 was released.
There is a unit test failure with Python 3.9 (as observed on Fedora 33 and on Debian Unstable).
Doing a little bit of debugging, indeed on Python < 3.9,
unicodedata.numeric(chr(69573))
throws a ValueError, while on Python 3.9, it returns1.0
. Thus, it seems that new numeric hex value(s) have been added in Python 3.9? Is the solution to add0x10FC5
tounicode_numeric_hex.py
, but will that break things on older Pythons?The text was updated successfully, but these errors were encountered: