diff options
author | Chih-Hsuan Yen | 2018-10-03 18:05:35 +0800 |
---|---|---|
committer | Chih-Hsuan Yen | 2018-10-03 18:05:35 +0800 |
commit | f2e523e4a1c2ac8eaded8458c1011b5261e98fd9 (patch) | |
tree | b9b6bb9b7ea7f01485c568ad5f5ef22663879f78 | |
parent | 9002c8a6828a69d3c4a8cb762d4218c1626ad23f (diff) | |
download | aur-f2e523e4a1c2ac8eaded8458c1011b5261e98fd9.tar.gz |
disable a failing test
Ref: https://bugs.python.org/issue34871
Ref: https://bugs.python.org/issue30167
Ref: https://github.com/python/cpython/pull/7617
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | 0001-compileall-Fix-ddir-when-recursing.patch | 57 | ||||
-rw-r--r-- | PKGBUILD | 26 | ||||
-rw-r--r-- | no-testCongestion.patch | 38 |
4 files changed, 79 insertions, 48 deletions
@@ -1,6 +1,6 @@ pkgbase = python-git pkgdesc = Next generation of the python high-level scripting language - pkgver = 3.8.0a0.r102162.0afada163c + pkgver = 3.8.0a0.r102398.81574b80e9 pkgrel = 1 url = https://www.python.org/ arch = i686 @@ -29,10 +29,10 @@ pkgbase = python-git optdepends = tk: for tkinter source = git+https://github.com/python/cpython#branch=master source = dont-make-libpython-readonly.patch - source = no-testCongestion.patch + source = 0001-compileall-Fix-ddir-when-recursing.patch sha512sums = SKIP sha512sums = 2ef96708d5b13ae2a3d2cc62c87b4780e60ecfce914e190564492def3a11d5e56977659f41c7f9d12266e58050c766bce4e2b5d50b708eb792794fa8357920c4 - sha512sums = 1009dd9630ce937a786a7211eb5c68c65b3277994b32fe4d2702e4689baeb0a49db51a593f436e51e32cf7c266b6fbd10785b9089cdf50f123077dbf8365e594 + sha512sums = ebd04c3b6d41321b1f0d439d356e0ce463760db55dc64109854c70d017cf56608aa19de9fc4a21bf840795ff202b4703444f9af8074b661780798c17e03089ff pkgname = python-git diff --git a/0001-compileall-Fix-ddir-when-recursing.patch b/0001-compileall-Fix-ddir-when-recursing.patch new file mode 100644 index 000000000000..91ebc71f6a22 --- /dev/null +++ b/0001-compileall-Fix-ddir-when-recursing.patch @@ -0,0 +1,57 @@ +From 84fdbc156ed424d030686de350fbfc6c3593263f Mon Sep 17 00:00:00 2001 +Message-Id: <84fdbc156ed424d030686de350fbfc6c3593263f.1537028533.git.jan.steffens@gmail.com> +From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> +Date: Sat, 15 Sep 2018 18:22:06 +0200 +Subject: [PATCH] compileall: Fix ddir when recursing + +--- + Lib/compileall.py | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/Lib/compileall.py b/Lib/compileall.py +index 72592126d7..70e246fd96 100644 +--- a/Lib/compileall.py ++++ b/Lib/compileall.py +@@ -45,12 +45,16 @@ def _walk_dir(dir, ddir=None, maxlevels=10, quiet=0): + else: + dfile = None + if not os.path.isdir(fullname): +- yield fullname ++ yield fullname, ddir + elif (maxlevels > 0 and name != os.curdir and name != os.pardir and + os.path.isdir(fullname) and not os.path.islink(fullname)): + yield from _walk_dir(fullname, ddir=dfile, + maxlevels=maxlevels - 1, quiet=quiet) + ++def _compile_one(file_ddir, *args, **kwargs): ++ file, ddir = file_ddir ++ return compile_file(file, ddir, *args, **kwargs) ++ + def compile_dir(dir, maxlevels=10, ddir=None, force=False, rx=None, + quiet=0, legacy=False, optimize=-1, workers=1, + invalidation_mode=py_compile.PycInvalidationMode.TIMESTAMP): +@@ -79,17 +83,17 @@ def compile_dir(dir, maxlevels=10, ddir=None, force=False, rx=None, + if workers is not None and workers != 1 and ProcessPoolExecutor is not None: + workers = workers or None + with ProcessPoolExecutor(max_workers=workers) as executor: +- results = executor.map(partial(compile_file, +- ddir=ddir, force=force, ++ results = executor.map(partial(_compile_one, ++ force=force, + rx=rx, quiet=quiet, + legacy=legacy, + optimize=optimize, + invalidation_mode=invalidation_mode), + files) + success = min(results, default=True) + else: +- for file in files: +- if not compile_file(file, ddir, force, rx, quiet, ++ for file_ddir in files: ++ if not _compile_one(file_ddir, force, rx, quiet, + legacy, optimize, invalidation_mode): + success = False + return success +-- +2.18.0 + @@ -8,7 +8,7 @@ # Contributor: Jason Chu <jason@archlinux.org> pkgname=python-git -pkgver=3.8.0a0.r102162.0afada163c +pkgver=3.8.0a0.r102398.81574b80e9 pkgrel=1 _pybasever=3.8 pkgdesc="Next generation of the python high-level scripting language" @@ -23,10 +23,10 @@ optdepends=('sqlite' 'tk: for tkinter') source=("git+https://github.com/python/cpython#branch=master" dont-make-libpython-readonly.patch - no-testCongestion.patch) + 0001-compileall-Fix-ddir-when-recursing.patch) sha512sums=('SKIP' '2ef96708d5b13ae2a3d2cc62c87b4780e60ecfce914e190564492def3a11d5e56977659f41c7f9d12266e58050c766bce4e2b5d50b708eb792794fa8357920c4' - '1009dd9630ce937a786a7211eb5c68c65b3277994b32fe4d2702e4689baeb0a49db51a593f436e51e32cf7c266b6fbd10785b9089cdf50f123077dbf8365e594') + 'ebd04c3b6d41321b1f0d439d356e0ce463760db55dc64109854c70d017cf56608aa19de9fc4a21bf840795ff202b4703444f9af8074b661780798c17e03089ff') pkgver() { cd cpython @@ -42,12 +42,18 @@ prepare() { # FS#45809 patch -p1 -i ../dont-make-libpython-readonly.patch + # FS#59997 + patch -p1 -i ../0001-compileall-Fix-ddir-when-recursing.patch + # FS#23997 sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py - # https://bugs.python.org/issue34587 - testCongestion hangs - # https://bugs.python.org/issue34354 - testCongestion leaks memory - patch -Np1 -i ../no-testCongestion.patch + # https://bugs.python.org/issue34871 + # Disable a failing test + sed -i -e 's|def test_abs_paths_cached_None|def _test_abs_paths_cached_None|' Lib/test/test_site.py + + # Speed up LTO + sed -i -e "s|-flto |-flto=4 |g" configure configure.ac # Ensure that we are using the system copy of various libraries (expat, libffi, and libmpdec), # rather than copies shipped in the tarball @@ -59,11 +65,14 @@ prepare() { build() { cd cpython - # --enable-optimizations takes too much time + # PGO should be done with -O3 + CFLAGS="${CFLAGS/-O2/-O3}" + ./configure --prefix=/usr \ --enable-shared \ --with-threads \ --with-computed-gotos \ + --enable-optimizations \ --with-lto \ --enable-ipv6 \ --with-system-expat \ @@ -105,6 +114,9 @@ package() { # Hack to avoid building again sed -i 's/^all:.*$/all: build_all/' Makefile + # PGO should be done with -O3 + CFLAGS="${CFLAGS/-O2/-O3}" + make DESTDIR="${pkgdir}" EXTRA_CFLAGS="$CFLAGS" ENSUREPIP=install altinstall maninstall # Work around a conflict with the 'python' package. diff --git a/no-testCongestion.patch b/no-testCongestion.patch deleted file mode 100644 index ab81f154f8b7..000000000000 --- a/no-testCongestion.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py -index 4f3c4774e4..f4d58ebf71 100644 ---- a/Lib/test/test_socket.py -+++ b/Lib/test/test_socket.py -@@ -2054,33 +2054,6 @@ class RDSTest(ThreadedRDSSocketTest): - self.data = b'select' - self.cli.sendto(self.data, 0, (HOST, self.port)) - -- def testCongestion(self): -- # wait until the sender is done -- self.evt.wait() -- -- def _testCongestion(self): -- # test the behavior in case of congestion -- self.data = b'fill' -- self.cli.setblocking(False) -- try: -- # try to lower the receiver's socket buffer size -- self.cli.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 16384) -- except OSError: -- pass -- with self.assertRaises(OSError) as cm: -- try: -- # fill the receiver's socket buffer -- while True: -- self.cli.sendto(self.data, 0, (HOST, self.port)) -- finally: -- # signal the receiver we're done -- self.evt.set() -- # sendto() should have failed with ENOBUFS -- self.assertEqual(cm.exception.errno, errno.ENOBUFS) -- # and we should have received a congestion notification through poll -- r, w, x = select.select([self.serv], [], [], 3.0) -- self.assertIn(self.serv, r) -- - - @unittest.skipIf(fcntl is None, "need fcntl") - @unittest.skipUnless(HAVE_SOCKET_VSOCK, |