Author William.Schwartz
Recipients William.Schwartz, kernc
Date 2018-08-21.05:12:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1534828331.29.0.56676864532.issue29620@psf.upfronthosting.co.za>
In-reply-to
Content
I am also running into this problem. I'm not 100%, but I'm pretty sure that looping over sys.modules and accessing __warningregistry__ on each module triggers one of my module's __getattr__ functions (PEP 562), which in turn uses setuptools entry points to import an arbitrary set of other modules.

Bizarrely, however, I cannot reproduce on macOS, only Linux. Presumably there's something platform dependent about how the default unittest test runner orders my tests, and hence which modules have already been loaded by the time I call assertWarnsRegex.
History
Date User Action Args
2018-08-21 05:12:11William.Schwartzsetrecipients: + William.Schwartz, kernc
2018-08-21 05:12:11William.Schwartzsetmessageid: <1534828331.29.0.56676864532.issue29620@psf.upfronthosting.co.za>
2018-08-21 05:12:11William.Schwartzlinkissue29620 messages
2018-08-21 05:12:10William.Schwartzcreate