Skip to content

Commit f9c916d

Browse files
gh-74876: Use an interned name to get copyreg.Proxy.obj in _pickle
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 59bf799 commit f9c916d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Modules/_pickle.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4671,7 +4671,7 @@ memo_clear_weak_only(PicklerObject *self, Py_ssize_t *value)
46714671
static int
46724672
save_proxy(PickleState *st, PicklerObject *self, PyObject *obj)
46734673
{
4674-
PyObject *wrapped = PyObject_GetAttrString(obj, "obj");
4674+
PyObject *wrapped = PyObject_GetAttr(obj, &_Py_ID(obj));
46754675
if (wrapped == NULL)
46764676
return -1;
46774677

0 commit comments

Comments
 (0)