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.

Author tds333
Recipients tds333
Date 2016-03-18.10:23:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1458296580.88.0.236395091392.issue26587@psf.upfronthosting.co.za>
In-reply-to
Content
In site.py there is the internal function _init_pathinfo() This function builds a set of path entries from sys.path. This is used to avoid duplicate entries in sys.path.
But this function has a check if it is a directory with os.path.isdir(...). All this is fine as long as someone has a .zip file in sys.path or a zipfile subpath. Then the path entry is not part of the set. With this duplicate detection with none directories does not work.

The fix is as simple as removing the os.path.isdir(...) line and fixing the indent. Also the docstring should be modified.

Detected by using this function in a project reusing addsitedir(...) functionality to add another path with .pth processing.
History
Date User Action Args
2016-03-18 10:23:00tds333setrecipients: + tds333
2016-03-18 10:23:00tds333setmessageid: <1458296580.88.0.236395091392.issue26587@psf.upfronthosting.co.za>
2016-03-18 10:23:00tds333linkissue26587 messages
2016-03-18 10:23:00tds333create