Skip to content

Tools/i18n/pygettext.py: replace deprecated imp module with importlib #70826

Closed

Description

@vstinner
BPO 26639
Nosy @brettcannon, @ncoghlan, @pitrou, @vstinner, @ezio-melotti, @ericsnowcurrently, @berkerpeksag, @serhiy-storchaka
Files
  • pygettext_imp.patch
  • 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-04-12.16:47:15.115>
    created_at = <Date 2016-03-25.10:50:05.417>
    labels = ['type-feature']
    title = 'Tools/i18n/pygettext.py: replace deprecated imp module with importlib'
    updated_at = <Date 2016-04-12.19:06:40.895>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2016-04-12.19:06:40.895>
    actor = 'zach.ware'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-04-12.16:47:15.115>
    closer = 'vstinner'
    components = ['Demos and Tools']
    creation = <Date 2016-03-25.10:50:05.417>
    creator = 'vstinner'
    dependencies = []
    files = ['42286']
    hgrepos = []
    issue_num = 26639
    keywords = ['patch']
    message_count = 6.0
    messages = ['262420', '262644', '263256', '263264', '263266', '263267']
    nosy_count = 10.0
    nosy_names = ['brett.cannon', 'ncoghlan', 'pitrou', 'vstinner', 'ezio.melotti', 'python-dev', 'eric.snow', 'berker.peksag', 'serhiy.storchaka', 'supriyanto maftuh']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'patch review'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue26639'
    versions = ['Python 3.6']

    Activity

    1. vstinner commented on Mar 25, 2016

      @vstinner
      MemberAuthor

      Attached patch replaces the imp module with importlib in Tools/i18n/pygettext.py.

      Please review carefully, it looks like the code getting the filename of a Python module is not tested by Lib/test/test_tools.py :-/

    2. vstinner commented on Mar 30, 2016

      @vstinner
      MemberAuthor

      See also the issue bpo-20021 '"modernize" makeopcodetargets.py"' (now closed).

    3. vstinner commented on Apr 12, 2016

      @vstinner
      MemberAuthor

      Can someone please review pygettext_imp.patch?

      (I send a ping since Roundup email notifications were broken recently.)

    4. added
      type-featureA feature request or enhancement
      and removed
      performancePerformance or resource usage
      buildThe build process and cross-build
      on Apr 12, 2016
    5. berkerpeksag commented on Apr 12, 2016

      @berkerpeksag
      Member

      pygettext_imp.patch looks good to me. I left a comment on Rietveld.

    6. python-dev commented on Apr 12, 2016

      python-devmannequin
      Mannequin

      New changeset cd03ff74eaea by Victor Stinner in branch 'default':
      Update pygettext.py to get ride of imp
      https://hg.python.org/cpython/rev/cd03ff74eaea

    7. vstinner commented on Apr 12, 2016

      @vstinner
      MemberAuthor

      pygettext_imp.patch looks good to me.

      Thanks for the review.

      I left a comment on Rietveld.

      Oops, I added it but then inlined the function in caller sites. I removed the now empty function :-)

    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

      type-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions