Title: 2.3a2 non-existing dirs
Type: Stage:
Components: None Versions:
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: jvr Nosy List: brett.cannon, jrut, jvr, nnorwitz
Priority: normal Keywords:

Created on 2003-02-25 22:44 by jrut, last changed 2004-08-07 19:42 by brett.cannon. This issue is now closed.

Messages (11)
msg14841 - (view) Author: James P Rutledge (jrut) Date: 2003-02-25 22:44
In Python 2.3a2 the leaves non-existing
directories in sys.path.

On my Debian Linux system, using Python 2.3a2,
the sys.path, after is executed during
interpreter initialization, includes the entry


although no such directory currently exists on
my system.

The module documentation contained in does

  "Non-existing directories (or non-directories)
  are never added to sys.path"
msg14842 - (view) Author: James P Rutledge (jrut) Date: 2003-02-26 02:56
Logged In: YES 

Additional info -- the used in
Python 2.2.2 explicitly removes non-existing
and non-directory files from sys.path.

The Python 2.3 does not have that
msg14843 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-02-26 03:08
Logged In: YES 

Just, does the doc still need to be updated?
msg14844 - (view) Author: Just van Rossum (jvr) * Date: 2003-02-26 08:43
Logged In: YES 

The docs are indeed wrong.
msg14845 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2003-05-29 01:33
Logged In: YES 

I take it the docs are what needs to change and not
msg14846 - (view) Author: James P Rutledge (jrut) Date: 2003-05-29 19:20
Logged In: YES 

I do not know what policy is desired for the condition of
the path after executing

I found the problem when I switched to try 2.3 and used an
application I wrote which searches the path to obtain
information about installed  modules.  During
troubleshooting, the change in from 2.2 to 2.3, to
stop removing non-existent directories in the path, became
evident as the reason for the application finding a
non-existent directory in the path.

The application was, of course, easily changed to skip
non-existent directories.  The question is whether removing
of non-existent directories in the path _should_ be done by
msg14847 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2003-07-08 04:11
Logged In: YES 

Can someone with more experience with the "official" policy of of say whether or not the docs should be changed or 
msg14848 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-03-20 21:42
Logged In: YES 

In Python 2.4, rev. 1.59 has remove non-existing paths.
msg14849 - (view) Author: Just van Rossum (jvr) * Date: 2004-03-21 07:49
Logged In: YES 

As I wrote before, the _docs_ are wrong, should NOT 
remove non-existing elements, since they may be non-file 
system items to be handled by a custom importer.
msg14850 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-03-21 14:33
Logged In: YES 

OK, the change was backed out.
msg14851 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-08-07 19:42
Logged In: YES 

Closing this as "won't fix" since the part of the docs in question apply 
only to .pth files and not directories already in sys.path.
Date User Action Args
2003-02-25 22:44:39jrutcreate