# handlers, which in this case will invoke alarm_interrupt().
signal.alarm(1)
try:
- with self.assertRaises(ZeroDivisionError):
- wio.write(item * (support.PIPE_MAX_SIZE // len(item) + 1))
+ self.assertRaises(ZeroDivisionError, wio.write, large_data)
finally:
signal.alarm(0)
- t.join()
+ t.join()
# We got one byte, get another one and check that it isn't a
# repeat of the first one.
read_results.append(os.read(r, 1))
errors = []
done_tasks = []
done.clear()
- for i in range(N):
- t = threading.Thread(target=task,
- args=(N, done, done_tasks, errors,))
- t.start()
+ t0 = time.monotonic()
- self.assertTrue(done.wait(60))
- self.assertFalse(errors)
+ with start_threads(threading.Thread(target=task,
+ args=(N, done, done_tasks, errors,))
+ for i in range(N)):
+ pass
+ completed = done.wait(10 * 60)
+ dt = time.monotonic() - t0
+ if verbose:
+ print("%.1f ms" % (dt*1e3), flush=True, end=" ")
+ dbg_info = 'done: %s/%s' % (len(done_tasks), N)
+ self.assertFalse(errors, dbg_info)
+ self.assertTrue(completed, dbg_info)
if verbose:
print("OK.")
- Issue #23615: Modules bz2, tarfile and tokenize now can be reloaded with
imp.reload(). Patch by Thomas Kluyver.
+- Issue #23605: os.walk() now calls os.scandir() instead of os.listdir().
+ The usage of os.scandir() reduces the number of calls to os.stat().
+ Initial patch written by Ben Hoyt.
+
+Build
+-----
+
+- Issue #23585: make patchcheck will ensure the interpreter is built.
+
+Tests
+-----
+
++- Issue #23799: Added test.support.start_threads() for running and
++ cleaning up multiple threads.
++
+- Issue #22390: test.regrtest now emits a warning if temporary files or
+ directories are left after running a test.
+
+- Issue #23583: Added tests for standard IO streams in IDLE.
+
+- Issue #22289: Prevent test_urllib2net failures due to ftp connection timeout.
+
+Tools/Demos
+-----------
+
+- Issue #22826: The result of open() in Tools/freeze/bkfile.py is now better
+ compatible with regular files (in particular it now supports the context
+ management protocol).
+
+
+What's New in Python 3.5 alpha 2?
+=================================
+
+Release date: 2015-03-09
+
+Core and Builtins
+-----------------
+
+- Issue #22980: Under Linux, C extensions now include bitness in the file
+ name, to make it easy to test 32-bit and 64-bit builds in the same
+ working tree.
+
+- Issue #23571: PyObject_Call() and PyCFunction_Call() now raise a SystemError
+ if a function returns a result and raises an exception. The SystemError is
+ chained to the previous exception.
+
+Library
+-------
+
+- Issue #22524: New os.scandir() function, part of the PEP 471: "os.scandir()
+ function -- a better and faster directory iterator". Patch written by Ben
+ Hoyt.
+
+- Issue #23103: Reduced the memory consumption of IPv4Address and IPv6Address.
+
+- Issue #21793: BaseHTTPRequestHandler again logs response code as numeric,
+ not as stringified enum. Patch by Demian Brecht.
+
- Issue #23476: In the ssl module, enable OpenSSL's X509_V_FLAG_TRUSTED_FIRST
flag on certificate stores when it is available.