Commit 71865a8f authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Updated python3 to 3.7.3

parent d04bbee9
all:
tar xf Python-3.6.5.tar.xz
patch -Np1 -d Python-3.6.5 < Python-3.6.5-tests.patch
cd Python-3.6.5 && ./configure --build=$(CLFS_TARGET) --prefix=/usr --enable-shared --with-system-expat --with-system-ffi --with-ensurepip=yes --enable-optimizations
$(MAKE) -C Python-3.6.5
tar xf Python-3.7.3.tar.xz
cd Python-3.7.3 && ./configure --build=$(CLFS_TARGET) --prefix=/usr --enable-shared --with-system-expat --with-system-ffi --with-ensurepip=yes --enable-optimizations
$(MAKE) -C Python-3.7.3
if [[ ! "$(BUILD_OPTIONS)" =~ no-tests ]] ; then \
$(MAKE) -C Python-3.6.5 test EXTRATESTOPTS="-j 1 -u all,-urlfetch --timeout=3600" ; \
$(MAKE) -C Python-3.7.3 test EXTRATESTOPTS="-j 1 -u all,-urlfetch --timeout=3600" ; \
fi
$(MAKE) -C Python-3.6.5 install
$(MAKE) -C Python-3.7.3 install
chmod -v 755 /usr/lib/libpython3.6m.so
chmod -v 755 /usr/lib/libpython3.so
rm $(HOME)/.python_history
rm -rf Python-3.6.5
rm -rf Python-3.7.3
diff -uNr Python-3.6.5/Lib/test/test_multiprocessing_main_handling.py Python-3.6.5-tests/Lib/test/test_multiprocessing_main_handling.py
--- Python-3.6.5/Lib/test/test_multiprocessing_main_handling.py 2018-03-28 19:49:31.000000000 +1030
+++ Python-3.6.5-tests/Lib/test/test_multiprocessing_main_handling.py 2018-05-30 15:42:16.921462811 +0930
@@ -58,7 +58,7 @@
p = Pool(5)
results = []
p.map_async(f, [1, 2, 3], callback=results.extend)
- deadline = time.time() + 10 # up to 10 s to report the results
+ deadline = time.time() + 40 # up to 40 s to report the results
while not results:
time.sleep(0.05)
if time.time() > deadline:
@@ -86,7 +86,7 @@
p = Pool(5)
results = []
p.map_async(int, [1, 4, 9], callback=results.extend)
-deadline = time.time() + 10 # up to 10 s to report the results
+deadline = time.time() + 40 # up to 40 s to report the results
while not results:
time.sleep(0.05)
if time.time() > deadline:
diff -uNr Python-3.6.5/Lib/test/_test_multiprocessing.py Python-3.6.5-tests/Lib/test/_test_multiprocessing.py
--- Python-3.6.5/Lib/test/_test_multiprocessing.py 2018-03-28 19:49:31.000000000 +1030
+++ Python-3.6.5-tests/Lib/test/_test_multiprocessing.py 2018-05-30 15:42:16.923462816 +0930
@@ -607,7 +607,7 @@
p = self.Process(target=self._test_sys_exit, args=(reason, testfn))
p.daemon = True
p.start()
- p.join(5)
+ p.join(20)
self.assertEqual(p.exitcode, 1)
with open(testfn, 'r') as f:
@@ -620,7 +620,7 @@
p = self.Process(target=sys.exit, args=(reason,))
p.daemon = True
p.start()
- p.join(5)
+ p.join(20)
self.assertEqual(p.exitcode, reason)
#
@@ -1342,7 +1342,7 @@
self.f(*self.args)
finally:
self.finished.append(pid)
- self._can_exit.wait(30)
+ self._can_exit.wait(120)
assert self._can_exit.is_set()
def wait_for_started(self):
@@ -1372,7 +1372,7 @@
Tests for Barrier objects.
"""
N = 5
- defaultTimeout = 30.0 # XXX Slow Windows buildbots need generous timeout
+ defaultTimeout = 120.0 # XXX Slow Windows buildbots need generous timeout
def setUp(self):
self.barrier = self.Barrier(self.N, timeout=self.defaultTimeout)
@@ -1555,9 +1555,9 @@
i = barrier.wait()
if i == cls.N//2:
# One thread is late!
- time.sleep(1.0)
+ time.sleep(4.0)
try:
- barrier.wait(0.5)
+ barrier.wait(2.0)
except threading.BrokenBarrierError:
results.append(True)
@@ -1574,7 +1574,7 @@
i = barrier.wait(cls.defaultTimeout)
if i == cls.N//2:
# One thread is later than the default timeout
- time.sleep(1.0)
+ time.sleep(4.0)
try:
barrier.wait()
except threading.BrokenBarrierError:
@@ -1584,7 +1584,7 @@
"""
Test the barrier's default timeout
"""
- barrier = self.Barrier(self.N, timeout=0.5)
+ barrier = self.Barrier(self.N, timeout=2.0)
results = self.DummyList()
self.run_threads(self._test_default_timeout_f, (barrier, results))
self.assertEqual(len(results), barrier.parties)
@@ -4169,7 +4169,7 @@
lock2 = mp.Lock()
os.write(%d, lock1._semlock.name.encode("ascii") + b"\\n")
os.write(%d, lock2._semlock.name.encode("ascii") + b"\\n")
- time.sleep(10)
+ time.sleep(40)
'''
r, w = os.pipe()
p = subprocess.Popen([sys.executable,
@@ -4183,7 +4183,7 @@
_multiprocessing.sem_unlink(name1)
p.terminate()
p.wait()
- time.sleep(2.0)
+ time.sleep(8.0)
with self.assertRaises(OSError) as ctx:
_multiprocessing.sem_unlink(name2)
# docs say it should be ENOENT, but OSX seems to give EINVAL
diff -uNr Python-3.6.5/Lib/test/test_weakref.py Python-3.6.5-tests/Lib/test/test_weakref.py
--- Python-3.6.5/Lib/test/test_weakref.py 2018-03-28 19:49:31.000000000 +1030
+++ Python-3.6.5-tests/Lib/test/test_weakref.py 2018-05-30 15:42:16.924462818 +0930
@@ -74,7 +74,7 @@
@contextlib.contextmanager
-def collect_in_thread(period=0.0001):
+def collect_in_thread(period=0.01):
"""
Ensure GC collections happen in a different thread, at a high frequency.
"""
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment