This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Docstring for site.addpackage() is incorrect
Type: Stage:
Components: Documentation Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: carlfk, georg.brandl, zseil
Priority: normal Keywords:

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:23adminsetgithub: 44822
2007-04-09 21:23:56carlfkcreate