Skip to content

Give modulefinder some much-needed updates. #80117

Closed

Description

@brandtbucher
BPO 35936
Nosy @warsaw, @brettcannon, @ncoghlan, @brandtbucher
PRs
  • bpo-35936: Updates to modulefinder #11787
  • bpo-35936: Updates to modulefinder #11787
  • 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 2019-04-07.08:03:40.400>
    created_at = <Date 2019-02-08.03:13:18.904>
    labels = ['3.8', 'type-feature', 'library']
    title = 'Give modulefinder some much-needed updates.'
    updated_at = <Date 2019-04-07.08:03:40.399>
    user = 'https://github.com/brandtbucher'

    bugs.python.org fields:

    activity = <Date 2019-04-07.08:03:40.399>
    actor = 'ncoghlan'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-04-07.08:03:40.400>
    closer = 'ncoghlan'
    components = ['Library (Lib)']
    creation = <Date 2019-02-08.03:13:18.904>
    creator = 'brandtbucher'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35936
    keywords = ['patch', 'patch']
    message_count = 4.0
    messages = ['335054', '335171', '339560', '339561']
    nosy_count = 5.0
    nosy_names = ['barry', 'brett.cannon', 'jvr', 'ncoghlan', 'brandtbucher']
    pr_nums = ['11787', '11787']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue35936'
    versions = ['Python 3.8']

    Activity

    1. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      on Feb 8, 2019
    2. brandtbucher commented on Feb 8, 2019

      @brandtbucher
      MemberAuthor

      I've written a patch here that includes a few useful fixes. Namely:

      • It doesn't crash if it encounters a syntax error. (17396)
      • It doesn't report certain name collisions as bad. (35376)
      • It doesn't use mutable default arguments in its initializer.
      • Most importantly, it now uses importlib instead of imp, which is deprecated. (25160) As a benefit, frozen built-in modules (zip import, for example), are now correctly reported.

      With the exception of these bug fixes, I've been very careful to preserve the original behavior, and have not changed any part of the API. This patch also includes 2 new regression tests.

    3. brandtbucher commented on Feb 10, 2019

      @brandtbucher
      MemberAuthor

      Alright, I've gotten all of the tests passing for the new importlib-only implementation. I broke these modifications out into a new private function, _find_module, to make it clear that this fix is a simple drop-in replacement for imp.find_module.

      Let me know if there's anything I've missed or could improve. Otherwise, I feel my work here is done!

    4. ncoghlan commented on Apr 7, 2019

      @ncoghlan
      Contributor

      New changeset 9d7b2c0 by Nick Coghlan (Brandt Bucher) in branch 'master':
      bpo-35936: Updates to modulefinder (GH-11787)
      9d7b2c0

    5. ncoghlan commented on Apr 7, 2019

      @ncoghlan
      Contributor

      Thanks Brandt!

      I'll also go back and close bpo-17396, bpo-35376, and bpo-25160

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

      3.8 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions