Repository navigation
Import the models that collapsed root types and dict keys name through the reference import, under a named legacy row - #5600
Conversation
…h the reference import, under a named legacy row
Walkthrough
Merge Risk:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour 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. |
Merging this PR will improve performance by ×2.12 warnings
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Breaking Change AnalysisResult: No breaking changes detected Reasoning: This PR is an internal refactor of how the collapse-root-models and type-dict-keys-by-root-types passes import models of other modules. The private helpers _relative_import and _register_data_type_import in parser/_passes/_shared.py are removed and replaced by a new import_references function plus an ImportPathRow literal. The new legacy-collapse-import-path row reproduces the old logic. It computes the path with relative and exact_import only when use_exact is set and the target is not an ancestor package. It skips the import and keeps the alias when the model is in the same module. It writes the binding even when it equals the class name. It does not apply the hyphen, _internal or same-named-module rules. The reference row and the default parameters keep existing callers unchanged. The other changes are a treat_dot_as_module protocol property, documentation rows and tooling TOML entries, and no public CLI option, Python API, template or supported Python version changes. The behaviour diff gate does show accepted default-output changes, but its notes tie all of them to the allOf intersection change, where an allOf whose parts admit no object becomes a RootModel or alias. This PR does not touch that code. The only other non-identical cell is a crash-fix, which does not count as a behaviour change. So none of the default-output changes come from this PR's diff, and it has no breaking changes. This analysis was produced by the release draft workflow |
|
🎉 Released in 0.88.0 This PR is now available in the latest release. See the release notes for details. |
Summary by CodeRabbit