New submission from Ken Jin <kenjin4...@gmail.com>:
Ref: comment chain at https://github.com/python/cpython/pull/27008#discussion_r663450441. setup_ga fails only if PyTuple_Pack fails, which usually happens when Python is out of memory. The cleanup code for setup_ga shouldn't use PyObject_GC_DEL as mentioned in Pablo's comment above. I don't know how to add a test for out of memory, so I'll send a PR without test soon. ---------- messages: 396944 nosy: kj, pablogsal priority: normal severity: normal status: open title: types.GenericAlias should decref instead of using delete in tp_new versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44562> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com