classification
Title: imp.find_module does not specify registry key it searches on windows
Type: Stage: resolved
Components: Documentation Versions: Python 3.3, Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: docs@python Nosy List: asvetlov, dhgmgn, docs@python, eric.snow, iritkatriel
Priority: normal Keywords: patch

Created on 2012-11-02 12:36 by dhgmgn, last changed 2021-06-22 18:20 by iritkatriel. This issue is now closed.

Files
File name Uploaded Description Edit
import_nt_reg.patch dhgmgn, 2012-11-02 12:36 review
Messages (5)
msg174508 - (view) Author: Jan Duzinkiewicz (dhgmgn) Date: 2012-11-02 12:36
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.
msg175621 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2012-11-15 15:35
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
msg175657 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2012-11-15 23:49
I agree with Andrew.
msg175791 - (view) Author: Jan Duzinkiewicz (dhgmgn) Date: 2012-11-17 17:52
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?
msg391773 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-04-24 11:06
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?
History
Date User Action Args
2021-06-22 18:20:04iritkatrielsetstatus: pending -> closed
stage: resolved
2021-04-24 11:06:24iritkatrielsetstatus: open -> pending

nosy: + iritkatriel
messages: + msg391773

resolution: out of date
2012-11-17 17:52:13dhgmgnsetmessages: + msg175791
2012-11-15 23:49:51eric.snowsetmessages: + msg175657
2012-11-15 15:35:24asvetlovsetnosy: + asvetlov
messages: + msg175621
2012-11-13 07:15:01eric.snowsetnosy: + eric.snow
2012-11-02 12:36:07dhgmgncreate