sqlalchemy2-stubs icon indicating copy to clipboard operation
sqlalchemy2-stubs copied to clipboard

PEP-484 typing stubs for SQLAlchemy 1.4

Results 45 sqlalchemy2-stubs issues
Sort by recently updated
recently updated
newest added
trafficstars

**Describe the bug** We have a statically typed dictionary that has values of type `Cast[Decimal]` & it seems to be valid, since we cast column value to `FLOAT`. But the...

bug
use case

https://github.com/sqlalchemy/sqlalchemy/commit/97d922663a0350c6ce026ecfbde8010ca1bc0c37 implements new methods: :meth:`_asyncio.AsyncSession.in_nested_transaction`, :meth:`_asyncio.AsyncSession.get_transaction`, :meth:`_asyncio.AsyncSession.get_nested_transaction`. :func:`_asyncio.async_object_session`, :func:`_asyncio.async_session` as well as a new :class:`_orm.InstanceState` attribute :attr:`_orm.InstanceState.asyncio_session`

enhancement
mypy

This issue is a placeholder for now so I don't forget, I'll write some examples of problems we cannot easily type using stubs only in the coming days.

mypy

**Describe the bug** When functions are called from the `sqlalchemy.func` import they are all of type `sqlalchemy.sql.functions.Function[sqlalchemy.sql.sqltypes.NullType]`. **Expected behavior** Have the same type when importing from: - `sqlalchemy.func` - `sqlalchemy.sql.functions`...

bug

**Describe the bug** The compile decorator is not fully typed. Therefore mypy complains when using it **Expected behavior** Mypy doesn't complain **To Reproduce** Use compile as a decorator **Error** ```...

bug
missing type

**Is your feature request related to a problem? Please describe.** A typical typed SQLAlchemy model looks like this: ```python class Model(Base): name: Mapped[str] = Column(Unicode(100), nullable=True) ``` This works fine...

bug
missing type

fixes https://github.com/sqlalchemy/sqlalchemy2-stubs/issues/236

`MemoizedHasCacheKey` is imported from sql.base while it is defined in sql.traversals. I suspect this today (silently) break some stuff.

requires triage

Sorry, I don't have much time, but mypy screams here: ``` my_valyes = values( column("x", Integer), # here column("y", Integer), # and here name="my_values", ).data(my_values_data) ``` with: ``` error: Argument...

bug

**Describe your question** I'm a new user to SQLAlchemy and I'm confused on the current state of stubs. Using the pylance/typeshed stubs as well as the dropbox stubs give me...

question