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 Feng Yu
Recipients Feng Yu, Gerrit.Holl, THRlWiTi, brett.cannon, kernc, mitya57, pitrou, remram, torsten
Date 2020-01-05.01:28:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1578187696.46.0.361169345651.issue22543@roundup.psfhosted.org>
In-reply-to
Content
Coming here from https://github.com/astropy/astropy/issues/9832#issuecomment-570751353

Importing the named module during warning initialization is somewhat like code injection. And it may introduce unintended side-effects -- for example if this causes some 3rd party libraries to initialize too early?

String matching on the class name of every class in the hierarchy is safer, as there is no 'expected' code execution.
History
Date User Action Args
2020-01-05 01:28:16Feng Yusetrecipients: + Feng Yu, brett.cannon, pitrou, THRlWiTi, torsten, Gerrit.Holl, mitya57, remram, kernc
2020-01-05 01:28:16Feng Yusetmessageid: <1578187696.46.0.361169345651.issue22543@roundup.psfhosted.org>
2020-01-05 01:28:16Feng Yulinkissue22543 messages
2020-01-05 01:28:16Feng Yucreate