diff options
author | Nils Philippsen <nils@tiptoe.de> | 2023-02-28 16:04:54 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2023-03-04 11:09:57 -0500 |
commit | 80b7c608835f1be5418d8ed567664654e8b583e3 (patch) | |
tree | cb130762a03034df733954dedf2aa68f9196f88b /lib/sqlalchemy/engine/cursor.py | |
parent | da70478eb2eafe9c76b836217371e029c3c820e3 (diff) | |
download | sqlalchemy-80b7c608835f1be5418d8ed567664654e8b583e3.tar.gz |
restore old *args approach for MutableDict.pop()
The typing change in ba0e508141206efc55cdab91df21c1
changed the semantics of pop() and possibly setdefault() in order to
try working at runtime with a two-argument signature. however
the implementation for this in cpython likely uses a strict `*args`
approach where the lack of the second parameter is explicit, rather
than matching to a constant. Restore the old implementation inside
of a "not TYPE_CHECKING" block while keeping the type annotated forms
intact for typing only.
Fixed regression caused by typing added to ``sqlalchemy.ext.mutable`` for
:ticket:`8667`, where the semantics of the ``.pop()`` method changed such
that the method was non-working. Pull request courtesy Nils Philippsen.
Fixes: #9380
Closes: #9381
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9381
Pull-request-sha: fd903ce1b949d2af26ceb6c2159ad84aab007f3d
Change-Id: I213e52f51a795801aacf05307e38cc8c89b54e12
Diffstat (limited to 'lib/sqlalchemy/engine/cursor.py')
0 files changed, 0 insertions, 0 deletions