[Python-bugs-list] [Bug #129584] pythonpath registry value ignored in 2.0

noreply@sourceforge.net noreply@sourceforge.net
Fri, 23 Feb 2001 03:46:38 -0800


Bug #129584, was updated on 2001-Jan-21 04:48
Here is a current snapshot of the bug.

Project: Python
Category: Windows
Status: Closed
Resolution: Fixed
Bug Group: Platform-specific
Priority: 5
Submitted by: esasaki
Assigned to : mhammond
Summary: pythonpath registry value ignored in 2.0

Details: The value of the HKLM\software\python\pythoncore\2.0\pythonpath
key is now ignored in Python 2.0 unless you have at least one subkey
underneath it. Since the default installation program doesn't add any
subkeys, users familiar with 1.5.2 who expect to just set pythonpath
in the registry will be disappointed.

I imagine that you all probably run with other extensions installed that
add subkeys under pythonpath and thus never see this bug. However, the
first thing I did after installing 2.0 was to try to point to my custom
libs. 5 hours later I can finally start testing to see if they still work
:).

This problem is undoubtedly related to bug 127722. Fix that and you'll fix
this one.


Follow-Ups:

Date: 2001-Feb-23 03:46
By: mhammond

Comment:
Fixed in rev 1.23 of PC/getpath.c.  See patch #103933
-------------------------------------------------------

Date: 2001-Jan-31 00:00
By: mhammond

Comment:
Doh - typing before thinking again :-(  This could potentially be very
dangerous.  If you are embedding _and_ have your own Python installation
used by your embedded app, there is a risk that a "vanilla" Python will be
located by the path search.

If I get my way and Python on Windows can determine its home based on the
sys.path it has loaded, then this should solve your problem without
resorting to a path search.  If Python does this, then I can't think of a
scenario where searching PATH will give a better results.
Can you give a scenario for embedding where
-------------------------------------------------------

Date: 2001-Jan-30 23:54
By: mhammond

Comment:
Yep - I agree with that, I suppose.  If all else fails, searching the path
sounds reasonable.  As per my comments in
https://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=128685, I
will soon be submitting a bug to enhance the PYTHONHOME determination, and
will roll this into the same report.
-------------------------------------------------------

Date: 2001-Jan-30 20:53
By: mhammond

Comment:
I can not reproduce this.  I believe the "problem" is that since Python
1.6, Python's registry search mechanism has changed.  If Python can locate
its own "home" (which it usually can, given a vanilla install) then it
_ignores_ the main registry key, and _only_ looks in subkeys.  The
rationalle is that this will allow you to have multiple installations of
the same Python version (eg, the "official" release and the current CVS
version).  This will ensure the "core" path is always correct.

To test this, copy "python.exe" to a temp directory, and run it from there.
 In this case Python will not be able to locate its home, and will use the
registry key.

I am leaving this bug open to remind me to add documentation on the
registry somewhere appropriate.  However, I am marking as "works for me".
-------------------------------------------------------

Date: 2001-Jan-21 10:41
By: tim_one

Comment:
Mark?  You know more about this than everyone else combined.  Is that good
news or bad <wink>?
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=129584&group_id=5470