[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2022-03-12 Thread Kevin Locke
Change by Kevin Locke : -- nosy: +kevinoid nosy_count: 10.0 -> 11.0 pull_requests: +29932 pull_request: https://github.com/python/cpython/pull/23172 ___ Python tracker ___

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2021-12-20 Thread Thomas Gläßle
Change by Thomas Gläßle : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list maili

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2021-12-20 Thread Thomas Gläßle
Thomas Gläßle added the comment: Ok, it seems at least the incorrect documentation has been fixed in the mean time. I'm going to close this as there seems to be no capacity to deal with this. -- ___ Python tracker

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2021-12-13 Thread STINNER Victor
STINNER Victor added the comment: One option is to keep the current behavior by default, but support a new "/regex/" format. The /regex/ format is commonly used in Perl and sed. Example to ignore warnings containing "deprecated" string in their message: python3 -W "ignore:/deprecated/"

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2021-12-13 Thread STINNER Victor
STINNER Victor added the comment: > Adding regular expression support to -W and PYTHONWARNINGS env var turns the > options into potential attack vectors. Why would an attacker control these options? If an attacker controls how Python is run, they are more efficient way to take control of Py

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2021-12-13 Thread STINNER Victor
STINNER Victor added the comment: Oh, I didn't know this issue. I closed my issue bpo-43862 as a duplicate. -- nosy: +vstinner ___ Python tracker ___ _

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2021-12-11 Thread Christian Heimes
Christian Heimes added the comment: Adding regular expression support to -W and PYTHONWARNINGS env var turns the options into potential attack vectors. It can introduce REDOS vulnerability. -- keywords: +security_issue nosy: +christian.heimes type: -> enhancement versions: +Python 3.

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2020-07-15 Thread Nikolaus Rath
Change by Nikolaus Rath : -- nosy: -nikratio ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2020-07-14 Thread Yongjik Kim
Yongjik Kim added the comment: Hi, sorry if I'm interrupting, but while we're at this, could we also not escape regex for "message" part? (Or at least amend the documentation to clarify that the message part is literal string match?) Currently, the docs on -W just say "The meaning of each o

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2020-07-11 Thread Thomas Gläßle
Thomas Gläßle added the comment: Hi, I have rebased this on master and fixed the minor conflict. Let me know if there is anything else I can do. Best, Thomas -- versions: +Python 3.10, Python 3.9 ___ Python tracker

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2020-07-08 Thread Marco Paolini
Marco Paolini added the comment: hello Thomas, do you need any help fixing the conflicts in your PR? even if Lib/warnings.py changed a little in the last 2 years, your PR is still good! -- nosy: +mpaolini ___ Python tracker

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2019-07-19 Thread daniel hahler
daniel hahler added the comment: Note that "module" might also be the filename (with ".py" removed). I've just created issue37634 - might be worth including in your PR if it makes sense to only document this. -- nosy: +blueyed ___ Python tracker

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2019-02-26 Thread Nick Coghlan
Nick Coghlan added the comment: I think the only reason I didn't mention this discrepancy in my doc updates is because I wasn't aware there *was* a discrepancy. The weird syntax was then just an incorrect amalgamation of "optional argument" notation with an improperly escaped regex suffix.

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2018-12-08 Thread kernc
Change by kernc : -- nosy: +kernc ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mai

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2018-10-27 Thread Thomas Gläßle
Thomas Gläßle added the comment: Hi, thanks for the consideration! Is there any reason to introduce different behaviour than with filterwarnings here? This increases the number of things to remember - and except for the dot regex syntax doesn't interfere with module names, so there is no big

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2018-10-27 Thread Ned Batchelder
Ned Batchelder added the comment: Another option is to make clear in the docs that the command line does not accept regular expressions, but only literal module names, and raise an error if a non-importable name (for example with asterisks in it) is specified. And while we are here: the docs

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2018-10-07 Thread Nikolaus Rath
Change by Nikolaus Rath : -- nosy: +nikratio title: -W option does not accept module regexes -> -W option and PYTHONWARNINGS env variable does not accept module regexes ___ Python tracker ___