Skip to content

Check 2to3 for support of print function. #46664

Closed

Description

@ericvsmith
BPO 2412
Nosy @ericvsmith, @benjaminp, @wolever
Files
  • print_function_detection.diff
  • 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 2009-07-12.17:07:09.633>
    created_at = <Date 2008-03-18.23:42:17.813>
    labels = ['type-bug', 'expert-2to3']
    title = 'Check 2to3 for support of print function.'
    updated_at = <Date 2009-07-12.17:07:09.632>
    user = 'https://github.com/ericvsmith'

    bugs.python.org fields:

    activity = <Date 2009-07-12.17:07:09.632>
    actor = 'benjamin.peterson'
    assignee = 'collinwinter'
    closed = True
    closed_date = <Date 2009-07-12.17:07:09.633>
    closer = 'benjamin.peterson'
    components = ['2to3 (2.x to 3.x conversion tool)']
    creation = <Date 2008-03-18.23:42:17.813>
    creator = 'eric.smith'
    dependencies = []
    files = ['10081']
    hgrepos = []
    issue_num = 2412
    keywords = ['patch']
    message_count = 6.0
    messages = ['64017', '64085', '64087', '65709', '65830', '90453']
    nosy_count = 4.0
    nosy_names = ['collinwinter', 'eric.smith', 'benjamin.peterson', 'wolever']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue2412'
    versions = ['Python 2.6']

    Activity

    1. ericvsmith commented on Mar 18, 2008

      @ericvsmith
      MemberAuthor

      bpo-1633807 is a backport of the print function to 2.6, using a
      __future__ import. Once it is committed, we need to ensure that 2to3
      does the right thing (namely, nothing) with print functions in modules
      that have the __future__ import.

    2. wolever commented on Mar 19, 2008

      @wolever
      Member

      I've updated the fixer (checkin to come shortly), but 2to3 gets upset when
      you it comes across print statements with kwargs (eg: print("spam", end="
      ")), so the tests will be commented out 'till this is fixed.

    3. wolever commented on Mar 19, 2008

      @wolever
      Member

      As of r61635, the fix_print fixer has been fixed and tests have been added
      (which will assert False when 2to3 is fixed so it can handle
      print(**kwargs)).

    4. wolever commented on Apr 24, 2008

      @wolever
      Member

      Here is a patch that will detect a from __future__ import print_function
      and adjust the grammar appropriately.

      Any objections?

    5. collinwinter commented on Apr 26, 2008

      collinwintermannequin
      Mannequin

      Reviewing...

    6. benjaminp commented on Jul 12, 2009

      @benjaminp
      Contributor

      Fixed in r73981.

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

      topic-2to3type-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions