Skip to content

Support Starlette 1.0+ - #2282

Merged
waketzheng merged 5 commits into
tortoise:developfrom
weberhyj:develop
Sep 15, 2026
Merged

waketzheng merged 5 commits into
tortoise:developfrom
weberhyj:develop

Conversation

@weberhyj

@weberhyj weberhyj commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Description

The latest version of Starlette is 1.6.0, so it's time to support Starlette 1.0+.

Motivation and Context

Similar to tortoise.contrib.fastapi, add a RegisterTortoise helper to register Tortoise within the lifespan, while keeping the register_tortoise function for backward compatibility.

How Has This Been Tested?

prek run --all-files  --hook-stage manual
pytest

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 Sep 15, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 24 untouched benchmarks


Comparing weberhyj:develop (e153f4e) with develop (aec6108)

Open in CodSpeed

@waketzheng
waketzheng merged commit 8477e47 into tortoise:develop Sep 15, 2026
25 checks passed
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.

2 participants