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 iritkatriel
Recipients iritkatriel, jdemeyer, pablogsal, pitrou
Date 2020-05-12.18:07:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
While migrating our codebase from python 3.7 to python 3.8, one of our unit tests segfaulted and I’ve narrowed it down to the change of typeobject.c in:

  commit 351c67416ba4451eb3928fa0b2e933c2f25df1a3
  Author: Jeroen Demeyer <>
  Date:   Fri May 10 19:21:11 2019 +0200
  bpo-35983: skip trashcan for subclasses (GH-11841)   

It seems that Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible (as claimed in the comment above their definition in object.h).

This patch has a unit test that currently fails, along with the change in typeobject.c that restores the code that broke it:

I believe that this change needs to be pushed until the Py_TRASHCAN_SAFE_BEGIN/END are removed and all users are forced to migrate to the new Py_TRASHCAN_BEGIN/END.
Date User Action Args
2020-05-12 18:07:29iritkatrielsetrecipients: + iritkatriel, pitrou, jdemeyer, pablogsal
2020-05-12 18:07:29iritkatrielsetmessageid: <>
2020-05-12 18:07:29iritkatriellinkissue40608 messages
2020-05-12 18:07:29iritkatrielcreate