Skip to content

Commit c6bc355

Browse files
committed
Catch up with main
2 parents 602f0e9 + 03f6c8e commit c6bc355

File tree

108 files changed

+1766
-1114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1766
-1114
lines changed

.github/CODEOWNERS

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,16 @@ Objects/exceptions.c @iritkatriel
107107
# Hashing & cryptographic primitives
108108
**/*hashlib* @gpshead @tiran @picnixz
109109
**/*hashopenssl* @gpshead @tiran @picnixz
110-
**/*pyhash* @gpshead @tiran
111-
**/sha* @gpshead @tiran @picnixz
112-
Modules/md5* @gpshead @tiran @picnixz
113-
**/*blake* @gpshead @tiran @picnixz
114-
Modules/_hacl/** @gpshead
110+
**/*pyhash* @gpshead @tiran @picnixz
111+
Modules/*blake* @gpshead @tiran @picnixz
112+
Modules/*md5* @gpshead @tiran @picnixz
113+
Modules/*sha* @gpshead @tiran @picnixz
114+
Modules/_hacl/** @gpshead @picnixz
115115
**/*hmac* @gpshead @picnixz
116116

117+
# libssl
118+
**/*ssl* @gpshead @picnixz
119+
117120
# logging
118121
**/*logging* @vsajip
119122

.github/workflows/tail-call.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ jobs:
8787
set PlatformToolset=clangcl
8888
set LLVMToolsVersion=${{ matrix.llvm }}.1.5
8989
set LLVMInstallDir=C:\Program Files\LLVM
90-
./PCbuild/build.bat --tail-call-interp -d -p ${{ matrix.architecture }}
91-
./PCbuild/rt.bat -d -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
90+
call ./PCbuild/build.bat --tail-call-interp -d -p ${{ matrix.architecture }}
91+
call ./PCbuild/rt.bat -d -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
9292
9393
# No tests (yet):
9494
- name: Emulated Windows (release)
@@ -112,8 +112,8 @@ jobs:
112112
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
113113
brew install llvm@${{ matrix.llvm }}
114114
export SDKROOT="$(xcrun --show-sdk-path)"
115-
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
116-
export PATH="/usr/local/opt/llvm/bin:$PATH"
115+
export PATH="/opt/homebrew/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
116+
export PATH="/usr/local/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
117117
CC=clang-19 ./configure --with-tail-call-interp
118118
make all --jobs 4
119119
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3

Doc/library/os.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3693,16 +3693,16 @@ features:
36933693

36943694
This example displays the number of bytes taken by non-directory files in each
36953695
directory under the starting directory, except that it doesn't look under any
3696-
CVS subdirectory::
3696+
``__pycache__`` subdirectory::
36973697

36983698
import os
36993699
from os.path import join, getsize
3700-
for root, dirs, files in os.walk('python/Lib/email'):
3700+
for root, dirs, files in os.walk('python/Lib/xml'):
37013701
print(root, "consumes", end=" ")
37023702
print(sum(getsize(join(root, name)) for name in files), end=" ")
37033703
print("bytes in", len(files), "non-directory files")
3704-
if 'CVS' in dirs:
3705-
dirs.remove('CVS') # don't visit CVS directories
3704+
if '__pycache__' in dirs:
3705+
dirs.remove('__pycache__') # don't visit __pycache__ directories
37063706

37073707
In the next example (simple implementation of :func:`shutil.rmtree`),
37083708
walking the tree bottom-up is essential, :func:`rmdir` doesn't allow
@@ -3755,16 +3755,16 @@ features:
37553755

37563756
This example displays the number of bytes taken by non-directory files in each
37573757
directory under the starting directory, except that it doesn't look under any
3758-
CVS subdirectory::
3758+
``__pycache__`` subdirectory::
37593759

37603760
import os
3761-
for root, dirs, files, rootfd in os.fwalk('python/Lib/email'):
3761+
for root, dirs, files, rootfd in os.fwalk('python/Lib/xml'):
37623762
print(root, "consumes", end="")
37633763
print(sum([os.stat(name, dir_fd=rootfd).st_size for name in files]),
37643764
end="")
37653765
print("bytes in", len(files), "non-directory files")
3766-
if 'CVS' in dirs:
3767-
dirs.remove('CVS') # don't visit CVS directories
3766+
if '__pycache__' in dirs:
3767+
dirs.remove('__pycache__') # don't visit __pycache__ directories
37683768

37693769
In the next example, walking the tree bottom-up is essential:
37703770
:func:`rmdir` doesn't allow deleting a directory before the directory is

Doc/library/socket.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -882,10 +882,10 @@ The following functions all create :ref:`socket objects <socket-objects>`.
882882
, a default reasonable value is chosen.
883883
*reuse_port* dictates whether to set the :data:`SO_REUSEPORT` socket option.
884884

885-
If *dualstack_ipv6* is true and the platform supports it the socket will
886-
be able to accept both IPv4 and IPv6 connections, else it will raise
887-
:exc:`ValueError`. Most POSIX platforms and Windows are supposed to support
888-
this functionality.
885+
If *dualstack_ipv6* is true, *family* is :data:`AF_INET6` and the platform
886+
supports it the socket will be able to accept both IPv4 and IPv6 connections,
887+
else it will raise :exc:`ValueError`. Most POSIX platforms and Windows are
888+
supposed to support this functionality.
889889
When this functionality is enabled the address returned by
890890
:meth:`socket.getpeername` when an IPv4 connection occurs will be an IPv6
891891
address represented as an IPv4-mapped IPv6 address.

Doc/library/stdtypes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4780,7 +4780,7 @@ can be used interchangeably to index the same dictionary entry.
47804780
such as an empty list. To get distinct values, use a :ref:`dict
47814781
comprehension <dict>` instead.
47824782

4783-
.. method:: get(key, default=None)
4783+
.. method:: get(key, default=None, /)
47844784

47854785
Return the value for *key* if *key* is in the dictionary, else *default*.
47864786
If *default* is not given, it defaults to ``None``, so that this method
@@ -4822,7 +4822,7 @@ can be used interchangeably to index the same dictionary entry.
48224822

48234823
.. versionadded:: 3.8
48244824

4825-
.. method:: setdefault(key, default=None)
4825+
.. method:: setdefault(key, default=None, /)
48264826

48274827
If *key* is in the dictionary, return its value. If not, insert *key*
48284828
with a value of *default* and return *default*. *default* defaults to

Doc/library/uuid.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,28 +103,29 @@ which relays any information about the UUID's safety, using this enumeration:
103103
- Meaning
104104

105105
* - .. attribute:: UUID.time_low
106-
- The first 32 bits of the UUID.
106+
- The first 32 bits of the UUID. Only relevant to version 1.
107107

108108
* - .. attribute:: UUID.time_mid
109-
- The next 16 bits of the UUID.
109+
- The next 16 bits of the UUID. Only relevant to version 1.
110110

111111
* - .. attribute:: UUID.time_hi_version
112-
- The next 16 bits of the UUID.
112+
- The next 16 bits of the UUID. Only relevant to version 1.
113113

114114
* - .. attribute:: UUID.clock_seq_hi_variant
115-
- The next 8 bits of the UUID.
115+
- The next 8 bits of the UUID. Only relevant to versions 1 and 6.
116116

117117
* - .. attribute:: UUID.clock_seq_low
118-
- The next 8 bits of the UUID.
118+
- The next 8 bits of the UUID. Only relevant to versions 1 and 6.
119119

120120
* - .. attribute:: UUID.node
121-
- The last 48 bits of the UUID.
121+
- The last 48 bits of the UUID. Only relevant to version 1.
122122

123123
* - .. attribute:: UUID.time
124-
- The 60-bit timestamp.
124+
- The 60-bit timestamp for version 1 and 6,
125+
or the 48-bit timestamp for version 7.
125126

126127
* - .. attribute:: UUID.clock_seq
127-
- The 14-bit sequence number.
128+
- The 14-bit sequence number. Only relevant to versions 1 and 6.
128129

129130

130131
.. attribute:: UUID.hex

Include/internal/mimalloc/mimalloc/atomic.h

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,9 @@ static inline void mi_atomic_yield(void) {
338338
_mm_pause();
339339
}
340340
#elif (defined(__GNUC__) || defined(__clang__)) && \
341-
(defined(__x86_64__) || defined(__i386__) || defined(__arm__) || defined(__armel__) || defined(__ARMEL__) || \
342-
defined(__aarch64__) || defined(__powerpc__) || defined(__ppc__) || defined(__PPC__)) || defined(__POWERPC__)
341+
(defined(__x86_64__) || defined(__i386__) || \
342+
defined(__aarch64__) || defined(__arm__) || \
343+
defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) || defined(__POWERPC__))
343344
#if defined(__x86_64__) || defined(__i386__)
344345
static inline void mi_atomic_yield(void) {
345346
__asm__ volatile ("pause" ::: "memory");
@@ -348,10 +349,16 @@ static inline void mi_atomic_yield(void) {
348349
static inline void mi_atomic_yield(void) {
349350
__asm__ volatile("wfe");
350351
}
351-
#elif (defined(__arm__) && __ARM_ARCH__ >= 7)
352+
#elif defined(__arm__)
353+
#if __ARM_ARCH >= 7
352354
static inline void mi_atomic_yield(void) {
353355
__asm__ volatile("yield" ::: "memory");
354356
}
357+
#else
358+
static inline void mi_atomic_yield(void) {
359+
__asm__ volatile ("nop" ::: "memory");
360+
}
361+
#endif
355362
#elif defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) || defined(__POWERPC__)
356363
#ifdef __APPLE__
357364
static inline void mi_atomic_yield(void) {
@@ -362,10 +369,6 @@ static inline void mi_atomic_yield(void) {
362369
__asm__ __volatile__ ("or 27,27,27" ::: "memory");
363370
}
364371
#endif
365-
#elif defined(__armel__) || defined(__ARMEL__)
366-
static inline void mi_atomic_yield(void) {
367-
__asm__ volatile ("nop" ::: "memory");
368-
}
369372
#endif
370373
#elif defined(__sun)
371374
// Fallback for other archs

Include/internal/pycore_dict.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ extern int _PyDict_Pop_KnownHash(
150150
Py_hash_t hash,
151151
PyObject **result);
152152

153+
#ifdef Py_GIL_DISABLED
154+
PyAPI_FUNC(void) _PyDict_EnsureSharedOnRead(PyDictObject *mp);
155+
#endif
156+
153157
#define DKIX_EMPTY (-1)
154158
#define DKIX_DUMMY (-2) /* Used internally */
155159
#define DKIX_ERROR (-3)

Include/internal/pycore_global_objects_fini_generated.h

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_global_strings.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,9 @@ struct _Py_global_strings {
283283
STRUCT_FOR_ID(aggregate_class)
284284
STRUCT_FOR_ID(alias)
285285
STRUCT_FOR_ID(align)
286+
STRUCT_FOR_ID(all)
286287
STRUCT_FOR_ID(allow_code)
288+
STRUCT_FOR_ID(any)
287289
STRUCT_FOR_ID(append)
288290
STRUCT_FOR_ID(arg)
289291
STRUCT_FOR_ID(argdefs)

0 commit comments

Comments
 (0)