You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
imp.find_module does not specify registry key it searches on windows #60590
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=Noneclosed_at=<Date2021-06-22.18:20:04.378>created_at=<Date2012-11-02.12:36:07.837>labels= ['docs']
title='imp.find_module does not specify registry key it searches on windows'updated_at=<Date2021-06-22.18:20:04.378>user='https://bugs.python.org/dhgmgn'
"...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.
Ok, didn't knew much about importlib, I can work on a patch but have a few questions/suggestions:
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?
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?
Do you think the current version of the patch is applicable to Python 2.7?
Activity
dhgmgn commentedon Nov 2, 2012
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.
asvetlov commentedon Nov 15, 2012
I think much more important to mention registry key in http://docs.python.org/3/library/importlib.html#importlib.machinery.WindowsRegistryFinder
impis private module to access implementation internals butimportlibis public interface to import systemericsnowcurrently commentedon Nov 15, 2012
I agree with Andrew.
dhgmgn commentedon Nov 17, 2012
Ok, didn't knew much about importlib, I can work on a patch but have a few questions/suggestions:
iritkatriel commentedon Apr 24, 2021
Both
http://docs.python.org/3/library/importlib.html#importlib.machinery.WindowsRegistryFinder
and
http://docs.python.org/3/library/imp.html#imp.find_module:
are now deprecated. Is this issue still relevant?