Title: doc: "module" of a warning might be its filename
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.9
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: blueyed
Priority: normal Keywords:

Created on 2019-07-19 23:02 by blueyed, last changed 2019-07-19 23:02 by blueyed.

Messages (1)
msg348201 - (view) Author: daniel hahler (blueyed) * Date: 2019-07-19 23:02
With e.g. DeprecationWarnings for "invalid escape sequence" the "module" part is the file name (with ".py" removed), because it calls PyErr_WarnExplicitObject directly:

While this properly cannot be fixed to have the module name (yet), it should at least be documented then.

With `warnings.warn` the module is set via `setup_context` (

This conflicts with (issue34624), which enables the documented behavior to not escape the pattern there.
Date User Action Args
2019-07-19 23:02:26blueyedcreate