Skip to content

Commit 02cf9af

Browse files
Merge remote-tracking branch 'upstream/main' into immortal-references
2 parents 5af0167 + 95ba723 commit 02cf9af

File tree

376 files changed

+7601
-3322
lines changed

Some content is hidden

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

376 files changed

+7601
-3322
lines changed

.azure-pipelines/tcltk-build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ jobs:
6060
& "$(msbuild)" PCbuild\tix.vcxproj "@msbuild.rsp" /p:Platform=x64 /p:tcltkDir="$(OutDir)\amd64"
6161
displayName: 'Build for amd64'
6262
63+
- powershell: |
64+
& "$(msbuild)" PCbuild\tcl.vcxproj "@msbuild.rsp" /p:Platform=ARM64 /p:tcltkDir="$(OutDir)\arm64"
65+
& "$(msbuild)" PCbuild\tk.vcxproj "@msbuild.rsp" /p:Platform=ARM64 /p:tcltkDir="$(OutDir)\arm64"
66+
& "$(msbuild)" PCbuild\tix.vcxproj "@msbuild.rsp" /p:Platform=ARM64 /p:tcltkDir="$(OutDir)\arm64"
67+
displayName: 'Build for arm64'
68+
6369
- publish: '$(OutDir)'
6470
artifact: 'tcltk'
6571
displayName: 'Publishing tcltk'

.azure-pipelines/windows-release/msi-steps.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ steps:
7171
artifactName: tcltk_lib_amd64
7272
targetPath: $(Build.BinariesDirectory)\tcltk_lib_amd64
7373

74+
- task: DownloadPipelineArtifact@1
75+
displayName: 'Download artifact: tcltk_lib_arm64'
76+
condition: and(succeeded(), eq(variables['PublishARM64'], 'true'))
77+
inputs:
78+
artifactName: tcltk_lib_arm64
79+
targetPath: $(Build.BinariesDirectory)\tcltk_lib_arm64
80+
7481
- powershell: |
7582
copy $(Build.BinariesDirectory)\amd64\Activate.ps1 Lib\venv\scripts\common\Activate.ps1 -Force
7683
displayName: 'Copy signed files into sources'
@@ -107,7 +114,6 @@ steps:
107114
PYTHONHOME: $(Build.SourcesDirectory)
108115
TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_win32
109116
BuildForRelease: true
110-
SuppressMinGWLib: true
111117
112118
- script: |
113119
%MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true
@@ -120,7 +126,6 @@ steps:
120126
PYTHONHOME: $(Build.SourcesDirectory)
121127
TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_amd64
122128
BuildForRelease: true
123-
SuppressMinGWLib: true
124129
125130
- script: |
126131
%MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true
@@ -132,8 +137,8 @@ steps:
132137
PYTHON: $(Build.BinariesDirectory)\win32\python.exe
133138
PythonForBuild: $(Build.BinariesDirectory)\win32\python.exe
134139
PYTHONHOME: $(Build.SourcesDirectory)
140+
TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_arm64
135141
BuildForRelease: true
136-
SuppressMinGWLib: true
137142
138143
- task: CopyFiles@2
139144
displayName: 'Assemble artifact: msi (win32)'

.azure-pipelines/windows-release/stage-build.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,13 @@ jobs:
166166
platform: x64
167167
msbuildArguments: /t:CopyTclTkLib /p:OutDir="$(Build.ArtifactStagingDirectory)\tcl_amd64"
168168

169+
- task: MSBuild@1
170+
displayName: 'Copy Tcl/Tk lib for publish'
171+
inputs:
172+
solution: PCbuild\tcltk.props
173+
platform: ARM64
174+
msbuildArguments: /t:CopyTclTkLib /p:OutDir="$(Build.ArtifactStagingDirectory)\tcl_arm64"
175+
169176
- task: PublishPipelineArtifact@0
170177
displayName: 'Publish artifact: tcltk_lib_win32'
171178
inputs:
@@ -177,3 +184,9 @@ jobs:
177184
inputs:
178185
targetPath: '$(Build.ArtifactStagingDirectory)\tcl_amd64'
179186
artifactName: tcltk_lib_amd64
187+
188+
- task: PublishPipelineArtifact@0
189+
displayName: 'Publish artifact: tcltk_lib_arm64'
190+
inputs:
191+
targetPath: '$(Build.ArtifactStagingDirectory)\tcl_arm64'
192+
artifactName: tcltk_lib_arm64

.azure-pipelines/windows-release/stage-layout-full.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
HostArch: amd64
2727
Python: $(Build.BinariesDirectory)\bin_amd64\python.exe
2828
PYTHONHOME: $(Build.SourcesDirectory)
29+
TclLibrary: $(Build.BinariesDirectory)\tcltk_lib\tcl8
2930

3031
steps:
3132
- template: ./checkout.yml

.azure-pipelines/windows-release/stage-layout-msix.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
HostArch: amd64
2626
Python: $(Build.BinariesDirectory)\bin_amd64\python.exe
2727
PYTHONHOME: $(Build.SourcesDirectory)
28+
TclLibrary: $(Build.BinariesDirectory)\tcltk_lib\tcl8
2829

2930
steps:
3031
- template: ./checkout.yml

.github/CODEOWNERS

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ Python/traceback.c @iritkatriel
3232
Python/pythonrun.c @iritkatriel
3333

3434
# Hashing
35-
**/*hashlib* @python/crypto-team @tiran
36-
**/*pyhash* @python/crypto-team @tiran
37-
**/*sha* @python/crypto-team @tiran
38-
**/*md5* @python/crypto-team @tiran
39-
**/*blake* @python/crypto-team @tiran
40-
/Modules/_blake2/** @python/crypto-team @tiran
41-
/Modules/_sha3/** @python/crypto-team @tiran
35+
**/*hashlib* @tiran
36+
**/*pyhash* @tiran
37+
**/*sha* @tiran
38+
**/*md5* @tiran
39+
**/*blake* @tiran
40+
/Modules/_blake2/** @tiran
41+
/Modules/_sha3/** @tiran
4242

4343
# logging
4444
**/*logging* @vsajip
@@ -61,14 +61,6 @@ Python/pythonrun.c @iritkatriel
6161
**/*import*.c @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
6262
**/*import*.py @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
6363

64-
65-
# SSL
66-
**/*ssl* @python/crypto-team
67-
**/*.pem @python/crypto-team
68-
69-
# CSPRNG
70-
Python/bootstrap_hash.c @python/crypto-team
71-
7264
# Dates and times
7365
**/*datetime* @pganssle @abalkin
7466
**/*str*time* @pganssle @abalkin
@@ -132,7 +124,7 @@ Lib/ast.py @isidentical
132124
**/*bisect* @rhettinger
133125
**/*heapq* @rhettinger
134126
**/*functools* @rhettinger
135-
**/*decimal* @rhettinger @skrah
127+
**/*decimal* @rhettinger
136128

137129
**/*dataclasses* @ericvsmith
138130

@@ -149,6 +141,8 @@ Lib/ast.py @isidentical
149141
**/*cgi* @ethanfurman
150142
**/*tarfile* @ethanfurman
151143

144+
**/*tomllib* @encukou
145+
152146
# macOS
153147
/Mac/ @python/macos-team
154148
**/*osx_support* @python/macos-team

.github/workflows/build.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,4 @@ jobs:
306306
- name: Display build info
307307
run: make pythoninfo
308308
- name: Tests
309-
# Skip test_tools test_peg_generator test_concurrent_futures because
310-
# there are too slow: between 5 and 20 minutes on this CI.
311-
#
312-
# Skip multiprocessing and concurrent.futures tests which are affected by
313-
# bpo-45200 bug: libasan dead lock in pthread_create().
314-
#
315-
# test___all__ is skipped because importing some modules directly can trigger
316-
# known problems with ASAN (like tk or crypt).
317-
run: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu -x test___all__ test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_spawn test_tools test_peg_generator test_concurrent_futures"
309+
run: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Mac/pythonw
7575
Misc/python.pc
7676
Misc/python-embed.pc
7777
Misc/python-config.sh
78+
Modules/Setup.bootstrap
7879
Modules/Setup.config
7980
Modules/Setup.local
8081
Modules/Setup.stdlib

Doc/c-api/typeobj.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ and :c:type:`PyType_Type` effectively act as defaults.)
12331233
.. note::
12341234

12351235
:const:`Py_TPFLAGS_MAPPING` and :const:`Py_TPFLAGS_SEQUENCE` are
1236-
mutually exclusive; it is an error enable both flags simultaneously.
1236+
mutually exclusive; it is an error to enable both flags simultaneously.
12371237

12381238
**Inheritance:**
12391239

@@ -1255,7 +1255,7 @@ and :c:type:`PyType_Type` effectively act as defaults.)
12551255
.. note::
12561256

12571257
:const:`Py_TPFLAGS_MAPPING` and :const:`Py_TPFLAGS_SEQUENCE` are
1258-
mutually exclusive; it is an error enable both flags simultaneously.
1258+
mutually exclusive; it is an error to enable both flags simultaneously.
12591259

12601260
**Inheritance:**
12611261

Doc/library/codecs.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,8 +697,9 @@ compatible with the Python codec registry.
697697

698698
.. method:: writelines(list)
699699

700-
Writes the concatenated list of strings to the stream (possibly by reusing
701-
the :meth:`write` method). The standard bytes-to-bytes codecs
700+
Writes the concatenated iterable of strings to the stream (possibly by reusing
701+
the :meth:`write` method). Infinite or
702+
very large iterables are not supported. The standard bytes-to-bytes codecs
702703
do not support this method.
703704

704705

Doc/library/dis.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,15 +475,24 @@ the original TOS1.
475475

476476
**Coroutine opcodes**
477477

478-
.. opcode:: GET_AWAITABLE
478+
.. opcode:: GET_AWAITABLE (where)
479479

480480
Implements ``TOS = get_awaitable(TOS)``, where ``get_awaitable(o)``
481481
returns ``o`` if ``o`` is a coroutine object or a generator object with
482482
the CO_ITERABLE_COROUTINE flag, or resolves
483483
``o.__await__``.
484484

485+
If the ``where`` operand is nonzero, it indicates where the instruction
486+
occurs:
487+
488+
* ``1`` After a call to ``__aenter__``
489+
* ``2`` After a call to ``__aexit__``
490+
485491
.. versionadded:: 3.5
486492

493+
.. versionchanged:: 3.11
494+
Previously, this instruction did not have an oparg.
495+
487496

488497
.. opcode:: GET_AITER
489498

Doc/library/fileformats.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ that aren't markup languages and are not related to e-mail.
1212

1313
csv.rst
1414
configparser.rst
15+
tomllib.rst
1516
netrc.rst
1617
xdrlib.rst
1718
plistlib.rst

Doc/library/importlib.metadata.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,3 @@ a custom finder, return instances of this derived ``Distribution`` in the
335335
.. _`entry point API`: https://setuptools.readthedocs.io/en/latest/pkg_resources.html#entry-points
336336
.. _`metadata API`: https://setuptools.readthedocs.io/en/latest/pkg_resources.html#metadata-api
337337
.. _`importlib_resources`: https://importlib-resources.readthedocs.io/en/latest/index.html
338-
339-
340-
.. rubric:: Footnotes

Doc/library/inspect.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,9 @@ attributes:
191191
| | | which this code object |
192192
| | | was defined |
193193
+-----------+-------------------+---------------------------+
194-
| | co_names | tuple of names of local |
195-
| | | variables |
194+
| | co_names | tuple of names other |
195+
| | | than arguments and |
196+
| | | function locals |
196197
+-----------+-------------------+---------------------------+
197198
| | co_nlocals | number of local variables |
198199
+-----------+-------------------+---------------------------+

Doc/library/io.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,7 @@ I/O Base Classes
306306

307307
.. class:: IOBase
308308

309-
The abstract base class for all I/O classes, acting on streams of bytes.
310-
There is no public constructor.
309+
The abstract base class for all I/O classes.
311310

312311
This class provides empty abstract implementations for many methods
313312
that derived classes can override selectively; the default
@@ -461,8 +460,7 @@ I/O Base Classes
461460

462461
.. class:: RawIOBase
463462

464-
Base class for raw binary streams. It inherits :class:`IOBase`. There is no
465-
public constructor.
463+
Base class for raw binary streams. It inherits :class:`IOBase`.
466464

467465
Raw binary streams typically provide low-level access to an underlying OS
468466
device or API, and do not try to encapsulate it in high-level primitives
@@ -515,7 +513,7 @@ I/O Base Classes
515513
.. class:: BufferedIOBase
516514

517515
Base class for binary streams that support some kind of buffering.
518-
It inherits :class:`IOBase`. There is no public constructor.
516+
It inherits :class:`IOBase`.
519517

520518
The main difference with :class:`RawIOBase` is that methods :meth:`read`,
521519
:meth:`readinto` and :meth:`write` will try (respectively) to read as much
@@ -852,8 +850,7 @@ Text I/O
852850
.. class:: TextIOBase
853851

854852
Base class for text streams. This class provides a character and line based
855-
interface to stream I/O. It inherits :class:`IOBase`. There is no public
856-
constructor.
853+
interface to stream I/O. It inherits :class:`IOBase`.
857854

858855
:class:`TextIOBase` provides or overrides these data attributes and
859856
methods in addition to those from :class:`IOBase`:

Doc/library/sys.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,7 @@ always available.
449449

450450
.. function:: exit([arg])
451451

452-
Exit from Python. This is implemented by raising the :exc:`SystemExit`
453-
exception, so cleanup actions specified by finally clauses of :keyword:`try`
454-
statements are honored, and it is possible to intercept the exit attempt at
455-
an outer level.
452+
Raise a :exc:`SystemExit` exception, signaling an intention to exit the interpreter.
456453

457454
The optional argument *arg* can be an integer giving the exit status
458455
(defaulting to zero), or another type of object. If it is an integer, zero
@@ -469,7 +466,8 @@ always available.
469466

470467
Since :func:`exit` ultimately "only" raises an exception, it will only exit
471468
the process when called from the main thread, and the exception is not
472-
intercepted.
469+
intercepted. Cleanup actions specified by finally clauses of :keyword:`try` statements
470+
are honored, and it is possible to intercept the exit attempt at an outer level.
473471

474472
.. versionchanged:: 3.6
475473
If an error occurs in the cleanup after the Python interpreter

Doc/library/threading.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,8 @@ since it is impossible to detect the termination of alien threads.
441441

442442
.. attribute:: daemon
443443

444-
A boolean value indicating whether this thread is a daemon thread (True)
445-
or not (False). This must be set before :meth:`~Thread.start` is called,
444+
A boolean value indicating whether this thread is a daemon thread (``True``)
445+
or not (``False``). This must be set before :meth:`~Thread.start` is called,
446446
otherwise :exc:`RuntimeError` is raised. Its initial value is inherited
447447
from the creating thread; the main thread is not a daemon thread and
448448
therefore all threads created in the main thread default to
@@ -516,7 +516,7 @@ All methods are executed atomically.
516516
value, block for at most the number of seconds specified by *timeout*
517517
and as long as the lock cannot be acquired. A *timeout* argument of ``-1``
518518
specifies an unbounded wait. It is forbidden to specify a *timeout*
519-
when *blocking* is false.
519+
when *blocking* is ``False``.
520520

521521
The return value is ``True`` if the lock is acquired successfully,
522522
``False`` if not (for example if the *timeout* expired).
@@ -544,7 +544,7 @@ All methods are executed atomically.
544544

545545
.. method:: locked()
546546

547-
Return true if the lock is acquired.
547+
Return ``True`` if the lock is acquired.
548548

549549

550550

@@ -593,17 +593,17 @@ Reentrant locks also support the :ref:`context management protocol <with-locks>`
593593
is unlocked, only one at a time will be able to grab ownership of the lock.
594594
There is no return value in this case.
595595

596-
When invoked with the *blocking* argument set to true, do the same thing as when
596+
When invoked with the *blocking* argument set to ``True``, do the same thing as when
597597
called without arguments, and return ``True``.
598598

599-
When invoked with the *blocking* argument set to false, do not block. If a call
599+
When invoked with the *blocking* argument set to ``False``, do not block. If a call
600600
without an argument would block, return ``False`` immediately; otherwise, do the
601601
same thing as when called without arguments, and return ``True``.
602602

603603
When invoked with the floating-point *timeout* argument set to a positive
604604
value, block for at most the number of seconds specified by *timeout*
605605
and as long as the lock cannot be acquired. Return ``True`` if the lock has
606-
been acquired, false if the timeout has elapsed.
606+
been acquired, ``False`` if the timeout has elapsed.
607607

608608
.. versionchanged:: 3.2
609609
The *timeout* parameter is new.
@@ -844,7 +844,7 @@ Semaphores also support the :ref:`context management protocol <with-locks>`.
844844
thread will be awoken by each call to :meth:`~Semaphore.release`. The
845845
order in which threads are awoken should not be relied on.
846846

847-
When invoked with *blocking* set to false, do not block. If a call
847+
When invoked with *blocking* set to ``False``, do not block. If a call
848848
without an argument would block, return ``False`` immediately; otherwise, do
849849
the same thing as when called without arguments, and return ``True``.
850850

0 commit comments

Comments
 (0)