The snowflake.core package contains auto-generated model files that use deprecated Pydantic V1-style class-based config, triggering numerous PydanticDeprecatedSince20 warnings when imported:
PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead.
Deprecated in Pydantic V2.0 to be removed in V3.0.
Affected Files:
snowflake/core/warehouse/_generated/models/warehouse.py
snowflake/core/user/_generated/models/*.py
snowflake/core/session/_generated/models/*.py
- And many other
_generated model files
Issue:
- These warnings flood logs during normal usage, making it difficult to spot legitimate warnings
- Standard
PYTHONWARNINGS environment variable filters cannot suppress these warnings because Pydantic uses a custom warning class (PydanticDeprecatedSince20) that doesn't respond to standard Python warning filters
- Since these are auto-generated files in a distributed package, end users cannot fix them
Request:
Please update the code generator to emit Pydantic V2-compatible models using ConfigDict instead of class-based config. This will eliminate the warnings and ensure compatibility when Pydantic V3 is released.
Migration Reference: https://errors.pydantic.dev/2.12/migration/
The
snowflake.corepackage contains auto-generated model files that use deprecated Pydantic V1-style class-basedconfig, triggering numerousPydanticDeprecatedSince20warnings when imported:Affected Files:
snowflake/core/warehouse/_generated/models/warehouse.pysnowflake/core/user/_generated/models/*.pysnowflake/core/session/_generated/models/*.py_generatedmodel filesIssue:
PYTHONWARNINGSenvironment variable filters cannot suppress these warnings because Pydantic uses a custom warning class (PydanticDeprecatedSince20) that doesn't respond to standard Python warning filtersRequest:
Please update the code generator to emit Pydantic V2-compatible models using
ConfigDictinstead of class-basedconfig. This will eliminate the warnings and ensure compatibility when Pydantic V3 is released.Migration Reference: https://errors.pydantic.dev/2.12/migration/