diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-08-31 11:07:23 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-08-31 14:31:34 -0400 |
| commit | d3e0b8e750d864766148cdf1a658a601079eed46 (patch) | |
| tree | 7b6ee55bbd18e6fa73b299f46b231abbae8780f5 /lib/sqlalchemy/sql | |
| parent | ec65def6bffa94d1c89ae5896e4d7e85f9abe84a (diff) | |
| download | sqlalchemy-d3e0b8e750d864766148cdf1a658a601079eed46.tar.gz | |
run update_subclass anytime we add new clslevel dispatch
Fixed event listening issue where event listeners added to a superclass
would be lost if a subclass were created which then had its own listeners
associated. The practical example is that of the :class:`.sessionmaker`
class created after events have been associated with the
:class:`_orm.Session` class.
Fixes: #8467
Change-Id: I9bdba8769147e30110a09900d4a577e833ac3af9
Diffstat (limited to 'lib/sqlalchemy/sql')
| -rw-r--r-- | lib/sqlalchemy/sql/annotation.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/annotation.py b/lib/sqlalchemy/sql/annotation.py index 95dc1d4d4..86b2952cb 100644 --- a/lib/sqlalchemy/sql/annotation.py +++ b/lib/sqlalchemy/sql/annotation.py @@ -559,7 +559,8 @@ def _new_annotation_type( def _prepare_annotations( - target_hierarchy: Type[SupportsAnnotations], base_cls: Type[Annotated] + target_hierarchy: Type[SupportsWrappingAnnotations], + base_cls: Type[Annotated], ) -> None: for cls in util.walk_subclasses(target_hierarchy): _new_annotation_type(cls, base_cls) |
