◐ Shell
clean mode source ↗

bpo-31975 (PEP 565): Show DeprecationWarning in __main__ by ncoghlan · Pull Request #4458 · python/cpython

ncoghlan

@ncoghlan ncoghlan changed the title bpo-31875 (PEP 565): Show DeprecationWarning in __main__ bpo-31975 (PEP 565): Show DeprecationWarning in __main__

Dec 30, 2017
- primary change is to add a new default filter entry for
  'default::DeprecationWarning:__main__'
- secondary change is an internal one to cope with plain
  strings in the warning module's internal filter list
  (this avoids the need to create a compiled regex object
  early on during interpreter startup)
While CPython doesn't implicitly import `warnings` at startup,
some other implementations might do so. Explicitly clearing the
module cache ensures the subprocess also gets the pure Python
version, no matter what.

@ncoghlan ncoghlan deleted the issue-31975-main-DeprecationWarning-filter branch

March 30, 2018 07:52