Skip to content

[patch] Add 2to3 support for displaying warnings as Python comments #45375

Closed

Description

@adrianholovaty
BPO 1034
Nosy @benjaminp, @merwok, @briancurtin
Superseder
  • bpo-45544: Close 2to3 issues and list them here
  • Files
  • 2to3_insert_comment.diff
  • 2to3_comment_warnings.diff
  • issue1034.diff: patch against r77336
  • 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 = None
    closed_at = <Date 2021-10-20.22:37:49.660>
    created_at = <Date 2007-08-27.02:20:52.046>
    labels = ['type-feature', 'expert-2to3']
    title = '[patch] Add 2to3 support for displaying warnings as Python comments'
    updated_at = <Date 2021-10-20.22:40:39.144>
    user = 'https://bugs.python.org/adrianholovaty'

    bugs.python.org fields:

    activity = <Date 2021-10-20.22:40:39.144>
    actor = 'iritkatriel'
    assignee = 'collinwinter'
    closed = True
    closed_date = <Date 2021-10-20.22:37:49.660>
    closer = 'iritkatriel'
    components = ['2to3 (2.x to 3.x conversion tool)']
    creation = <Date 2007-08-27.02:20:52.046>
    creator = 'adrianholovaty'
    dependencies = []
    files = ['8332', '8333', '15769']
    hgrepos = []
    issue_num = 1034
    keywords = ['patch']
    message_count = 6.0
    messages = ['55331', '55332', '73152', '97342', '116774', '213599']
    nosy_count = 5.0
    nosy_names = ['collinwinter', 'adrianholovaty', 'benjamin.peterson', 'eric.araujo', 'brian.curtin']
    pr_nums = []
    priority = 'normal'
    resolution = 'wont fix'
    stage = 'resolved'
    status = 'closed'
    superseder = '45544'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue1034'
    versions = ['Python 2.7', 'Python 3.3', 'Python 3.4']

    Activity

    1. adrianholovaty commented on Aug 27, 2007

      adrianholovatymannequin
      MannequinAuthor

      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

    2. adrianholovaty commented on Aug 27, 2007

      adrianholovatymannequin
      MannequinAuthor

      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().

    3. self-assigned this
      on Sep 6, 2007
    4. benjaminp commented on Sep 12, 2008

      @benjaminp
      Contributor

      On the patch:

      1. I think both a log message and the comment should be written. The
        point needs to be reinforced to users.
      2. I'd like to see some tests.
      3. Maybe an option to turn the auto comments off?

      This is interesting. I'd like to have someone else weigh in before it is
      applied though.

    5. briancurtin commented on Jan 7, 2010

      @briancurtin
      Member

      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.

    6. BreamoreBoy commented on Sep 18, 2010

      BreamoreBoymannequin
      Mannequin

      Removed 2.7 as too late, can we get this into 3.2?

    7. merwok commented on Mar 14, 2014

      @merwok
      Member

      (2to3 is an exception and can get improvements in stable versions.)

    8. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions