Skip to content

Lock dependencies with Python 3.15 wheels - #4766

Merged
Koudai Aono (koxudaxi) merged 5 commits into
mainfrom
py315-dependencies
Oct 15, 2026
Merged

Koudai Aono (koxudaxi) merged 5 commits into
mainfrom
py315-dependencies

Conversation

@koxudaxi

@koxudaxi Koudai Aono (koxudaxi) commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Added Python 3.15 as a supported target for generated code.
    • Updated preset documentation to reflect the available Python targets.
  • Compatibility
    • Updated formatting and validation support for Python 3.15 and adjusted package requirements across supported Python versions.

Importing the package on Python 3.15 raised ValueError: the default target
is built from the running interpreter and PythonVersion ended at 3.14.

Fixes #4589

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	skills/datamodel-code-generator/references/cli-options.md
#	tests/data/expected/main/help/color.txt
#	tests/data/expected/main/help/no_color.txt
#	tests/data/expected/main_kr/generate_prompt/basic.txt
#	tests/data/expected/main_kr/generate_prompt/json_output.txt
#	tests/data/expected/main_kr/generate_prompt/with_list_options.txt
#	tests/data/expected/main_kr/generate_prompt/with_options.txt
#	tests/data/expected/main_kr/generate_prompt/with_question.txt
#	tests/data/expected/main_kr/help_shows_new_options.txt
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T15:43:50.918751Z a7ee5b2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: datamodel-code-generator/datamodel-code-generator/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 79bacafd-e354-4ec1-bb6e-22c3ae1dc530

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: datamodel-code-generator/datamodel-code-generator/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f63a0023-4a81-4e62-980f-c9c1aeecf9fc
📥 Commits

Reviewing files that changed from the base of the PR and between 213ff2c and a7ee5b2.

⛔ Files ignored due to path filters: 12
  • docs/llms-full.txt is excluded by none and included by none
  • skills/datamodel-code-generator/references/cli-options.md is excluded by none and included by none
  • tests/data/expected/main/help/color.txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/main/help/no_color.txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/main_kr/generate_prompt/basic.txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/main_kr/generate_prompt/json_output.txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/main_kr/generate_prompt/with_list_options.txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/main_kr/generate_prompt/with_options.txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/main_kr/generate_prompt/with_question.txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/main_kr/help_shows_new_options.txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/package_metadata/formatter_extras.txt is excluded by !tests/data/**/*.txt and included by none
  • uv.lock is excluded by !**/*.lock, !**/*.lock and included by none
📒 Files selected for processing: 8
  • .pre-commit-config.yaml
  • docs/dependency-migration.md
  • pyproject.toml
  • src/datamodel_code_generator/_format_types.py
  • src/datamodel_code_generator/preset.py
  • tests/data/expected/main/input_model/config_class.py
  • tests/main/jsonschema/test_main_jsonschema.py
  • tests/test_package_metadata.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 0 remain after this review.

📝 Walkthrough

The project adds Python 3.15 support to its version metadata and splits formatter and Pydantic requirements by Python version. The Python version target enum, preset target matrix, and related tests also include updates.

Changes: Python 3.15 support

Layer / File(s) Summary
Version support and dependency requirements
pyproject.toml, .pre-commit-config.yaml, docs/dependency-migration.md
Project metadata adds Python 3.15 and sets Python-version-specific Black and Pydantic requirements. The formatter dependency groups and pre-commit configuration also distinguish Python versions. The migration documentation reflects the version ranges.
Python version targets and tests
src/datamodel_code_generator/_format_types.py, src/datamodel_code_generator/preset.py, tests/data/expected/main/input_model/config_class.py, tests/main/jsonschema/test_main_jsonschema.py, tests/test_package_metadata.py
The Python version enum and expected config type include 3.15. The preset matrix iterates over standard preset mappings. Tests select fixture suffixes by deferred annotation support and check all matching formatter requirements.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to a7ee5

This change adds Python 3.15 as a supported target and splits dependency requirements by Python version. No concrete merge-blocking problem was established in the supplied context.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: dependency updates to support Python 3.15 wheels and requirements.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. (4 skipped: 3 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@koxudaxi
Koudai Aono (koxudaxi) added this pull request to stack #4774 October 15, 2026 15:41
@codspeed

codspeed Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 49 untouched benchmarks
⏩ 98 skipped benchmarks1


Comparing py315-dependencies (c825bde) with main (0afa003)

Open in CodSpeed

Footnotes

  1. 98 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown
Contributor

📚 Docs Preview: https://pr-4766.datamodel-code-generator.pages.dev

@koxudaxi
Koudai Aono (koxudaxi) merged commit 56cb6bc into main Oct 15, 2026
117 checks passed
@koxudaxi
Koudai Aono (koxudaxi) deleted the py315-dependencies branch October 15, 2026 18:28
@github-actions

Copy link
Copy Markdown
Contributor

Breaking Change Analysis

Result: No breaking changes detected

Reasoning: This PR adds Python 3.15 support. It adds the Python 3.15 classifier to pyproject.toml and bumps the pre-commit pyproject-fmt max-supported-python to 3.15. The black dependency, both required and in the black extra, is now split by Python version: versions below 3.15 keep the existing 19.10b0 minimum, and Python 3.15 and later requires black 26.5 or newer. The pydantic requirement is also split: Python 3.14 keeps the 2.12 minimum, Python 3.15 and later requires pydantic 2.14 or newer, and versions below 3.14 are unchanged. The black22 and black24 dev dependency groups are limited to Python below 3.15. The other changes are documentation tables, the updated expected package-metadata test fixture, a test that now joins multiple required specifiers, and uv.lock churn (new markers, an added black 26.10.1 entry, and version bumps for cffi, grpcio, markupsafe, msgspec, protobuf, rpds-py, time-machine and watchfiles). Requirements for every Python version below 3.15 are unchanged. The tighter minimums apply only to the newly supported Python 3.15, so existing users are not affected. Nothing changes generated code output, templates, CLI options, the Python API, defaults, error handling, or the set of supported Python versions.


This analysis was produced by the release draft workflow

@github-actions

Copy link
Copy Markdown
Contributor

🎉 Released in 0.85.0

This PR is now available in the latest release. See the release notes for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants