Commit 4597228
Pin copy.copy and copy.deepcopy guards on dbapi reject classes
The existing pickle-guard test pins ``pickle.dumps`` rejection on
Connection / Cursor / AsyncConnection / AsyncCursor — but copy.copy
and copy.deepcopy are independent surfaces that route through
__reduce_ex__ → __reduce__ as well. Today they pass through to the
same TypeError because the rejection lives on __reduce__, but a
future regression that adds a __copy__ / __deepcopy__ hook would
silently produce a broken duplicate of a class that holds live
transports / asyncio locks.
Pin both copy paths explicitly. Mirrors the SA-adapter and client-
layer pin shape established by prior cycles.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent fff2faf commit 4597228
1 file changed
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
0 commit comments