cpython: bd1af1a97c2e (original) (raw)

Mercurial > cpython

changeset 100875:bd1af1a97c2e

Issue #26587: Allow .pth files to specify file paths as well as directories. Thanks to Wolfgang Langner for the bug report and initial version of the patch. [#26587]

Brett Cannon brett@python.org
date Fri, 08 Apr 2016 15:04:28 -0700
parents d214b30e8ef0
children 94d5c57ee835
files Doc/whatsnew/3.6.rst Lib/site.py Lib/test/test_site.py Misc/ACKS Misc/NEWS
diffstat 5 files changed, 22 insertions(+), 10 deletions(-)[+] [-] Doc/whatsnew/3.6.rst 8 Lib/site.py 18 Lib/test/test_site.py 2 Misc/ACKS 1 Misc/NEWS 3

line wrap: on

line diff

--- a/Doc/whatsnew/3.6.rst +++ b/Doc/whatsnew/3.6.rst @@ -251,6 +251,14 @@ Previously, names of properties and slot an instance were excluded. (Contributed by Martin Panter in :issue:25590.) +site +---- + +When specifying paths to add to :attr:sys.path in a .pth file, +you may now specify file paths on top of directories (e.g. zip files). +(Contributed by Wolfgang Langner in :issue:26587). + + telnetlib ---------

--- a/Lib/site.py +++ b/Lib/site.py @@ -131,13 +131,13 @@ def removeduppaths(): def _init_pathinfo():

@@ -190,9 +190,9 @@ def addsitedir(sitedir, known_paths=None 'sitedir'""" if known_paths is None: known_paths = _init_pathinfo()

--- a/Lib/test/test_site.py +++ b/Lib/test/test_site.py @@ -75,7 +75,7 @@ class HelperFunctionsTests(unittest.Test def test_init_pathinfo(self): dir_set = site._init_pathinfo() for entry in [site.makepath(path)[1] for path in sys.path

--- a/Misc/ACKS +++ b/Misc/ACKS @@ -815,6 +815,7 @@ Torsten Landschoff Tino Lange Glenn Langford Andrew Langmead +Wolfgang Langner Detlef Lannert Soren Larsen Amos Latteier

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -237,6 +237,9 @@ Core and Builtins Library ------- +- Issue #26587: the site module now allows .pth files to specify files to be