Skip to content

Add fixer for "import exceptions" #73108

Closed

Description

@progval
mannequin
BPO 28922
Nosy @progval, @berkerpeksag
Superseder
  • bpo-2350: 'exceptions' import fixer
  • Files
  • fix_import_exceptions.py: Fixer for "import exceptions"
  • 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 2016-12-09.19:29:58.728>
    created_at = <Date 2016-12-09.16:11:44.041>
    labels = ['3.7', 'type-feature', 'expert-2to3']
    title = 'Add fixer for "import exceptions"'
    updated_at = <Date 2016-12-09.19:29:58.701>
    user = 'https://github.com/ProgVal'

    bugs.python.org fields:

    activity = <Date 2016-12-09.19:29:58.701>
    actor = 'berker.peksag'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-12-09.19:29:58.728>
    closer = 'berker.peksag'
    components = ['2to3 (2.x to 3.x conversion tool)']
    creation = <Date 2016-12-09.16:11:44.041>
    creator = 'Valentin.Lorentz'
    dependencies = []
    files = ['45817']
    hgrepos = []
    issue_num = 28922
    keywords = []
    message_count = 2.0
    messages = ['282787', '282799']
    nosy_count = 2.0
    nosy_names = ['Valentin.Lorentz', 'berker.peksag']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '2350'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue28922'
    versions = ['Python 3.5', 'Python 3.6', 'Python 3.7']

    Activity

    1. progval commented on Dec 9, 2016

      progvalmannequin
      MannequinAuthor

      Hi,

      Here is a fixer to remove "import exceptions" from Python 2 code and replace "exceptions.X" with "X".

      Valentin

    2. berkerpeksag commented on Dec 9, 2016

      @berkerpeksag
      Member

      Thanks for the report and for the patch! This is a duplicate of bpo-2350.

      Note that we accept patches from hg.python.org, not standalone Python files. See http://cpython-devguide.readthedocs.io/en/latest/patch.html for details.

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

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions