Skip to content

Allow separate queryset item schema names - #2328

Open
IlyaKhalafi wants to merge 3 commits into
tortoise:developfrom
IlyaKhalafi:feat/pydantic-queryset-item-names
Open

IlyaKhalafi wants to merge 3 commits into
tortoise:developfrom
IlyaKhalafi:feat/pydantic-queryset-item-names

Conversation

@IlyaKhalafi

Copy link
Copy Markdown
Contributor

Description

This PR fixes list and item schemas being tied to the same custom name. With this, submodel_name lets each have its own name while keeping existing naming defaults.

Motivation and Context

Fixes #1728.

How Has This Been Tested?

make check and 55 focused tests passed. The full SQLite suite passed with 1,982 tests, 149 skips and two expected failures. Tests used the bundled pytz timezone data because the host lacks US/Central, which also fails on unchanged upstream.

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added the changelog accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codspeed

codspeed Bot commented Oct 15, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 21 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 24 untouched benchmarks


Comparing IlyaKhalafi:feat/pydantic-queryset-item-names (4ad64c4) with develop (ef637d4)

Open in CodSpeed

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

naming of originating model in model_json_schema with pydantic_queryset_creator

1 participant