Skip to content

Commit 20e3149

Browse files
Merge branch 'main' into range-iter
2 parents 22f76b8 + 3f8b23f commit 20e3149

File tree

348 files changed

+36926
-42399
lines changed

Some content is hidden

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

348 files changed

+36926
-42399
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,4 +267,4 @@ jobs:
267267
- name: Display build info
268268
run: make pythoninfo
269269
- name: Tests
270-
run: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu -x test_ctypes test_crypt test_decimal test_faulthandler test_interpreters test___all__ test_idle test_tix test_tk test_ttk_guionly test_ttk_textonly"
270+
run: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu -x test_ctypes test_crypt test_decimal test_faulthandler test_interpreters test___all__ test_idle test_tix test_tk test_ttk_guionly test_ttk_textonly test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_spawn"

.gitignore

+5-6
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,11 @@ Tools/msi/obj
121121
Tools/ssl/amd64
122122
Tools/ssl/win32
123123

124-
# TODO: Once we auto-regen frozem modules for Windows builds
125-
# we can drop the .h files from the repo and ignore them here.
126-
# At that point we will rely the frozen manifest file to identify
127-
# changed generated files. We'll drop the entry for it then.
128-
# See: Tools/scripts/freeze_modules.py.
129-
#Python/frozen_modules/*.h
124+
# The frozen modules are always generated by the build so we don't
125+
# keep them in the repo. Also see Tools/scripts/freeze_modules.py.
126+
Python/frozen_modules/*.h
127+
# The manifest can be generated at any time with "make regen-frozen".
128+
Python/frozen_modules/MANIFEST
130129

131130
# Two-trick pony for OSX and other case insensitive file systems:
132131
# Ignore ./python binary on Unix but still look into ./Python/ directory.

Doc/c-api/init.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ Process-wide parameters
486486
(set by :c:func:`Py_SetProgramName` above) and some environment variables.
487487
The returned string consists of a series of directory names separated by a
488488
platform dependent delimiter character. The delimiter character is ``':'``
489-
on Unix and Mac OS X, ``';'`` on Windows. The returned string points into
489+
on Unix and macOS, ``';'`` on Windows. The returned string points into
490490
static storage; the caller should not modify its value. The list
491491
:data:`sys.path` is initialized with this value on interpreter startup; it
492492
can be (and usually is) modified later to change the search path for loading
@@ -518,7 +518,7 @@ Process-wide parameters
518518
default search path but uses the one provided instead. This is useful if
519519
Python is embedded by an application that has full knowledge of the location
520520
of all modules. The path components should be separated by the platform
521-
dependent delimiter character, which is ``':'`` on Unix and Mac OS X, ``';'``
521+
dependent delimiter character, which is ``':'`` on Unix and macOS, ``';'``
522522
on Windows.
523523
524524
This also causes :data:`sys.executable` to be set to the program
@@ -561,7 +561,7 @@ Process-wide parameters
561561
Return the platform identifier for the current platform. On Unix, this is
562562
formed from the "official" name of the operating system, converted to lower
563563
case, followed by the major revision number; e.g., for Solaris 2.x, which is
564-
also known as SunOS 5.x, the value is ``'sunos5'``. On Mac OS X, it is
564+
also known as SunOS 5.x, the value is ``'sunos5'``. On macOS, it is
565565
``'darwin'``. On Windows, it is ``'win'``. The returned string points into
566566
static storage; the caller should not modify its value. The value is available
567567
to Python code as ``sys.platform``.

Doc/c-api/intro.rst

+22
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,28 @@ complete listing.
111111

112112
.. versionadded:: 3.3
113113

114+
.. c:macro:: Py_ALWAYS_INLINE
115+
116+
Ask the compiler to always inline a static inline function. The compiler can
117+
ignore it and decides to not inline the function.
118+
119+
It can be used to inline performance critical static inline functions when
120+
building Python in debug mode with function inlining disabled. For example,
121+
MSC disables function inlining when building in debug mode.
122+
123+
Marking blindly a static inline function with Py_ALWAYS_INLINE can result in
124+
worse performances (due to increased code size for example). The compiler is
125+
usually smarter than the developer for the cost/benefit analysis.
126+
127+
If Python is :ref:`built in debug mode <debug-build>` (if the ``Py_DEBUG``
128+
macro is defined), the :c:macro:`Py_ALWAYS_INLINE` macro does nothing.
129+
130+
It must be specified before the function return type. Usage::
131+
132+
static inline Py_ALWAYS_INLINE int random(void) { return 4; }
133+
134+
.. versionadded:: 3.11
135+
114136
.. c:macro:: Py_CHARMASK(c)
115137
116138
Argument must be a character or an integer in the range [-128, 127] or [0,

Doc/c-api/type.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ The following functions and structs are used to create
187187
The *module* argument can be used to record the module in which the new
188188
class is defined. It must be a module object or ``NULL``.
189189
If not ``NULL``, the module is associated with the new type and can later be
190-
retreived with :c:func:`PyType_GetModule`.
190+
retrieved with :c:func:`PyType_GetModule`.
191191
The associated module is not inherited by subclasses; it must be specified
192192
for each class individually.
193193

Doc/c-api/typehints.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ two types exist -- :ref:`GenericAlias <types-genericalias>` and
3131
static PyMethodDef my_obj_methods[] = {
3232
// Other methods.
3333
...
34-
{"__class_getitem__", (PyCFunction)Py_GenericAlias, METH_O|METH_CLASS, "See PEP 585"}
34+
{"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, "See PEP 585"}
3535
...
3636
}
3737

0 commit comments

Comments
 (0)