Skip to content

Official support python3.14 - #2026

Merged
waketzheng merged 11 commits into
tortoise:developfrom
waketzheng:ci-py3.14
Dec 9, 2025
Merged

waketzheng merged 11 commits into
tortoise:developfrom
waketzheng:ci-py3.14

Conversation

@waketzheng

@waketzheng waketzheng commented Dec 1, 2025 •

Copy link
Copy Markdown
Contributor

Description

  1. Add py3.14 to ci list
  2. Fix RuntimeError for examples/basic.py for python3.14 by use anyio.from_thread instead of asyncio.get_event_loop
➜  tortoise-orm git:(develop) uv venv --python 3.14
Using CPython 3.14.0
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate
➜  tortoise-orm git:(develop) source .venv/bin/activate
(tortoise-orm) ➜  tortoise-orm git:(develop) uv pip install -e .
Resolved 6 packages in 263ms
      Built tortoise-orm @ file:///home/ubuntu/github/tortoise-orm
Prepared 1 package in 142ms
Installed 6 packages in 8ms
 + aiosqlite==0.21.0
 + iso8601==2.1.0
 + pypika-tortoise==0.6.3
 + pytz==2025.2
 + tortoise-orm==0.25.1 (from file:///home/ubuntu/github/tortoise-orm)
 + typing-extensions==4.15.0
(tortoise-orm) ➜  tortoise-orm git:(develop) python examples/basic.py
Traceback (most recent call last):
  File "/home/ubuntu/github/tortoise-orm/examples/basic.py", line 38, in <module>
    run_async(run())
    ~~~~~~~~~^^^^^^^
  File "/home/ubuntu/github/tortoise-orm/tortoise/__init__.py", line 640, in run_async
    loop = asyncio.get_event_loop()
  File "/home/ubuntu/.local/share/uv/python/cpython-3.14.0-linux-x86_64-gnu/lib/python3.14/asyncio/events.py", line 715, in get_event_loop
    raise RuntimeError('There is no current event loop in thread %r.'
                       % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'MainThread'.
<sys>:0: RuntimeWarning: coroutine 'run' was never awaited
  1. Fix test error for tests/utils/test_describe_model.py

Motivation and Context

Support python3.14

How Has This Been Tested?

make ci

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 Dec 1, 2025 •

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #2026 will not alter performance

Comparing waketzheng:ci-py3.14 (144d7b1) with develop (6a32975)

Summary

✅ 16 untouched

@waketzheng waketzheng mentioned this pull request Dec 1, 2025
7 tasks done
@coveralls

coveralls commented Dec 1, 2025 •

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 20029977336

Details

  • 8 of 8 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 90.729%

Totals Coverage Status
Change from base Build 19992485555: 0.01%
Covered Lines: 6633
Relevant Lines: 7196

💛 - Coveralls

henadzit
henadzit previously approved these changes Dec 6, 2025
@henadzit

henadzit commented Dec 6, 2025

Copy link
Copy Markdown
Contributor

I think we should do a release!

@waketzheng

Copy link
Copy Markdown
Contributor Author

I think we should do a release!

Yes, Agree

@waketzheng
waketzheng requested a review from henadzit December 8, 2025 14:04
@waketzheng
waketzheng merged commit 04d56ca into tortoise:develop Dec 9, 2025
10 checks passed
@waketzheng
waketzheng deleted the ci-py3.14 branch December 9, 2025 01:39
@waketzheng waketzheng mentioned this pull request Dec 10, 2025
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.

4 participants