What's New in Python 3.15: warnings * Improve filtering by module in warnings.wa...

@hugovk@mastodon.social

What's New in Python 3.15:

warnings

* Improve filtering by module in warnings.warn_explicit() if no module argument is passed. It now tests the module regular expression in the warnings filter not only against the filename with .py stripped, but also against module names constructed starting from different parent directories of the filename (with /__init__.py, .py and, on Windows, .pyw stripped). (Contributed by Serhiy Storchaka.)

docs.python.org/3.15/whatsnew/

#Python #Python315 #WhatsNew