From 7ec3e56bb8923ed17614c2f37ca9c2020bdabac5 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 4 Nov 2013 07:43:32 +0100 Subject: Backout d80207d15294. --- Lib/distutils/tests/test_build_py.py | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/Lib/distutils/tests/test_build_py.py b/Lib/distutils/tests/test_build_py.py index 2ce9d44..e416edd 100644 --- a/Lib/distutils/tests/test_build_py.py +++ b/Lib/distutils/tests/test_build_py.py @@ -121,37 +121,6 @@ class BuildPyTestCase(support.TempdirManager, found = os.listdir(os.path.join(cmd.build_lib, '__pycache__')) self.assertEqual(sorted(found), ['boiledeggs.%s.pyo' % imp.get_tag()]) - def test_dir_in_package_data(self): - """ - A directory in package_data should not be added to the filelist. - """ - # See bug 19286 - sources = self.mkdtemp() - pkg_dir = os.path.join(sources, "pkg") - - os.mkdir(pkg_dir) - open(os.path.join(pkg_dir, "__init__.py"), "w").close() - - docdir = os.path.join(pkg_dir, "doc") - os.mkdir(docdir) - open(os.path.join(docdir, "testfile"), "w").close() - - # create the directory that could be incorrectly detected as a file - os.mkdir(os.path.join(docdir, 'otherdir')) - - os.chdir(sources) - dist = Distribution({"packages": ["pkg"], - "package_data": {"pkg": ["doc/*"]}}) - # script_name need not exist, it just need to be initialized - dist.script_name = os.path.join(sources, "setup.py") - dist.script_args = ["build"] - dist.parse_command_line() - - try: - dist.run_commands() - except DistutilsFileError: - self.fail("failed package_data when data dir includes a dir") - def test_dont_write_bytecode(self): # makes sure byte_compile is not used dist = self.create_dist()[1] -- cgit v0.12 From 7b5d6adb2853c92bacba92fe18652d8659148051 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 4 Nov 2013 07:43:41 +0100 Subject: Backout 265d369ad3b9. --- Lib/distutils/command/build_py.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py index d48eb69..1371b3d 100644 --- a/Lib/distutils/command/build_py.py +++ b/Lib/distutils/command/build_py.py @@ -127,8 +127,7 @@ class build_py (Command): # Each pattern has to be converted to a platform-specific path filelist = glob(os.path.join(src_dir, convert_path(pattern))) # Files that match more than one pattern are only added once - files.extend([fn for fn in filelist if fn not in files - and os.path.isfile(fn)]) + files.extend([fn for fn in filelist if fn not in files]) return files def build_package_data(self): -- cgit v0.12 From ee7f3fc58639854317dd5fa1b95c4b199e35c035 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 4 Nov 2013 07:44:29 +0100 Subject: Backout 7d399099334d. --- Misc/NEWS | 3 --- 1 file changed, 3 deletions(-) diff --git a/Misc/NEWS b/Misc/NEWS index 96e30dd..e8054cf 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,9 +10,6 @@ What's New in Python 3.2.6? Library ------- -- Issue #19286: Directories in ``package_data`` are no longer added to - the filelist, preventing failure outlined in the ticket. - - Issue #19435: Fix directory traversal attack on CGIHttpRequestHandler. - Issue #14984: On POSIX systems, when netrc is called without a filename -- cgit v0.12