Skip to content

Update datamodel-code-generator requirement from <0.55.0,>=0.28.5 to >=0.28.5,<0.56.0#146

Merged
erwindouna merged 1 commit intomainfrom
dependabot/pip/datamodel-code-generator-gte-0.28.5-and-lt-0.56.0
Mar 16, 2026
Merged

Update datamodel-code-generator requirement from <0.55.0,>=0.28.5 to >=0.28.5,<0.56.0#146
erwindouna merged 1 commit intomainfrom
dependabot/pip/datamodel-code-generator-gte-0.28.5-and-lt-0.56.0

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 16, 2026

⚠️ Dependabot is rebasing this PR ⚠️

Rebasing might not happen immediately, so don't worry if this takes some time.

Note: if you make any changes to this PR yourself, they will take precedence over the rebase.


Updates the requirements on datamodel-code-generator to permit the latest version.

Release notes

Sourced from datamodel-code-generator's releases.

0.55.0

Breaking Changes

Dependency Changes

  • 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. (#3025)

Default Behavior Changes

  • Default output model switched from Pydantic v1 to v2 - Running datamodel-codegen without specifying --output-model-type now generates Pydantic v2 models (pydantic_v2.BaseModel) instead of Pydantic v1 models (pydantic.BaseModel). Users who depend on the previous default behavior must now explicitly specify --output-model-type pydantic.BaseModel to continue generating Pydantic v1 compatible code. (#3029)

Code Generation Changes

  • Generated model syntax changed for default output - The default generated code now uses Pydantic v2 syntax including RootModel instead of __root__ fields, native union syntax (str | None) instead of Optional[str], and Pydantic v2 validator/serializer decorators. Existing code that consumes generated models may need updates to work with the new Pydantic v2 output format. (#3029)
  • Pydantic v1 output support removed - The pydantic.BaseModel output model type has been completely removed. Generated code now only supports Pydantic v2 patterns including RootModel instead of __root__, model_rebuild() instead of update_forward_refs(), and model_config instead of class Config. Users generating Pydantic v1 models must migrate to v2 output. (#3031)

Custom Template Update Required

  • Pydantic v1 templates removed - The following Jinja2 templates have been deleted and users with custom templates extending them must migrate to v2 equivalents:
    • pydantic/BaseModel.jinja2 → use pydantic_v2/BaseModel.jinja2
    • pydantic/BaseModel_root.jinja2 → use pydantic_v2/RootModel.jinja2
    • pydantic/Config.jinja2 → removed (v2 uses model_config dict) (#3031)

API/CLI Changes

  • --output-model-type pydantic.BaseModel removed - The pydantic.BaseModel value for --output-model-type is no longer valid. Use pydantic_v2.BaseModel instead (now the default). (#3031)
  • Pydantic v1 compatibility utilities removed from Python API - The following functions were removed from datamodel_code_generator.util: model_dump(), model_validate(), get_fields_set(), model_copy(). Use Pydantic v2 methods directly (obj.model_dump(), cls.model_validate(), etc.). (#3031)
  • datamodel_code_generator.model.pydantic module removed - The entire Pydantic v1 model module including BaseModel, CustomRootType, DataModelField, DataTypeManager, and dump_resolve_reference_action has been removed. Use datamodel_code_generator.model.pydantic_v2 instead. (#3031)
  • Pydantic v2 now required at runtime - The minimum pydantic dependency changed from pydantic>=1.5 to pydantic>=2,<3. Users with pydantic v1 installed must upgrade to pydantic v2 before using datamodel-code-generator (#3027)
  • Removed internal pydantic compatibility utilities - The following functions/classes were removed from datamodel_code_generator.util: get_pydantic_version(), is_pydantic_v2(), model_validator(), field_validator(), and ConfigDict. Users who imported these internal utilities directly must update their code to use pydantic's native APIs (#3027)
  • Removed datamodel_code_generator.pydantic_patch module - The entire pydantic compatibility patching module was removed. Any code importing from this module will fail (#3027)
  • Removed packaging dependency - The packaging library is no longer a dependency. Code that relied on it being transitively available should add it explicitly (#3027)

What's Changed

... (truncated)

Changelog

Sourced from datamodel-code-generator's changelog.

0.55.0 - 2026-03-10

Breaking Changes

Dependency Changes

  • 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. (#3025)

Default Behavior Changes

  • Default output model switched from Pydantic v1 to v2 - Running datamodel-codegen without specifying --output-model-type now generates Pydantic v2 models (pydantic_v2.BaseModel) instead of Pydantic v1 models (pydantic.BaseModel). Users who depend on the previous default behavior must now explicitly specify --output-model-type pydantic.BaseModel to continue generating Pydantic v1 compatible code. (#3029)

Code Generation Changes

  • Generated model syntax changed for default output - The default generated code now uses Pydantic v2 syntax including RootModel instead of __root__ fields, native union syntax (str | None) instead of Optional[str], and Pydantic v2 validator/serializer decorators. Existing code that consumes generated models may need updates to work with the new Pydantic v2 output format. (#3029)
  • Pydantic v1 output support removed - The pydantic.BaseModel output model type has been completely removed. Generated code now only supports Pydantic v2 patterns including RootModel instead of __root__, model_rebuild() instead of update_forward_refs(), and model_config instead of class Config. Users generating Pydantic v1 models must migrate to v2 output. (#3031)

Custom Template Update Required

  • Pydantic v1 templates removed - The following Jinja2 templates have been deleted and users with custom templates extending them must migrate to v2 equivalents:
    • pydantic/BaseModel.jinja2 → use pydantic_v2/BaseModel.jinja2
    • pydantic/BaseModel_root.jinja2 → use pydantic_v2/RootModel.jinja2
    • pydantic/Config.jinja2 → removed (v2 uses model_config dict) (#3031)

API/CLI Changes

  • --output-model-type pydantic.BaseModel removed - The pydantic.BaseModel value for --output-model-type is no longer valid. Use pydantic_v2.BaseModel instead (now the default). (#3031)
  • Pydantic v1 compatibility utilities removed from Python API - The following functions were removed from datamodel_code_generator.util: model_dump(), model_validate(), get_fields_set(), model_copy(). Use Pydantic v2 methods directly (obj.model_dump(), cls.model_validate(), etc.). (#3031)
  • datamodel_code_generator.model.pydantic module removed - The entire Pydantic v1 model module including BaseModel, CustomRootType, DataModelField, DataTypeManager, and dump_resolve_reference_action has been removed. Use datamodel_code_generator.model.pydantic_v2 instead. (#3031)
  • Pydantic v2 now required at runtime - The minimum pydantic dependency changed from pydantic>=1.5 to pydantic>=2,<3. Users with pydantic v1 installed must upgrade to pydantic v2 before using datamodel-code-generator (#3027)
  • Removed internal pydantic compatibility utilities - The following functions/classes were removed from datamodel_code_generator.util: get_pydantic_version(), is_pydantic_v2(), model_validator(), field_validator(), and ConfigDict. Users who imported these internal utilities directly must update their code to use pydantic's native APIs (#3027)
  • Removed datamodel_code_generator.pydantic_patch module - The entire pydantic compatibility patching module was removed. Any code importing from this module will fail (#3027)
  • Removed packaging dependency - The packaging library is no longer a dependency. Code that relied on it being transitively available should add it explicitly (#3027)

What's Changed

... (truncated)

Commits

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 commands and options

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)

Updates the requirements on [datamodel-code-generator](https://github.com/koxudaxi/datamodel-code-generator) to permit the latest version.
- [Release notes](https://github.com/koxudaxi/datamodel-code-generator/releases)
- [Changelog](https://github.com/koxudaxi/datamodel-code-generator/blob/main/CHANGELOG.md)
- [Commits](koxudaxi/datamodel-code-generator@0.28.5...0.55.0)

---
updated-dependencies:
- dependency-name: datamodel-code-generator
  dependency-version: 0.55.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Upgrade or downgrade of project dependencies. python Pull requests that update python code labels Mar 16, 2026
@erwindouna erwindouna merged commit e34692b into main Mar 16, 2026
24 of 26 checks passed
@dependabot dependabot bot deleted the dependabot/pip/datamodel-code-generator-gte-0.28.5-and-lt-0.56.0 branch March 16, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Upgrade or downgrade of project dependencies. python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant