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 None
Actual 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: None
Expected Results
Reproducibility
👍
Additional Information
Arguably, the previous behaviour was useful. However, if this breaking change is intentional, the type annotation should be adjusted accordingly.