diff options
| author | Yurii Karabas <1998uriyyo@gmail.com> | 2023-02-07 17:43:26 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2023-02-08 09:23:40 -0500 |
| commit | 7e4c4b8d5c18100b0db58f4d29fac5494fc95b52 (patch) | |
| tree | 7f1484bcd8ea413b46063a7f7309eea82718e79c /lib/sqlalchemy/util | |
| parent | 33dc651030b900bad31842df927fb8454b9a75d1 (diff) | |
| download | sqlalchemy-7e4c4b8d5c18100b0db58f4d29fac5494fc95b52.tar.gz | |
Remove `typing.Self` workaround
Remove ``typing.Self`` workaround, now using :pep:`673` for most methods
that return ``Self``. Pull request courtesy Yurii Karabas.
Fixes: #9254
Closes: #9255
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9255
Pull-request-sha: 2947df8ada79f5c3afe9c838e65993302199c2f7
Change-Id: Ic32015ad52e95a61f3913d43ea436aa9402804df
Diffstat (limited to 'lib/sqlalchemy/util')
| -rw-r--r-- | lib/sqlalchemy/util/typing.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/util/typing.py b/lib/sqlalchemy/util/typing.py index 755185c9b..9e6df0d35 100644 --- a/lib/sqlalchemy/util/typing.py +++ b/lib/sqlalchemy/util/typing.py @@ -48,6 +48,7 @@ if True: # zimports removes the tailing comments from typing_extensions import TypeAlias as TypeAlias # 3.10 from typing_extensions import TypedDict as TypedDict # 3.8 from typing_extensions import TypeGuard as TypeGuard # 3.10 + from typing_extensions import Self as Self # 3.11 _T = TypeVar("_T", bound=Any) @@ -57,7 +58,6 @@ _KT_contra = TypeVar("_KT_contra", contravariant=True) _VT = TypeVar("_VT") _VT_co = TypeVar("_VT_co", covariant=True) -Self = TypeVar("Self", bound=Any) if compat.py310: # why they took until py310 to put this in stdlib is beyond me, |
