]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Align `AsyncSession` method annotations with `Session` equivalents
authorJanek Nouvertné <25355197+provinzkraut@users.noreply.github.com>
Sun, 11 Jun 2023 10:07:26 +0000 (06:07 -0400)
committersqla-tester <sqla-tester@sqlalchemy.org>
Sun, 11 Jun 2023 10:07:26 +0000 (06:07 -0400)
commit15dcc2342a7e6b9e4d7d2d67a8963005aa15ad93
treeded7ee7d22bafae9a6c6a8ad9dd9e2aa5b523307
parent1527d63085d13fd614ef8890206dfceb2d22cc12
Align `AsyncSession` method annotations with `Session` equivalents

Fixes a few differences in the parameter signatures of `asyncio.ext.AsyncSession` that were misaligned with `orm.Session`. Fixes #9925

### Description

- Change the annotation of the `params` parameter of `.scalar`, `.scalars` and `.stream_scalars` from `_CoreSingleExecuteParams` to `_CoreAnyExecuteParams`
- Add named keyword arguments `bind_arguments` and `execution_options` to `.connection`

### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [x] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**

Closes: #9929
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9929
Pull-request-sha: 481f3ad94efab14f7a63a38c195810811b7ed90f

Change-Id: I84c5a68f5d95c903dd64928a23ad0cb796df778c
lib/sqlalchemy/ext/asyncio/scoping.py
lib/sqlalchemy/ext/asyncio/session.py