diff options
| -rw-r--r-- | Doc/howto/pyporting.rst | 2 | ||||
| -rw-r--r-- | Doc/library/ssl.rst | 16 | ||||
| -rw-r--r-- | Lib/multiprocessing/heap.py | 9 | ||||
| -rw-r--r-- | Misc/ACKS | 1 | ||||
| -rw-r--r-- | Misc/NEWS | 3 |
5 files changed, 17 insertions, 14 deletions
diff --git a/Doc/howto/pyporting.rst b/Doc/howto/pyporting.rst index 5f7cc34..7adeea7 100644 --- a/Doc/howto/pyporting.rst +++ b/Doc/howto/pyporting.rst @@ -350,7 +350,7 @@ Python 2 or 3 support. You may also want to use use the ``-bb`` flag with the Python 3 interpreter to trigger an exception when you are comparing bytes to strings or bytes to an int (the latter is available starting in Python 3.5). By default type-differing - comparisons simply return ``False``, but if you made a mistake in your +comparisons simply return ``False``, but if you made a mistake in your separation of text/binary data handling or indexing on bytes you wouldn't easily find the mistake. This flag will raise an exception when these kinds of comparisons occur, making the mistake much easier to track down. diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index 37130be..31b4658 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -1195,6 +1195,10 @@ to speed up repeated connections from the same clients. does not contain certificates from *capath* unless a certificate was requested and loaded by a SSL connection. + .. note:: + Certificates in a capath directory aren't loaded unless they have + been used at least once. + .. versionadded:: 3.4 .. method:: SSLContext.set_default_verify_paths() @@ -1375,18 +1379,6 @@ to speed up repeated connections from the same clients. >>> stats['hits'], stats['misses'] (0, 0) -.. method:: SSLContext.get_ca_certs(binary_form=False) - - Returns a list of dicts with information of loaded CA certs. If the - optional argument is true, returns a DER-encoded copy of the CA - certificate. - - .. note:: - Certificates in a capath directory aren't loaded unless they have - been used at least once. - - .. versionadded:: 3.4 - .. attribute:: SSLContext.check_hostname Wether to match the peer cert's hostname with :func:`match_hostname` in diff --git a/Lib/multiprocessing/heap.py b/Lib/multiprocessing/heap.py index 333b3ba..44d9638 100644 --- a/Lib/multiprocessing/heap.py +++ b/Lib/multiprocessing/heap.py @@ -71,7 +71,14 @@ else: os.unlink(name) util.Finalize(self, os.close, (self.fd,)) with open(self.fd, 'wb', closefd=False) as f: - f.write(b'\0'*size) + bs = 1024 * 1024 + if size >= bs: + zeros = b'\0' * bs + for _ in range(size // bs): + f.write(zeros) + del zeros + f.write(b'\0' * (size % bs)) + assert f.tell() == size self.buffer = mmap.mmap(self.fd, self.size) def reduce_arena(a): @@ -154,6 +154,7 @@ Wouter Bolsterlee Gawain Bolton Forest Bond Gregory Bond +Médéric Boquien Matias Bordese Jonas Borgström Jurjen Bos @@ -29,6 +29,9 @@ Core and Builtins Library ------- +- Issue #21116: Avoid blowing memory when allocating a multiprocessing shared + array that's larger than 50% of the available RAM. Patch by Médéric Boquien. + - Issue #22982: Improve BOM handling when seeking to multiple positions of a writable text file. |
