Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
corona10 committed Jun 3, 2025
commit e725c7f182b95f6dc4747a67e4a5e4aa5192300a
2 changes: 1 addition & 1 deletion Lib/test/test_sys.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ def __hash__(self):

@support.cpython_only
def test_get_object_tags(self):
keys = ("immortal", "interned", "deferred_refcount")
keys = ("immortal", "interned")
s = "foobar"
tags = sys.get_object_tags(s)
self.assertEqual(len(tags), len(keys))
Expand Down
13 changes: 0 additions & 13 deletions Python/sysmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1095,19 +1095,6 @@ sys_get_object_tags(PyObject *module, PyObject *op)
return NULL;
}
}

if (PyUnstable_Object_EnableDeferredRefcount(op)) {
if (PyDict_SetItemString(dict, "deferred_refcount", Py_True) < 0) {
Py_DECREF(dict);
return NULL;
}
}
else {
if (PyDict_SetItemString(dict, "deferred_refcount", Py_False) < 0) {
Py_DECREF(dict);
return NULL;
}
}
return dict;
}

Expand Down