[issue42075] Verbose/confusing default format on warnings

2020-10-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: An application *can* change warnings. See lib/idlelib/run for an example. Library code should not make changes as they will be global or overwritten. A project that is both can restrict the changes to when run as main module. -- nosy: +terry.reedy

[issue42075] Verbose/confusing default format on warnings

2020-10-18 Thread Mithil
Mithil added the comment: I also ran this on Fedora 32, python 3.8.6 and still got the same result. -- ___ Python tracker ___ ___ P

[issue42075] Verbose/confusing default format on warnings

2020-10-18 Thread Mithil
Mithil added the comment: I ran the file that you linked and this is what it printed. C:\Users\mithi\p\test\file.py:3: UserWarning: Danger danger danger Will Robinson!!! warnings.warn( As you see, the warnings.warn( line is not desirable. More details about my machine - Windows 10 python 3

[issue42075] Verbose/confusing default format on warnings

2020-10-18 Thread Steven D'Aprano
Steven D'Aprano 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

[issue42075] Verbose/confusing default format on warnings

2020-10-18 Thread Mithil
New submission from Mithil : The default format prints a lot of details like filename, line number, and the source code on that line. A particular case where the warn message is written on the next line like - warn( "Message here") Will only print warn( as the source code and not the entire