STINNER Victor added the comment: Hum, this issue is a regression caused by the issue #23839. The environment warning was already fixed by the issue #18383 (duplicate: issue #26742):
New changeset f57f4e33ba5e by Martin Panter in branch '3.5': Issue #18383: Avoid adding duplicate filters when warnings is reloaded https://hg.python.org/cpython/rev/f57f4e33ba5e The problem is that _sre.SRE_Pattern doesn't import rich compare: so two patterns are only equal if it's exactly the same object... which is likely when re caches the compiled expression... But the Python test runner now starts by clearing the re cache! I see different options: * Find something else to not re-initialize warning filters, "_processoptions(sys.warnoptions)" in warnings.py. * Fix warnings._add_filter() to implement a custom comparator operator for regular expression objects: compare pattern and flags * Implement comparision in _sre.SRE_Pattern ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28688> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com