You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[patch] Add 2to3 support for displaying warnings as Python comments #45375
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2021-10-20.22:37:49.660>created_at=<Date2007-08-27.02:20:52.046>labels= ['type-feature', 'expert-2to3']
title='[patch] Add 2to3 support for displaying warnings as Python comments'updated_at=<Date2021-10-20.22:40:39.144>user='https://bugs.python.org/adrianholovaty'
Per a Python-3000 mailing list discussion here -- http://mail.python.org/pipermail/python-3000/2007-August/009835.html --
I have implemented an addition to the 2to3 utility that enables warnings
to be output as comments in Python source code instead of being logged
to stdout.
I'm also attaching 2to3_comment_warnings.diff, which is an example of
how we could integrate the insert_comment() method from the first patch
to replace the current functionality of fixes.basefix.BaseFix.warning().
I think this would be a good addition so I took Adrian's patch and brought it up to date. I'll need to expand the testing, but I think Benjamin's 1 and 3 are covered.
Activity
adrianholovaty commentedon Aug 27, 2007
Per a Python-3000 mailing list discussion here --
http://mail.python.org/pipermail/python-3000/2007-August/009835.html --
I have implemented an addition to the 2to3 utility that enables warnings
to be output as comments in Python source code instead of being logged
to stdout.
See the attached patch and a description of the changes here:
http://mail.python.org/pipermail/python-3000/2007-August/009881.html
adrianholovaty commentedon Aug 27, 2007
I'm also attaching 2to3_comment_warnings.diff, which is an example of
how we could integrate the insert_comment() method from the first patch
to replace the current functionality of fixes.basefix.BaseFix.warning().
benjaminp commentedon Sep 12, 2008
On the patch:
point needs to be reinforced to users.
This is interesting. I'd like to have someone else weigh in before it is
applied though.
briancurtin commentedon Jan 7, 2010
I think this would be a good addition so I took Adrian's patch and brought it up to date. I'll need to expand the testing, but I think Benjamin's 1 and 3 are covered.
BreamoreBoy commentedon Sep 18, 2010
Removed 2.7 as too late, can we get this into 3.2?
merwok commentedon Mar 14, 2014
(2to3 is an exception and can get improvements in stable versions.)