bpo-40275: Use new test.support helper submodules in tests by shihai1991 · Pull Request #21450 · python/cpython

added 2 commits

July 12, 2020 13:35

@shihai1991

vstinner

@ZackerySpytz @shihai1991

@ZackerySpytz @shihai1991

@serhiy-storchaka @shihai1991

Automerge-Triggered-By: @tiran
* Add example on lazy imports

* Use four spaces for indentation

* change to console
The phrase "At any time during execution," was repeated twice.

Automerge-Triggered-By: @Mariatta
…or (pythonGH-21474)

#msg373510

[bpo-32528]()/python#13528 changed `asyncio.CancelledError` such that it no longer inherits from `concurrent.futures.CancelledError`. As this affects existing code, specifically when catching the latter instead of the former in exception handling, it should be documented in the "What's new in 3.8?" document.

Automerge-Triggered-By: @1st1
…using recv_into instead of recv (python#21442)

* bpo-41273: Proactor transport read loop to use recv_into

By using recv_into instead of recv we do not allocate a new buffer each
time _loop_reading calls recv.

This betters performance for any stream using proactor (basically any
asyncio stream on windows).

* bpo-41273: Double proactor read transport buffer size

By doubling the read buffer size we get better performance.

@ZackerySpytz @shihai1991

Avoid infinite loop when reading specially crafted TAR files using the tarfile module
(CVE-2019-20907).
Move definition of UNUSED from modified headers of libmpdec to
_decimal.c itself. This makes the vendored source closer to the
standalone library and fixes build with --with-system-libmpdec.

Tested to build fine with either system libmpdec or the vendored one.

@benjaminp @shihai1991

@benjaminp @shihai1991

@ZackerySpytz @shihai1991

@zooba @shihai1991

@berkerpeksag @shihai1991

@berkerpeksag @shihai1991

@shihai1991

…thonGH-21718)

regrtest_unraisable_hook() temporarily replaces sys.stderr with
sys.__stderr__ to help to display errors when a test captures stderr.
incr cannot be larger than INT_MAX: downcast to int explicitly.
On Windows, fix asyncio recv_into() return value when the socket/pipe
is closed (BrokenPipeError): return 0 rather than an empty byte
string (b'').

@methane @shihai1991

…ythonGH-17536)

Co-authored-by: Jeffrey Kintscher <websurfer@surf2c.net>