Context
snowflake-cli currently pins pydantic==2.12.5 exactly in pyproject.toml. This is fine for standard pip/uv installs where pydantic is installed in an isolated environment.
However, it blocks packaging in distributions that manage Python dependencies globally (nixpkgs, Debian, Fedora, etc.), where pydantic is a shared package at a different version. nixpkgs currently ships pydantic 2.13.4, which makes it impossible to package snowflake-cli without either:
- Overriding pydantic to 2.12.5 system-wide (breaks other packages depending on 2.13+)
- Keeping snowflake-cli stuck at 3.13.1 (last version compatible without override)
Root cause
UpdatableModel.__init_subclass__ dynamically injects field_validator(mode="wrap") validators via setattr. This mechanism breaks with pydantic >= 2.13 due to a behavioral change in how dynamically added wrap validators interact with statically declared before/after validators on the same field.
The failing tests (all in tests/api/project/schemas/test_updatable_model.py) confirm this is a compatibility issue with pydantic >= 2.13, not a general breakage.
Request
Either:
-
Relax the pin to pydantic>=2.12.5,<3 and fix the pydantic 2.13 compatibility in UpdatableModel — this would unblock distribution packaging and future pydantic upgrades.
-
Or document that the exact pin is intentional and pydantic 2.13+ is not supported, so distributions know to keep the override.
Impact
Discovered while updating the nixpkgs snowflake-cli package from 3.13.1 to 3.22.1. The bump is blocked until this is resolved.
Context
snowflake-clicurrently pinspydantic==2.12.5exactly inpyproject.toml. This is fine for standardpip/uvinstalls where pydantic is installed in an isolated environment.However, it blocks packaging in distributions that manage Python dependencies globally (nixpkgs, Debian, Fedora, etc.), where
pydanticis a shared package at a different version. nixpkgs currently shipspydantic 2.13.4, which makes it impossible to packagesnowflake-cliwithout either:Root cause
UpdatableModel.__init_subclass__dynamically injectsfield_validator(mode="wrap")validators viasetattr. This mechanism breaks with pydantic >= 2.13 due to a behavioral change in how dynamically addedwrapvalidators interact with statically declaredbefore/aftervalidators on the same field.The failing tests (all in
tests/api/project/schemas/test_updatable_model.py) confirm this is a compatibility issue with pydantic >= 2.13, not a general breakage.Request
Either:
Relax the pin to
pydantic>=2.12.5,<3and fix the pydantic 2.13 compatibility inUpdatableModel— this would unblock distribution packaging and future pydantic upgrades.Or document that the exact pin is intentional and pydantic 2.13+ is not supported, so distributions know to keep the override.
Impact
Discovered while updating the nixpkgs snowflake-cli package from 3.13.1 to 3.22.1. The bump is blocked until this is resolved.