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

Add the __enter__ and __exit__ methods to Session.

Open howbazaar opened this issue 4 years ago • 3 comments

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.

howbazaar avatar Nov 18 '21 05:11 howbazaar

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.

CLAassistant avatar Apr 16 '22 21:04 CLAassistant

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.

mrtolkien avatar Oct 22 '22 06:10 mrtolkien

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.

Kfelts avatar Nov 02 '22 15:11 Kfelts