jaraco / inflect

Correctly generate plurals, ordinals, indefinite articles; convert numbers to words
https://pypi.org/project/inflect
MIT License
957 stars 107 forks source link

Fix ImportError in pydantic v2 #189

Closed 101med closed 1 year ago

101med commented 1 year ago

Fix cannot import name 'Annotated' from 'pydantic.typing'

Closes #187

jaraco commented 1 year ago

This fix appears to be incompatible with Python 3.8 and maybe later.

jaraco commented 1 year ago

This PR also fails on Python 3.11 with the following failures:

FAILED docs/conf.py::mypy-status
FAILED inflect/__init__.py::mypy
FAILED inflect/__init__.py::inflect.engine.compare
FAILED tests/test_inflections.py::test_ordinal - pydantic_core._pydantic_core.ValidationError: 1 validation error for Ordinal
FAILED tests/test_pwd.py::test::test_inflect - pydantic_core._pydantic_core.ValidationError: 1 validation error for Ordinal
FAILED tests/test_pwd.py::test::test_user_input_fns - pydantic_core._pydantic_core.ValidationError: 1 validation error for UdMatch
jaraco commented 1 year ago

Superseded by #190.