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

python search path - .pth recursion #48283

Closed
jolleyjoe mannequin opened this issue Oct 3, 2008 · 3 comments
Closed

python search path - .pth recursion #48283

jolleyjoe mannequin opened this issue Oct 3, 2008 · 3 comments
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@jolleyjoe
Copy link
Mannequin

jolleyjoe mannequin commented Oct 3, 2008

BPO 4033
Nosy @brettcannon, @birkenfeld

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 2012-05-22.14:55:27.897>
created_at = <Date 2008-10-03.21:15:08.798>
labels = ['type-bug', 'docs']
title = 'python search path - .pth recursion'
updated_at = <Date 2012-05-22.14:55:27.897>
user = 'https://bugs.python.org/jolleyjoe'

bugs.python.org fields:

activity = <Date 2012-05-22.14:55:27.897>
actor = 'brett.cannon'
assignee = 'docs@python'
closed = True
closed_date = <Date 2012-05-22.14:55:27.897>
closer = 'brett.cannon'
components = ['Documentation']
creation = <Date 2008-10-03.21:15:08.798>
creator = 'jolleyjoe'
dependencies = []
files = []
hgrepos = []
issue_num = 4033
keywords = []
message_count = 3.0
messages = ['74274', '92797', '161360']
nosy_count = 8.0
nosy_names = ['brett.cannon', 'georg.brandl', 'janssen', 'ggenellina', 'gbloisi', 'jolleyjoe', 'gwideman', 'Matt.B']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue4033'
versions = ['Python 2.7', 'Python 3.2', 'Python 3.3']

@jolleyjoe
Copy link
Mannequin Author

jolleyjoe mannequin commented Oct 3, 2008

I have an a.pth file in dir_a with a line that says:

dir_b

In dir_b, I have a b.pth file that lists some eggs in dir_b:

JCC-1.9-py2.5-linux-i686.egg
lucene-2.3.2-py2.5-linux-i686.egg

From http://www.python.org/doc/2.5.2/inst/search-path.html:
"Paths can be absolute or relative, in which case they're relative to
the directory containing the .pth file. Any directories added to the
search path will be scanned in turn for .pth files. See site module
documentation for more information."

I assume that .pth files are scanned recursively... is this true?

I found an old ticket here: http://bugs.python.org/issue1431, but it
wasn't clear how it concludes (ie: do .pth files get scanned recursively
for directories to add to the search path or not).

@jolleyjoe jolleyjoe mannequin assigned birkenfeld Oct 3, 2008
@jolleyjoe jolleyjoe mannequin added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error labels Oct 3, 2008
@janssen
Copy link
Mannequin

janssen mannequin commented Sep 17, 2009

Looks like 1431 was closed by removing a line from the documentation, so
it's not surprising that it's not clear.

@admin admin mannequin assigned docspython and unassigned birkenfeld Oct 29, 2010
@brettcannon
Copy link
Member

The docs for 2.7 are a little more clear: http://docs.python.org/install/index.html#inst-search-path says it is not recursive. And looking at the code (http://hg.python.org/cpython/file/086afe7b61f5/Lib/site.py#l184) backs that up.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants