Issue 1697215: Docstring for site.addpackage() is incorrect (original) (raw)

Issue1697215

Created on 2007-04-09 21:23 by carlfk, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
addpackage_docstring.diff zseil,2007-04-15 17:59 patch against trunk revision 54835
Messages (3)
msg31738 - (view) Author: Carl Karsten (carlfk) Date: 2007-04-09 21:23
docstring says "execute sitedir" - but that isn't what gets executed. suggested: """Add a new path to known_paths by combining sitedir and 'name' or execute lines in name.pth that start with 'import'""" site.py def addpackage(sitedir, name, known_paths): """Add a new path to known_paths by combining sitedir and 'name' or execute sitedir if it starts with 'import'""" fullname = os.path.join(sitedir, name) f = open(fullname, "rU") for line in f: if line.startswith("import"): exec line
msg31739 - (view) Author: Ziga Seilnacht (zseil) * (Python committer) Date: 2007-04-15 17:59
Here is a patch. addpackage() is actually responsible for .pth file processing, so the current docstring was entirely incorrect. File Added: addpackage_docstring.diff
msg31740 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-05-19 18:10
Fixed in rev. 55455. (zseil, sorry, I didn't see your patch before committing it...)
History
Date User Action Args
2022-04-11 14:56:23 admin set github: 44822
2007-04-09 21:23:56 carlfk create