dropbox / sqlalchemy-stubs

Mypy plugin and stubs for SQLAlchemy
Apache License 2.0
570 stars 101 forks source link

Add the __enter__ and __exit__ methods to Session. #231

Open howbazaar opened 2 years ago

howbazaar commented 2 years ago

As per https://github.com/sqlalchemy/sqlalchemy/blame/958f902b1fc528fed0be550bc573545de47ed854/lib/sqlalchemy/orm/session.py#L1131 the Session object has had __enter__ and __exit__ for about 17 months.

CLAassistant commented 2 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

mrtolkien commented 1 year ago

Any update on that issue? I'm trying to use mypy + pydantic + sqlalchemy in a project and needing to write # type: ignore on every single session opening is quite problematic.

Kfelts commented 1 year ago

Any update on that issue? I'm trying to use mypy + pydantic + sqlalchemy in a project and needing to write # type: ignore on every single session opening is quite problematic.

I'm here for the same reason. It's been almost a year since this was submitted.