Commit 9c48a1e
committed
Constrain lru_cache proxy detection to BaseObjectProxy subclasses.
The previous check for an __self_setattr__ attribute on the bound
instance was too loose, since an unrelated class could expose that name
and be misrouted into the proxy cache storage path. Detection now gates
on issubclass(type(instance), BaseObjectProxy), using type() so the real
proxy type is seen rather than the wrapped object's type reported by the
proxy __class__ override, then stores via __self_setattr__.1 parent 4053838 commit 9c48a1e
1 file changed
Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
0 commit comments