This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author blueyed
Recipients blueyed
Date 2019-07-19.23:02:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1563577346.06.0.11337043317.issue37634@roundup.psfhosted.org>
In-reply-to
Content
With e.g. DeprecationWarnings for "invalid escape sequence" the "module" part is the file name (with ".py" removed), because it calls PyErr_WarnExplicitObject directly:
https://github.com/python/cpython/blob/3cba3d3c55f230a59174a0dfcafb1d4685269e60/Python/ast.c#L4668-L4692

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` (https://github.com/python/cpython/blob/3cba3d3c55f230a59174a0dfcafb1d4685269e60/Python/_warnings.c#L932-L933).

This conflicts with https://github.com/python/cpython/pull/9358 (issue34624), which enables the documented behavior to not escape the pattern there.
History
Date User Action Args
2019-07-19 23:02:26blueyedsetrecipients: + blueyed
2019-07-19 23:02:26blueyedsetmessageid: <1563577346.06.0.11337043317.issue37634@roundup.psfhosted.org>
2019-07-19 23:02:25blueyedlinkissue37634 messages
2019-07-19 23:02:25blueyedcreate