Skip to content

typing_extensions is missing after installing package #2036

Description

@axzxc1236

Describe the bug
ModuleNotFoundError: No module named 'typing_extensions' shows up while importing tortoise-orm

Traceback (most recent call last):
  File "/tmp/tortoise_orm_test/main.py", line 1, in <module>
    from tortoise import Tortoise, run_async
  File "/tmp/tortoise_orm_test/.venv/lib/python3.13/site-packages/tortoise/__init__.py", line 18, in <module>
    from tortoise.backends.base.client import BaseDBAsyncClient
  File "/tmp/tortoise_orm_test/.venv/lib/python3.13/site-packages/tortoise/backends/base/client.py", line 10, in <module>
    from tortoise.backends.base.executor import BaseExecutor
  File "/tmp/tortoise_orm_test/.venv/lib/python3.13/site-packages/tortoise/backends/base/executor.py", line 14, in <module>
    from tortoise.expressions import Expression, ResolveContext
  File "/tmp/tortoise_orm_test/.venv/lib/python3.13/site-packages/tortoise/expressions.py", line 29, in <module>
    from tortoise.filters import FilterInfoDict
  File "/tmp/tortoise_orm_test/.venv/lib/python3.13/site-packages/tortoise/filters.py", line 19, in <module>
    from typing_extensions import NotRequired
ModuleNotFoundError: No module named 'typing_extensions'

To Reproduce
uv add tortoise-orm\[accel\]

from tortoise import Tortoise

Expected behavior
Dependency should be installed along side tortoise-orm.

Additional context
Python version 3.13.11
Output of uv tree

tortoise-orm-test v0.1.0
└── tortoise-orm[accel] v0.25.1
    ├── aiosqlite v0.22.0
    ├── iso8601 v2.1.0
    ├── pypika-tortoise v0.6.3
    ├── pytz v2025.2
    ├── ciso8601 v2.3.3 (extra: accel)
    ├── orjson v3.11.5 (extra: accel)
    └── uvloop v0.22.1 (extra: accel)

Activity

  1. axzxc1236 commented on Dec 14, 2025

    @axzxc1236
    Author

    It's caused by aiosqlite removing a dependency.

    https://github.com/omnilib/aiosqlite/blob/main/CHANGELOG.md#v0220

  2. waketzheng commented on Dec 14, 2025

    @waketzheng
    Contributor

    @henadzit @abondar How about move aiosqlite to optional dependencies, such as tortoise-orm[sqlite]?

  3. waketzheng commented on Dec 14, 2025

    @waketzheng
    Contributor

    It's caused by aiosqlite removing a dependency.

    https://github.com/omnilib/aiosqlite/blob/main/CHANGELOG.md#v0220

    Hi, @axzxc1236 aiosqlite==0.22.0, not support yet (See #2035)
    If you are using sqlite, mark it as: uv add "aiosqlite<0.22.0"
    Otherwise just: uv add typing-extensions

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions