-
Notifications
You must be signed in to change notification settings - Fork 6
Description
related: #45
pydantic has fully stopped development for v1, which itself is not an issue. however they've dropped any core existing functionality for python versions 3.14:
Pydantic V1 core functionality will not work properly with Python 3.14 or greater. As such, Python 3.13 is the latest supported Python version for V1.
this has caused any libraries still using v1 to crash on import, which is reported in various threads such as pydantic/pydantic#12363 .
this failure is also reproducible for the current permit sdk
❯ python3
Python 3.14.3 (main, Feb 3 2026, 15:32:20) [Clang 17.0.0 (clang-1700.6.3.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import permit
pydantic.v1.errors.ConfigError: unable to infer type for attribute "token"
❯ python3
Python 3.14.3 (main, Feb 3 2026, 15:32:20) [Clang 17.0.0 (clang-1700.6.3.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import permit
pydantic.v1.errors.ConfigError: unable to infer type for attribute "token"
❯ python3
Python 3.14.3 (main, Feb 3 2026, 15:32:20) [Clang 17.0.0 (clang-1700.6.3.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import permit
/Users/james/src/my-project/.venv/lib/python3.14/site-packages/permit/api/models.py:17: UserWarning: Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater.
from pydantic.v1 import AnyUrl, BaseModel, EmailStr, Extra, Field, conint, constr # type: ignore
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
import permit
File "/Users/james/src/my-project/.venv/lib/python3.14/site-packages/permit/__init__.py", line 3, in <module>
from .config import PermitConfig
File "/Users/james/src/my-project/.venv/lib/python3.14/site-packages/permit/config.py", line 38, in <module>
class PermitConfig(BaseModel):
...<38 lines>...
arbitrary_types_allowed = True
File "/Users/james/src/my-project/.venv/lib/python3.14/site-packages/pydantic/v1/main.py", line 221, in __new__
inferred = ModelField.infer(
name=var_name,
...<3 lines>...
config=config,
)
File "/Users/james/src/my-project/.venv/lib/python3.14/site-packages/pydantic/v1/fields.py", line 504, in infer
return cls(
name=name,
...<7 lines>...
field_info=field_info,
)
File "/Users/james/src/my-project/.venv/lib/python3.14/site-packages/pydantic/v1/fields.py", line 434, in __init__
self.prepare()
~~~~~~~~~~~~^^
File "/Users/james/src/my-project/.venv/lib/python3.14/site-packages/pydantic/v1/fields.py", line 544, in prepare
self._set_default_and_type()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/Users/james/src/my-project/.venv/lib/python3.14/site-packages/pydantic/v1/fields.py", line 576, in _set_default_and_type
raise errors_.ConfigError(f'unable to infer type for attribute "{self.name}"')
pydantic.v1.errors.ConfigError: unable to infer type for attribute "token"
we want to be on latest supported python (3.14) with our web app, so i think we'll be falling back to httpx with our permit calls in the meantime. sorry for raising this issue without making a proposed PR to fix the core underlying issue. i'm not sure now critical v1 is to the sdk's dependencies.
perhaps, in the meantime, add a pydantic <= 2.11.0 upper bound to the requirements?