Skip to content

Complete SQLAlchemy inline pep484 typing #6810

Open

Description

@CaselIT

Status as of 2023-02

Most of the library is typed, but some modules/packages that are still work in progress.

Modules / packages that still require work

  • sqlalchemy.engine
    • cursor - passes omitting non-typed functions - internal module
    • default - passes omitting non-typed functions - internal module
  • sqlalchemy.ext
    • declarative.extentions - missing most/all types - legacy
    • backed - missing most/all types - legacy
    • compiler - missing most/all types - popular api
    • indexable - missing most/all types
    • instrumentation - missing most/all types
    • orderinglist - missing most/all types
    • serializer - missing most/all types - legacy
  • sqlalchemy.orm
    • bulk_persistence - missing most types - internal module
    • collections - missing most types - internal module
    • context - missing most types - internal module
    • dependency - missing most types - internal module
    • dynamic - missing most types - internal module
    • evaluator - missing most/all types - internal module
    • instrumentation - missing some types - internal module
    • loading - missing most types - internal module
    • persistence - missing most types - internal module
    • strategies - missing most types - internal module
    • strategies - missing most types - internal module
    • unitofwork - missing most types - internal module
    • util - missing most types - internal module
    • writeonly - missing most types - internal module
  • sqlalchemy.sql
    • base - missing most types - internal module
    • compiler - missing most types - internal module
    • crud - missing most types - internal module
    • ddl - missing most types - internal module
    • functions - missing most types - internal module
    • lambdas - missing most types - internal module
    • naming - missing most types - internal module
    • roles - missing most types - internal module
    • traversals - missing most types - internal module
    • util - missing most types - internal module

Activity

  1. added
    big joba major change that requires a lot of knowledge and work
    time consuming / tediousan issue that will take a long time to complete, even though it may be "easy"
    EpicUse this tag to define an Issue as an Epic that contains multiple issues for a targeted
    SQLA mypy pluginmypy plugin issues only. general pep-484 issues should be "typing"
    on Jul 24, 2021
  2. added this to the 2.0 milestone on Jul 24, 2021
  3. sqla-tester commented on Dec 22, 2021

    @sqla-tester
    Collaborator
  4. sqla-tester commented on Jan 6, 2022

    @sqla-tester
    Collaborator

    Mike Bayer has proposed a fix for this issue in the main branch:

    initial reorganize for static typing https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/3447

  5. zzzeek commented on Jan 9, 2022

    @zzzeek
    Member

    related issues:

    #7535
    #7519
    #7562
    #7555

  6. zzzeek commented on Jan 9, 2022

    @zzzeek
    Member

    also there's the issue of replacing existing sqlalchemy-stubs packages in type checkers and it's suggested we use a "positive" masking approach, as a "negative" uninstall approach is not supported by type checkers that bundle the stubs: microsoft/pylance-release#840 (comment)

  7. sqla-tester commented on Jan 9, 2022

    @sqla-tester
    Collaborator

    Mike Bayer has proposed a fix for this issue in the main branch:

    WIP for ORM typing https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/3495

  8. 108 remaining items

  9. kapildagur commented on Aug 7, 2025

    @kapildagur
    Contributor

    Hello @CaselIT ,
    This weekend I'm planning for sql.crud module, Plz ack me so that I'll plan my day...
    Thanks!

  10. CaselIT commented on Aug 7, 2025

    @CaselIT
    MemberAuthor

    ok!

  11. sqla-tester commented on Oct 8, 2025

    @sqla-tester
    Collaborator

    Denis Laxalde referenced this issue:

    Complete type annotations of sqlalchemy.engine.cursor module https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/6187

  12. sqla-tester commented on Oct 8, 2025

    @sqla-tester
    Collaborator

    Denis Laxalde referenced this issue:

    Complete type annotations of sqlalchemy.engine.cursor module https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/6192

  13. added a commit that references this issue on Nov 28, 2025
  14. removed
    PRs (with tests!) welcomea fix or feature which is appropriate to be implemented by volunteers
    on Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

EpicUse this tag to define an Issue as an Epic that contains multiple issues for a targetedbig joba major change that requires a lot of knowledge and workcode review in progresscode has been provided that's in review as PR and/or gerrithelp wantedExtra attention is neededtime consuming / tediousan issue that will take a long time to complete, even though it may be "easy"typingpep -484 typing issues. independent of "mypy"

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions