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 serhiy.storchaka
Recipients benjamin.peterson, scufre, serhiy.storchaka, stutzbach
Date 2016-10-30.09:54:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Thank you for your report and patch Sebastian.

In Python 3 the solution can be simpler, just move the line "_PyObject_GC_UNTRACK(self);" above the line "textiowrapper_clear(self);". But calling PyObject_ClearWeakRefs() also should be moved up. Otherwise half-destroyed TextIOWrapper instance can be accessed via weak references. Following patches do this (and small refactoring).
Date User Action Args
2016-10-30 09:54:39serhiy.storchakasetrecipients: + serhiy.storchaka, benjamin.peterson, stutzbach, scufre
2016-10-30 09:54:39serhiy.storchakasetmessageid: <>
2016-10-30 09:54:39serhiy.storchakalinkissue28387 messages
2016-10-30 09:54:39serhiy.storchakacreate