diff options
author | Arie Bovenberg <a.c.bovenberg@gmail.com> | 2022-02-01 15:08:19 -0500 |
---|---|---|
committer | sqla-tester <sqla-tester@sqlalchemy.org> | 2022-02-01 15:08:19 -0500 |
commit | 0409c88c297efa324218340b265a8d107d57deee (patch) | |
tree | 2337be6a74df17bd189a89a4c21254a50ed2d8ad /lib/sqlalchemy/dialects/mysql/aiomysql.py | |
parent | d6046f5fcf3732df1a8a08274501efcffc6253f2 (diff) | |
download | sqlalchemy-0409c88c297efa324218340b265a8d107d57deee.tar.gz |
Fix overlapping slots, base classes without slots
Some `__slots__` were not in order.
Fixes #7527
### Description
I'm fixing two types of slots mistakes:
- [x] remove overlapping slots (i.e. slots already defined on a base class)
- [x] fix broken inheritance (i.e. slots class inheriting from a non-slots class)
- [x] slots added to base class `TransactionalContext`. It seemed to use two attributes, which I've added as slots.
- [x] empty slots removed from `ORMOption`. Its base class explicitly makes use of `__dict__` so empty slots don't add anything.
- [x] empty slots added to `PostLoader`. It doesn't appear to use any slots not already defined on its base classes.
- [x] empty slots added to `IterateMappersMixin`. It doesn't appear to use any slots not already defined on its subclasses.
- [x] empty slots added to `ImmutableContainer`. It doesn't use any fields.
- [x] empty slots added to `OperatorType`. It's a protocol.
- [x] empty slots added to `InternalTraversal`, `_HasTraversalDispatch`. They don't seem to use attributes on their own.
### Checklist
This pull request is:
- [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.
**Have a nice day!**
Closes: #7589
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7589
Pull-request-sha: 70a9c4d46916b7c6907eb1d3ad4f7033ec964191
Change-Id: I6c6e3e69c3c34d0f3bdda7f0684849834fdd1863
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/aiomysql.py')
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/aiomysql.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/aiomysql.py b/lib/sqlalchemy/dialects/mysql/aiomysql.py index 975467c24..df716346e 100644 --- a/lib/sqlalchemy/dialects/mysql/aiomysql.py +++ b/lib/sqlalchemy/dialects/mysql/aiomysql.py @@ -179,7 +179,7 @@ class AsyncAdapt_aiomysql_ss_cursor(AsyncAdapt_aiomysql_cursor): class AsyncAdapt_aiomysql_connection(AdaptedConnection): await_ = staticmethod(await_only) - __slots__ = ("dbapi", "_connection", "_execute_mutex") + __slots__ = ("dbapi", "_execute_mutex") def __init__(self, dbapi, connection): self.dbapi = dbapi |