dependabot[bot] opened a new pull request, #15635: URL: https://github.com/apache/iceberg/pull/15635
Bumps [datamodel-code-generator](https://github.com/koxudaxi/datamodel-code-generator) from 0.54.1 to 0.55.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/koxudaxi/datamodel-code-generator/releases">datamodel-code-generator's releases</a>.</em></p> <blockquote> <h2>0.55.0</h2> <h2>Breaking Changes</h2> <h3>Dependency Changes</h3> <ul> <li>Pydantic v1 runtime support removed - Pydantic v2 is now required as a runtime dependency. Users running datamodel-code-generator with Pydantic v1 installed must upgrade to Pydantic v2. The previously deprecated v1 compatibility layer has been completely removed. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3025">#3025</a>)</li> </ul> <h3>Default Behavior Changes</h3> <ul> <li>Default output model switched from Pydantic v1 to v2 - Running <code>datamodel-codegen</code> without specifying <code>--output-model-type</code> now generates Pydantic v2 models (<code>pydantic_v2.BaseModel</code>) instead of Pydantic v1 models (<code>pydantic.BaseModel</code>). Users who depend on the previous default behavior must now explicitly specify <code>--output-model-type pydantic.BaseModel</code> to continue generating Pydantic v1 compatible code. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3029">#3029</a>)</li> </ul> <h3>Code Generation Changes</h3> <ul> <li>Generated model syntax changed for default output - The default generated code now uses Pydantic v2 syntax including <code>RootModel</code> instead of <code>__root__</code> fields, native union syntax (<code>str | None</code>) instead of <code>Optional[str]</code>, and Pydantic v2 validator/serializer decorators. Existing code that consumes generated models may need updates to work with the new Pydantic v2 output format. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3029">#3029</a>)</li> <li>Pydantic v1 output support removed - The <code>pydantic.BaseModel</code> output model type has been completely removed. Generated code now only supports Pydantic v2 patterns including <code>RootModel</code> instead of <code>__root__</code>, <code>model_rebuild()</code> instead of <code>update_forward_refs()</code>, and <code>model_config</code> instead of <code>class Config</code>. Users generating Pydantic v1 models must migrate to v2 output. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3031">#3031</a>)</li> </ul> <h3>Custom Template Update Required</h3> <ul> <li>Pydantic v1 templates removed - The following Jinja2 templates have been deleted and users with custom templates extending them must migrate to v2 equivalents: <ul> <li><code>pydantic/BaseModel.jinja2</code> → use <code>pydantic_v2/BaseModel.jinja2</code></li> <li><code>pydantic/BaseModel_root.jinja2</code> → use <code>pydantic_v2/RootModel.jinja2</code></li> <li><code>pydantic/Config.jinja2</code> → removed (v2 uses <code>model_config</code> dict) (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3031">#3031</a>)</li> </ul> </li> </ul> <h3>API/CLI Changes</h3> <ul> <li><code>--output-model-type pydantic.BaseModel</code> removed - The <code>pydantic.BaseModel</code> value for <code>--output-model-type</code> is no longer valid. Use <code>pydantic_v2.BaseModel</code> instead (now the default). (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3031">#3031</a>)</li> <li>Pydantic v1 compatibility utilities removed from Python API - The following functions were removed from <code>datamodel_code_generator.util</code>: <code>model_dump()</code>, <code>model_validate()</code>, <code>get_fields_set()</code>, <code>model_copy()</code>. Use Pydantic v2 methods directly (<code>obj.model_dump()</code>, <code>cls.model_validate()</code>, etc.). (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3031">#3031</a>)</li> <li><code>datamodel_code_generator.model.pydantic</code> module removed - The entire Pydantic v1 model module including <code>BaseModel</code>, <code>CustomRootType</code>, <code>DataModelField</code>, <code>DataTypeManager</code>, and <code>dump_resolve_reference_action</code> has been removed. Use <code>datamodel_code_generator.model.pydantic_v2</code> instead. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3031">#3031</a>)</li> <li>Pydantic v2 now required at runtime - The minimum pydantic dependency changed from <code>pydantic>=1.5</code> to <code>pydantic>=2,<3</code>. Users with pydantic v1 installed must upgrade to pydantic v2 before using datamodel-code-generator (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3027">#3027</a>)</li> <li>Removed internal pydantic compatibility utilities - The following functions/classes were removed from <code>datamodel_code_generator.util</code>: <code>get_pydantic_version()</code>, <code>is_pydantic_v2()</code>, <code>model_validator()</code>, <code>field_validator()</code>, and <code>ConfigDict</code>. Users who imported these internal utilities directly must update their code to use pydantic's native APIs (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3027">#3027</a>)</li> <li>Removed <code>datamodel_code_generator.pydantic_patch</code> module - The entire pydantic compatibility patching module was removed. Any code importing from this module will fail (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3027">#3027</a>)</li> <li>Removed <code>packaging</code> dependency - The <code>packaging</code> library is no longer a dependency. Code that relied on it being transitively available should add it explicitly (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3027">#3027</a>)</li> </ul> <h2>What's Changed</h2> <ul> <li>Extract shared pydantic base module for v2/dataclass/msgspec by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3022">koxudaxi/datamodel-code-generator#3022</a></li> <li>Remove pydantic v1 runtime compat layer by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3025">koxudaxi/datamodel-code-generator#3025</a></li> <li>test: make integration helpers explicit about output model by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3028">koxudaxi/datamodel-code-generator#3028</a></li> <li>feat: switch default output model to pydantic v2 by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3029">koxudaxi/datamodel-code-generator#3029</a></li> <li>test: align v2 parser baselines before v1 output removal by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3032">koxudaxi/datamodel-code-generator#3032</a></li> <li>feat: remove pydantic v1 output support by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3031">koxudaxi/datamodel-code-generator#3031</a></li> <li>docs: remove pydantic v1 references by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3030">koxudaxi/datamodel-code-generator#3030</a></li> <li>Remove pydantic v1 runtime compat shims and update dependencies by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3027">koxudaxi/datamodel-code-generator#3027</a></li> <li>docs: remove final pydantic v1 traces by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3036">koxudaxi/datamodel-code-generator#3036</a></li> <li>Fix all-export generation for hyphenated directories by <a href="https://github.com/an5t"><code>@an5t</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3033">koxudaxi/datamodel-code-generator#3033</a></li> <li>Fix exact imports for reused tree-scope models by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3042">koxudaxi/datamodel-code-generator#3042</a></li> <li>fix <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3034">#3034</a> and <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3035">#3035</a> by introducing <code>ValidatedDefault</code> by <a href="https://github.com/keyz"><code>@keyz</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3040">koxudaxi/datamodel-code-generator#3040</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/koxudaxi/datamodel-code-generator/blob/main/CHANGELOG.md">datamodel-code-generator's changelog</a>.</em></p> <blockquote> <h2><a href="https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.55.0">0.55.0</a> - 2026-03-10</h2> <h2>Breaking Changes</h2> <h3>Dependency Changes</h3> <ul> <li>Pydantic v1 runtime support removed - Pydantic v2 is now required as a runtime dependency. Users running datamodel-code-generator with Pydantic v1 installed must upgrade to Pydantic v2. The previously deprecated v1 compatibility layer has been completely removed. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3025">#3025</a>)</li> </ul> <h3>Default Behavior Changes</h3> <ul> <li>Default output model switched from Pydantic v1 to v2 - Running <code>datamodel-codegen</code> without specifying <code>--output-model-type</code> now generates Pydantic v2 models (<code>pydantic_v2.BaseModel</code>) instead of Pydantic v1 models (<code>pydantic.BaseModel</code>). Users who depend on the previous default behavior must now explicitly specify <code>--output-model-type pydantic.BaseModel</code> to continue generating Pydantic v1 compatible code. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3029">#3029</a>)</li> </ul> <h3>Code Generation Changes</h3> <ul> <li>Generated model syntax changed for default output - The default generated code now uses Pydantic v2 syntax including <code>RootModel</code> instead of <code>__root__</code> fields, native union syntax (<code>str | None</code>) instead of <code>Optional[str]</code>, and Pydantic v2 validator/serializer decorators. Existing code that consumes generated models may need updates to work with the new Pydantic v2 output format. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3029">#3029</a>)</li> <li>Pydantic v1 output support removed - The <code>pydantic.BaseModel</code> output model type has been completely removed. Generated code now only supports Pydantic v2 patterns including <code>RootModel</code> instead of <code>__root__</code>, <code>model_rebuild()</code> instead of <code>update_forward_refs()</code>, and <code>model_config</code> instead of <code>class Config</code>. Users generating Pydantic v1 models must migrate to v2 output. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3031">#3031</a>)</li> </ul> <h3>Custom Template Update Required</h3> <ul> <li>Pydantic v1 templates removed - The following Jinja2 templates have been deleted and users with custom templates extending them must migrate to v2 equivalents: <ul> <li><code>pydantic/BaseModel.jinja2</code> → use <code>pydantic_v2/BaseModel.jinja2</code></li> <li><code>pydantic/BaseModel_root.jinja2</code> → use <code>pydantic_v2/RootModel.jinja2</code></li> <li><code>pydantic/Config.jinja2</code> → removed (v2 uses <code>model_config</code> dict) (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3031">#3031</a>)</li> </ul> </li> </ul> <h3>API/CLI Changes</h3> <ul> <li><code>--output-model-type pydantic.BaseModel</code> removed - The <code>pydantic.BaseModel</code> value for <code>--output-model-type</code> is no longer valid. Use <code>pydantic_v2.BaseModel</code> instead (now the default). (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3031">#3031</a>)</li> <li>Pydantic v1 compatibility utilities removed from Python API - The following functions were removed from <code>datamodel_code_generator.util</code>: <code>model_dump()</code>, <code>model_validate()</code>, <code>get_fields_set()</code>, <code>model_copy()</code>. Use Pydantic v2 methods directly (<code>obj.model_dump()</code>, <code>cls.model_validate()</code>, etc.). (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3031">#3031</a>)</li> <li><code>datamodel_code_generator.model.pydantic</code> module removed - The entire Pydantic v1 model module including <code>BaseModel</code>, <code>CustomRootType</code>, <code>DataModelField</code>, <code>DataTypeManager</code>, and <code>dump_resolve_reference_action</code> has been removed. Use <code>datamodel_code_generator.model.pydantic_v2</code> instead. (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3031">#3031</a>)</li> <li>Pydantic v2 now required at runtime - The minimum pydantic dependency changed from <code>pydantic>=1.5</code> to <code>pydantic>=2,<3</code>. Users with pydantic v1 installed must upgrade to pydantic v2 before using datamodel-code-generator (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3027">#3027</a>)</li> <li>Removed internal pydantic compatibility utilities - The following functions/classes were removed from <code>datamodel_code_generator.util</code>: <code>get_pydantic_version()</code>, <code>is_pydantic_v2()</code>, <code>model_validator()</code>, <code>field_validator()</code>, and <code>ConfigDict</code>. Users who imported these internal utilities directly must update their code to use pydantic's native APIs (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3027">#3027</a>)</li> <li>Removed <code>datamodel_code_generator.pydantic_patch</code> module - The entire pydantic compatibility patching module was removed. Any code importing from this module will fail (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3027">#3027</a>)</li> <li>Removed <code>packaging</code> dependency - The <code>packaging</code> library is no longer a dependency. Code that relied on it being transitively available should add it explicitly (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3027">#3027</a>)</li> </ul> <h2>What's Changed</h2> <ul> <li>Extract shared pydantic base module for v2/dataclass/msgspec by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3022">koxudaxi/datamodel-code-generator#3022</a></li> <li>Remove pydantic v1 runtime compat layer by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3025">koxudaxi/datamodel-code-generator#3025</a></li> <li>test: make integration helpers explicit about output model by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3028">koxudaxi/datamodel-code-generator#3028</a></li> <li>feat: switch default output model to pydantic v2 by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3029">koxudaxi/datamodel-code-generator#3029</a></li> <li>test: align v2 parser baselines before v1 output removal by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3032">koxudaxi/datamodel-code-generator#3032</a></li> <li>feat: remove pydantic v1 output support by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3031">koxudaxi/datamodel-code-generator#3031</a></li> <li>docs: remove pydantic v1 references by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3030">koxudaxi/datamodel-code-generator#3030</a></li> <li>Remove pydantic v1 runtime compat shims and update dependencies by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3027">koxudaxi/datamodel-code-generator#3027</a></li> <li>docs: remove final pydantic v1 traces by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3036">koxudaxi/datamodel-code-generator#3036</a></li> <li>Fix all-export generation for hyphenated directories by <a href="https://github.com/an5t"><code>@an5t</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3033">koxudaxi/datamodel-code-generator#3033</a></li> <li>Fix exact imports for reused tree-scope models by <a href="https://github.com/koxudaxi"><code>@koxudaxi</code></a> in <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/pull/3042">koxudaxi/datamodel-code-generator#3042</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/362453380f453d53cdd236d8817488631a8f9652"><code>3624533</code></a> Refactor generate tests to use assertion helper (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3047">#3047</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/c48bdb2605e2319743bcb7346c0d80feec37b713"><code>c48bdb2</code></a> Fix for <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3045">#3045</a> (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3046">#3046</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/f3f391271adacdab12a460e1c88f42c61181c25e"><code>f3f3912</code></a> Add deprecated decorators for dataclass output (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3044">#3044</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/569894ae26ca55d6f259df92908686e841a94832"><code>569894a</code></a> Avoid TYPE_CHECKING imports for Ruff modular output (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3043">#3043</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/77af7747f169a9ed9181b2121d1beb140e1c7dcf"><code>77af774</code></a> fix <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3034">#3034</a> and <a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3035">#3035</a> by introducing <code>ValidatedDefault</code> (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3040">#3040</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/95daa4e8d1425a531349d3db09f04bb0c1f88c65"><code>95daa4e</code></a> Fix exact imports for reused tree-scope models (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3042">#3042</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/8c4bfd137aca428782b9f7dcd9d7cc900755274e"><code>8c4bfd1</code></a> Fix all-export generation for hyphenated directories (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3033">#3033</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/3c244dae8ceebc0c1ef744b4cec3e77065a013dc"><code>3c244da</code></a> docs: remove final pydantic v1 references (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3036">#3036</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/1cbfbc5ae5ca9203e8e94e0cd225dbab4e2e3d72"><code>1cbfbc5</code></a> Remove pydantic v1 runtime compat shims and update dependencies (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3027">#3027</a>)</li> <li><a href="https://github.com/koxudaxi/datamodel-code-generator/commit/bef3fe5fa01562880c2a42c4916fa7f77678f9df"><code>bef3fe5</code></a> docs: remove pydantic v1 references (<a href="https://redirect.github.com/koxudaxi/datamodel-code-generator/issues/3030">#3030</a>)</li> <li>Additional commits viewable in <a href="https://github.com/koxudaxi/datamodel-code-generator/compare/0.54.1...0.55.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
