[issue42075] Verbose/confusing default format on warnings

Steven D'Aprano report at bugs.python.org
Sun Oct 18 18:32:05 EDT 2020


Steven D'Aprano <steve+python at pearwood.info> added the comment:

3.9 and older are all in feature freeze, so no changes in behaviour will be considered for them.

I'm afraid I cannot replicate the behaviour you describe. When I try, the full warning message is correctly displayed. See the attached file.

Importing it from the interactive interpreter gives:

    >>> import warntest
    /home/steve/warntest.py:5: UserWarning: Danger danger danger Will Robinson!!!
      "Danger danger danger Will Robinson!!!"


and running it from the commandline:


$ python3 ~/warntest.py 
/home/steve/warntest.py:5: UserWarning: Danger danger danger Will Robinson!!!
  "Danger danger danger Will Robinson!!!"


Can you provide a minimal working example of the issue?

----------
nosy: +steven.daprano
versions:  -Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49526/warntest.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42075>
_______________________________________


More information about the Python-bugs-list mailing list