Skip to content

Commit ebacd8b

Browse files
authored
Merge branch 'main' into use_pack_version
2 parents 7b8c269 + 3ad9316 commit ebacd8b

11 files changed

Lines changed: 37 additions & 16 deletions

File tree

‎Doc/library/os.rst‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6466,9 +6466,12 @@ Random numbers
64666466
random bytes in non-blocking mode (using the :data:`GRND_NONBLOCK` flag) or
64676467
to poll until the system urandom entropy pool is initialized.
64686468

6469-
On a Unix-like system, random bytes are read from the ``/dev/urandom``
6470-
device. If the ``/dev/urandom`` device is not available or not readable, the
6471-
:exc:`NotImplementedError` exception is raised.
6469+
On other Unix-like systems, the C ``getrandom()`` function is used if it is
6470+
available, otherwise the C ``getentropy()`` function.
6471+
6472+
If none of these functions can be used, random bytes are read from the
6473+
``/dev/urandom`` device. If the ``/dev/urandom`` device is not available or
6474+
not readable, the :exc:`NotImplementedError` exception is raised.
64726475

64736476
On Windows, it will use ``BCryptGenRandom()``.
64746477

‎Doc/library/ssl.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1965,7 +1965,7 @@ to speed up repeated connections from the same clients.
19651965
Set the allowed ciphers for sockets created with this context when
19661966
connecting using TLS 1.2 and earlier. The *ciphers* argument should
19671967
be a string in the `OpenSSL cipher list format
1968-
<https://docs.openssl.org/master/man1/ciphers/>`_.
1968+
<https://docs.openssl.org/master/man1/openssl-ciphers/#cipher-list-format>`_.
19691969
To set allowed TLS 1.3 ciphers, use :meth:`SSLContext.set_ciphersuites`.
19701970

19711971
If no cipher can be selected (because compile-time options or other

‎Lib/test/support/__init__.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,13 @@ def internal(*args, **kwargs):
14071407
import_module('_testcapi')
14081408
return test(*args, **kwargs)
14091409

1410-
return cpython_only(internal)
1410+
# gh-162144: set_nomemory() and call_with_nomemory() of _testcapi are not
1411+
# thread safe and emit warnings when using a thread sanitizer (TSan).
1412+
use_tsan = check_sanitizer(thread=True)
1413+
reason ='not working with thread sanitizer (gh-157415)'
1414+
skip_if_tsan = unittest.skipIf(use_tsan, reason)
1415+
1416+
return cpython_only(skip_if_tsan(internal))
14111417

14121418
def bigaddrspacetest(f):
14131419
"""Decorator for tests that fill the address space."""

‎Lib/test/test_io/test_winconsoleio.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def test_write(self):
160160
testcases.append(data + b'\xff')
161161
# incomplete multibyte sequence
162162
with self.subTest(data=data):
163-
self.assertEqual(f.write(data), len(a))
163+
self.assertEqual(f.write(data), len(a or data))
164164
for data in testcases:
165165
with self.subTest(data=data):
166166
self.assertEqual(f.write(data), len(data))

‎Makefile.pre.in‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2485,7 +2485,7 @@ sharedinstall: all
24852485
# Install the interpreter with $(VERSION) affixed
24862486
# This goes into $(exec_prefix)
24872487
.PHONY: altbininstall
2488-
altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@
2488+
altbininstall: all @FRAMEWORKPYTHONW@
24892489
@for i in $(BINDIR) $(LIBDIR); \
24902490
do \
24912491
if test ! -d $(DESTDIR)$$i; then \
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
``make install`` now depends on the ``all`` target, so running it directly
2+
after ``./configure --enable-optimizations`` installs the PGO-optimized
3+
interpreter rather than an unoptimized build.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix the Apple testbed's extension module processing for an XCframework or
2+
package path with a space, or a build path with brackets or a backslash.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Skip ``@support.nomemtest`` tests when using a thread sanitizer (TSan).
2+
``set_nomemory()`` and ``call_with_nomemory()`` functions of the
3+
:mod:`!_testcapi` extension are not thread safe. Patch by Victor Stinner.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a hang when writing an incomplete UTF-8 sequence to the Windows console.

‎Modules/_io/winconsoleio.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,10 @@ _io__WindowsConsoleIO_write_impl(winconsoleio *self, PyTypeObject *cls,
10971097
len = Py_MIN(len, max_wlen * 3);
10981098
while (1) {
10991099
/* Fix for github issues gh-110913 and gh-82052. */
1100-
len = _find_last_utf8_boundary(b->buf, len);
1100+
DWORD boundary = _find_last_utf8_boundary(b->buf, len);
1101+
if (boundary != 0) {
1102+
len = boundary;
1103+
}
11011104
wlen = MultiByteToWideChar(CP_UTF8, 0, b->buf, len, NULL, 0);
11021105
if (wlen <= max_wlen) {
11031106
break;

0 commit comments

Comments
 (0)