Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.3a2 site.py non-existing dirs #38053

Closed
jrut mannequin opened this issue Feb 25, 2003 · 11 comments
Closed

2.3a2 site.py non-existing dirs #38053

jrut mannequin opened this issue Feb 25, 2003 · 11 comments

Comments

@jrut
Copy link
Mannequin

jrut mannequin commented Feb 25, 2003

BPO 693255
Nosy @brettcannon

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 2004-08-07.19:42:54.000>
created_at = <Date 2003-02-25.22:44:39.000>
labels = ['invalid']
title = '2.3a2 site.py non-existing dirs'
updated_at = <Date 2004-08-07.19:42:54.000>
user = 'https://bugs.python.org/jrut'

bugs.python.org fields:

activity = <Date 2004-08-07.19:42:54.000>
actor = 'brett.cannon'
assignee = 'jvr'
closed = True
closed_date = None
closer = None
components = ['None']
creation = <Date 2003-02-25.22:44:39.000>
creator = 'jrut'
dependencies = []
files = []
hgrepos = []
issue_num = 693255
keywords = []
message_count = 11.0
messages = ['14841', '14842', '14843', '14844', '14845', '14846', '14847', '14848', '14849', '14850', '14851']
nosy_count = 4.0
nosy_names = ['nnorwitz', 'brett.cannon', 'jvr', 'jrut']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue693255'
versions = []

@jrut
Copy link
Mannequin Author

jrut mannequin commented Feb 25, 2003

In Python 2.3a2 the site.py leaves non-existing
directories in sys.path.

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

/usr/local/lib/python23.zip

although no such directory currently exists on
my system.

The module documentation contained in site.py does
state

"Non-existing directories (or non-directories)
are never added to sys.path"

@jrut jrut mannequin closed this as completed Feb 25, 2003
@jrut jrut mannequin added the invalid label Feb 25, 2003
@jrut jrut mannequin assigned jvr Feb 25, 2003
@jrut jrut mannequin closed this as completed Feb 25, 2003
@jrut jrut mannequin added the invalid label Feb 25, 2003
@jrut jrut mannequin assigned jvr Feb 25, 2003
@jrut
Copy link
Mannequin Author

jrut mannequin commented Feb 26, 2003

Logged In: YES
user_id=720847

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

The Python 2.3 site.py does not have that
feature.

@nnorwitz
Copy link
Mannequin

nnorwitz mannequin commented Feb 26, 2003

Logged In: YES
user_id=33168

Just, does the doc still need to be updated?

@jvr
Copy link
Mannequin

jvr mannequin commented Feb 26, 2003

Logged In: YES
user_id=92689

The docs are indeed wrong.

@brettcannon
Copy link
Member

Logged In: YES
user_id=357491

I take it the docs are what needs to change and not site.py?

@jrut
Copy link
Mannequin Author

jrut mannequin commented May 29, 2003

Logged In: YES
user_id=720847

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

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 site.py 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
site.py

@brettcannon
Copy link
Member

Logged In: YES
user_id=357491

Can someone with more experience with the "official" policy of of
site.py say whether or not the docs should be changed or site.py
itself?

@brettcannon
Copy link
Member

Logged In: YES
user_id=357491

In Python 2.4, rev. 1.59 has site.py remove non-existing paths.

@jvr
Copy link
Mannequin

jvr mannequin commented Mar 21, 2004

Logged In: YES
user_id=92689

As I wrote before, the _docs_ are wrong, site.py should NOT
remove non-existing elements, since they may be non-file
system items to be handled by a custom importer.

@brettcannon
Copy link
Member

Logged In: YES
user_id=357491

OK, the change was backed out.

@brettcannon
Copy link
Member

Logged In: YES
user_id=357491

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.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant