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 mhmdkanj
Recipients docs@python, dstufft, eric.araujo, mhmdkanj, rhettinger, vstinner
Date 2020-12-21.21:51:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1608587511.69.0.0641060569121.issue42705@roundup.psfhosted.org>
In-reply-to
Content
Thanks Raymond for the input.
So with some experimentation, the __enter__() & __exit__() functions could be traceable when other kinds of objects are used with the context manager (i.e with statement using file IO or custom class objects). However, just when the object is a Lock object, then this is not the case anymore - which basically shows an unusual behavior if we were to think that such statements are executed for a specific thread. Also please mind that the threading module already implements settrace() and setprofile() methods like the sys module to extend tracing capabilities.
History
Date User Action Args
2020-12-21 21:51:51mhmdkanjsetrecipients: + mhmdkanj, rhettinger, vstinner, eric.araujo, docs@python, dstufft
2020-12-21 21:51:51mhmdkanjsetmessageid: <1608587511.69.0.0641060569121.issue42705@roundup.psfhosted.org>
2020-12-21 21:51:51mhmdkanjlinkissue42705 messages
2020-12-21 21:51:51mhmdkanjcreate