Skip to content

imp.find_module does not specify registry key it searches on windows #60590

Closed

Description

@dhgmgn
mannequin
BPO 16386
Nosy @asvetlov, @ericsnowcurrently, @iritkatriel
Files
  • import_nt_reg.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 2021-06-22.18:20:04.378>
    created_at = <Date 2012-11-02.12:36:07.837>
    labels = ['docs']
    title = 'imp.find_module does not specify registry key it searches on windows'
    updated_at = <Date 2021-06-22.18:20:04.378>
    user = 'https://bugs.python.org/dhgmgn'

    bugs.python.org fields:

    activity = <Date 2021-06-22.18:20:04.378>
    actor = 'iritkatriel'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2021-06-22.18:20:04.378>
    closer = 'iritkatriel'
    components = ['Documentation']
    creation = <Date 2012-11-02.12:36:07.837>
    creator = 'dhgmgn'
    dependencies = []
    files = ['27843']
    hgrepos = []
    issue_num = 16386
    keywords = ['patch']
    message_count = 5.0
    messages = ['174508', '175621', '175657', '175791', '391773']
    nosy_count = 5.0
    nosy_names = ['asvetlov', 'docs@python', 'eric.snow', 'dhgmgn', 'iritkatriel']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue16386'
    versions = ['Python 2.7', 'Python 3.3']

    Activity

    1. dhgmgn commented on Nov 2, 2012

      dhgmgnmannequin
      MannequinAuthor

      quote from http://docs.python.org/3/library/imp.html#imp.find_module:

      "...on some systems some other places are looked in as well (on Windows, it looks in the registry which may point to a specific file)."

      I actually didn't know the registry key is listed in "using Python on Window" guide until I grepped for PythonCore (which kind of requires to know the key already) - so I'm submitting a patch that cross references find_module docs and using Python on Windows guide.

    2. added
      docsDocumentation in the Doc dir
      on Nov 2, 2012
    3. asvetlov commented on Nov 15, 2012

      @asvetlov
      Contributor

      I think much more important to mention registry key in http://docs.python.org/3/library/importlib.html#importlib.machinery.WindowsRegistryFinder
      imp is private module to access implementation internals but importlib is public interface to import system

    4. ericsnowcurrently commented on Nov 15, 2012

      @ericsnowcurrently
      Member

      I agree with Andrew.

    5. dhgmgn commented on Nov 17, 2012

      dhgmgnmannequin
      MannequinAuthor

      Ok, didn't knew much about importlib, I can work on a patch but have a few questions/suggestions:

      1. For importlib, simply referencing the "Using on Windows" guide imo won't be ok - the importlib sources show that the key being used is "Software\\Python\\PythonCore\\{sys_version}\\Modules\\{fullname}", while guide refers to \\PythonPath. Am I missing something here?
      2. Considering that importlib code is Python, easy to retrieve without having C sources (which is common case on Windows) - do you think this should go into 3.3 docs?
      3. Do you think the current version of the patch is applicable to Python 2.7?
    6. iritkatriel commented on Apr 24, 2021

      @iritkatriel
      Member
    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

      docsDocumentation in the Doc dir

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions