This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jkloth
Recipients jkloth, vstinner
Date 2022-02-26.01:29:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1645838978.31.0.114008331345.issue46857@roundup.psfhosted.org>
In-reply-to
Content
Good news, the difference on Windows was easy enough to find, bad news total refs are now negative!

--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -3647,8 +3647,7 @@ _PyBuiltins_AddExceptions(PyObject *bltinmod)

 #define INIT_ALIAS(NAME, TYPE) \
     do { \
-        Py_INCREF(PyExc_ ## TYPE); \
-        Py_XDECREF(PyExc_ ## NAME); \
+        Py_XSETREF(PyExc_ ## NAME, PyExc_ ## TYPE); \
         PyExc_ ## NAME = PyExc_ ## TYPE; \
         if (PyDict_SetItemString(mod_dict, # NAME, PyExc_ ## NAME)) { \
             return -1; \

As the PyExc_* aliases just deprecated names for PyExc_OSError, there is no need to increment their refcounts.  Or they could be decremented in Fini().  Or they could finally be removed entirely.
History
Date User Action Args
2022-02-26 01:29:38jklothsetrecipients: + jkloth, vstinner
2022-02-26 01:29:38jklothsetmessageid: <1645838978.31.0.114008331345.issue46857@roundup.psfhosted.org>
2022-02-26 01:29:38jklothlinkissue46857 messages
2022-02-26 01:29:38jklothcreate