Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write 2to3 fixer for collections.abc imports #83663

Closed
opoplawski mannequin opened this issue Jan 29, 2020 · 2 comments
Closed

Write 2to3 fixer for collections.abc imports #83663

opoplawski mannequin opened this issue Jan 29, 2020 · 2 comments
Labels
3.9 only security fixes topic-2to3 type-feature A feature request or enhancement

Comments

@opoplawski
Copy link
Mannequin

opoplawski mannequin commented Jan 29, 2020

BPO 39482
Nosy @benjaminp, @hroncok, @corona10, @tirkarthi
PRs
  • bpo-39482: Add a fixer to handling abstract base classes #18245
  • 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 2020-04-25.08:10:29.533>
    created_at = <Date 2020-01-29.04:03:13.021>
    labels = ['type-feature', 'expert-2to3', '3.9']
    title = 'Write 2to3 fixer for collections.abc imports'
    updated_at = <Date 2020-04-25.08:10:29.532>
    user = 'https://bugs.python.org/opoplawski'

    bugs.python.org fields:

    activity = <Date 2020-04-25.08:10:29.532>
    actor = 'corona10'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-04-25.08:10:29.533>
    closer = 'corona10'
    components = ['2to3 (2.x to 3.x conversion tool)']
    creation = <Date 2020-01-29.04:03:13.021>
    creator = 'opoplawski'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 39482
    keywords = ['patch']
    message_count = 2.0
    messages = ['360936', '367264']
    nosy_count = 5.0
    nosy_names = ['benjamin.peterson', 'opoplawski', 'hroncok', 'corona10', 'xtreak']
    pr_nums = ['18245']
    priority = 'normal'
    resolution = 'wont fix'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue39482'
    versions = ['Python 3.9']

    @opoplawski
    Copy link
    Mannequin Author

    opoplawski mannequin commented Jan 29, 2020

    fail2ban currently relies on 2to3 for python 3 support. Build now fails with python 3.9:

    Traceback (most recent call last):
      File "/builddir/build/BUILD/fail2ban-0.11.1/bin/fail2ban-testcases", line 61, in <module>
        tests = gatherTests(regexps, opts)
      File "./fail2ban/tests/utils.py", line 373, in gatherTests
        from . import clientreadertestcase
      File "./fail2ban/tests/clientreadertestcase.py", line 34, in <module>
        from ..client.jailreader import JailReader, extractOptions, splitWithOptions
      File "./fail2ban/client/jailreader.py", line 34, in <module>
        from .actionreader import ActionReader
      File "./fail2ban/client/actionreader.py", line 31, in <module>
        from ..server.action import CommandAction
      File "./fail2ban/server/action.py", line 33, in <module>
        from collections import MutableMapping
    ImportError: cannot import name 'MutableMapping' from 'collections' (/usr/lib64/python3.9/collections/__init__.py)

    @opoplawski opoplawski mannequin added 3.9 only security fixes topic-2to3 type-feature A feature request or enhancement labels Jan 29, 2020
    @hroncok hroncok mannequin changed the title Write 2to3 fixer for MutableMapping Write 2to3 fixer for collections.abc imports Jan 29, 2020
    @hroncok hroncok mannequin changed the title Write 2to3 fixer for MutableMapping Write 2to3 fixer for collections.abc imports Jan 29, 2020
    @corona10
    Copy link
    Member

    Since https://bugs.python.org/issue40360 is now discussing lib2to3 deprecating.
    The feature would not be needed.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes topic-2to3 type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant