-  
-   Notifications  You must be signed in to change notification settings 
- Fork 33.3k
Closed
Labels
testsTests in the Lib/test dirTests in the Lib/test dir
Description
When I run my own automated tests against main, I get the following test failure on macOS and Ubuntu.
Warning -- warnings.filters was modified by test_check_c_globals Warning -- Before: (4544233792, [('error', None, <class 'BytesWarning'>, None, 0), ('default', None, <class 'Warning'>, None, 0), ('default', None, <class 'DeprecationWarning'>, '__main__', 0), ('ignore', None, <class 'DeprecationWarning'>, None, 0), ('ignore', None, <class 'PendingDeprecationWarning'>, None, 0), ('ignore', None, <class 'ImportWarning'>, None, 0), ('ignore', None, <class 'ResourceWarning'>, None, 0)], [('error', None, <class 'BytesWarning'>, None, 0), ('default', None, <class 'Warning'>, None, 0), ('default', None, <class 'DeprecationWarning'>, '__main__', 0), ('ignore', None, <class 'DeprecationWarning'>, None, 0), ('ignore', None, <class 'PendingDeprecationWarning'>, None, 0), ('ignore', None, <class 'ImportWarning'>, None, 0), ('ignore', None, <class 'ResourceWarning'>, None, 0)]) Warning -- After: (4544233792, [('error', None, <class 'BytesWarning'>, None, 0), ('default', None, <class 'Warning'>, None, 0), ('default', None, <class 'DeprecationWarning'>, '__main__', 0), ('ignore', None, <class 'DeprecationWarning'>, None, 0), ('ignore', None, <class 'PendingDeprecationWarning'>, None, 0), ('ignore', None, <class 'ImportWarning'>, None, 0), ('ignore', None, <class 'ResourceWarning'>, None, 0)], [('error', None, <class 'BytesWarning'>, None, 0), ('default', None, <class 'Warning'>, None, 0), ('default', None, <class 'DeprecationWarning'>, '__main__', 0), ('ignore', None, <class 'DeprecationWarning'>, None, 0), ('ignore', None, <class 'PendingDeprecationWarning'>, None, 0), ('ignore', None, <class 'ImportWarning'>, None, 0), ('ignore', None, <class 'ResourceWarning'>, None, 0), ('ignore', None, <class 'pkg_resources.PEP440Warning'>, None, 0)]) We've previously added code to preserve warnings.filters around tests that import pkg_resources it seems. I'm not entirely sure where it's coming from in this case, as it doesn't repro on Windows (or apparently on our buildbots), but I guess we need the same preservation around it.
@ericsnowcurrently I think this may be yours?
Metadata
Metadata
Assignees
Labels
testsTests in the Lib/test dirTests in the Lib/test dir