-
Notifications
You must be signed in to change notification settings - Fork 468
Closed
Labels
Description
Overview Description
Locale.parse() no longer accepts None as the locale identifier, contrary to the type annotation.
Steps to Reproduce
>>> from babel import Locale
>>> Locale.parse(None) is NoneActual Results
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/env/lib/python3.8/site-packages/babel/core.py", line 317, in parse
raise TypeError(f"Unexpected value for identifier: {identifier!r}")
TypeError: Unexpected value for identifier: NoneExpected Results
TrueReproducibility
👍
Additional Information
Arguably, the previous behaviour was useful. However, if this breaking change is intentional, the type annotation should be adjusted accordingly.
Reactions are currently unavailable