Skip to content

Commit 0c9de73

Browse files
committed
Merge remote-tracking branch 'origin/main' into deepfreeze
2 parents cb69845 + 912a4cc commit 0c9de73

File tree

211 files changed

+7173
-3663
lines changed

Some content is hidden

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

211 files changed

+7173
-3663
lines changed

.azure-pipelines/find-tools.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Locate a set of the tools used for builds
2+
3+
steps:
4+
- template: windows-release/find-sdk.yml
5+
parameters:
6+
toolname: 'signtool.exe'
7+
8+
- powershell: |
9+
$vcvarsall = (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" `
10+
-prerelease `
11+
-latest `
12+
-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
13+
-find VC\Auxiliary\Build\vcvarsall.bat)
14+
Write-Host "Found vcvarsall at $vcvarsall"
15+
Write-Host "##vso[task.setVariable variable=vcvarsall]$vcvarsall"
16+
displayName: 'Find vcvarsall.bat'
17+
18+
- powershell: |
19+
$msbuild = (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" `
20+
-prerelease `
21+
-latest `
22+
-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
23+
-find MSBuild\Current\Bin\msbuild.exe)
24+
Write-Host "Found MSBuild at $msbuild"
25+
Write-Host "##vso[task.setVariable variable=msbuild]$msbuild"
26+
displayName: 'Find MSBuild'

.azure-pipelines/libffi-build.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: $(SourceTag)_$(Date:yyyyMMdd)$(Rev:.rr)
2+
3+
variables:
4+
IntDir: '$(Build.BinariesDirectory)'
5+
OutDir: '$(Build.ArtifactStagingDirectory)'
6+
7+
# MUST BE SET AT QUEUE TIME
8+
# SigningCertificate: 'Python Software Foundation'
9+
# SourcesRepo: 'https://github.com/python/cpython-source-deps'
10+
# SourceTag: 'libffi-3.4.2'
11+
12+
jobs:
13+
- job: Build_LibFFI
14+
displayName: LibFFI
15+
pool:
16+
vmImage: windows-latest
17+
18+
workspace:
19+
clean: all
20+
21+
steps:
22+
- checkout: none
23+
24+
- template: ./find-tools.yml
25+
26+
- powershell: |
27+
mkdir -Force "$(IntDir)\script"
28+
iwr "https://github.com/python/cpython/raw/main/PCbuild/prepare_libffi.bat" `
29+
-outfile "$(IntDir)\script\prepare_libffi.bat"
30+
displayName: 'Download build script'
31+
32+
- powershell: |
33+
git clone $(SourcesRepo) -b $(SourceTag) --depth 1 -c core.autocrlf=false -c core.eol=lf .
34+
displayName: 'Check out LibFFI sources'
35+
36+
- script: 'prepare_libffi.bat --install-cygwin'
37+
workingDirectory: '$(IntDir)\script'
38+
displayName: 'Install Cygwin and build'
39+
env:
40+
VCVARSALL: '$(vcvarsall)'
41+
LIBFFI_SOURCE: '$(Build.SourcesDirectory)'
42+
LIBFFI_OUT: '$(OutDir)'
43+
44+
- powershell: |
45+
if ((gci *\*.dll).Count -lt 4) {
46+
Write-Error "Did not generate enough DLL files"
47+
}
48+
if ((gci *\Include\ffi.h).Count -lt 4) {
49+
Write-Error "Did not generate enough include files"
50+
}
51+
failOnStderr: true
52+
workingDirectory: '$(OutDir)'
53+
displayName: 'Verify files were created'
54+
55+
- publish: '$(OutDir)'
56+
artifact: 'unsigned'
57+
displayName: 'Publish unsigned build'
58+
59+
- job: Sign_LibFFI
60+
displayName: Sign LibFFI
61+
dependsOn: Build_LibFFI
62+
pool:
63+
name: 'Windows Release'
64+
65+
workspace:
66+
clean: all
67+
68+
steps:
69+
- checkout: none
70+
- download: current
71+
artifact: unsigned
72+
73+
- template: ./find-tools.yml
74+
75+
- powershell: |
76+
signtool sign /q /a `
77+
/n "Python Software Foundation" `
78+
/fd sha256 `
79+
/tr http://timestamp.digicert.com/ /td sha256 `
80+
/d "LibFFI for Python" `
81+
(gci "$(Pipeline.Workspace)\unsigned\*.dll" -r)
82+
displayName: 'Sign files'
83+
84+
- publish: '$(Pipeline.Workspace)\unsigned'
85+
artifact: 'libffi'
86+
displayName: 'Publish libffi'

.azure-pipelines/openssl-build.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: $(SourceTag)_$(Date:yyyyMMdd)$(Rev:.rr)
2+
3+
variables:
4+
IntDir: '$(Build.BinariesDirectory)'
5+
OutDir: '$(Build.ArtifactStagingDirectory)'
6+
7+
# MUST BE SET AT QUEUE TIME
8+
# SigningCertificate: 'Python Software Foundation'
9+
# SourcesRepo: 'https://github.com/python/cpython-source-deps'
10+
# SourceTag: 'openssl-1.1.1k'
11+
12+
jobs:
13+
- job: Build_SSL
14+
displayName: OpenSSL
15+
pool:
16+
name: 'Windows Release'
17+
#vmImage: windows-latest
18+
19+
strategy:
20+
matrix:
21+
win32:
22+
Platform: 'win32'
23+
VCPlatform: 'amd64_x86'
24+
OpenSSLPlatform: 'VC-WIN32 no-asm'
25+
amd64:
26+
Platform: 'amd64'
27+
VCPlatform: 'amd64'
28+
OpenSSLPlatform: 'VC-WIN64A-masm'
29+
arm32:
30+
Platform: 'arm32'
31+
VCPlatform: 'amd64_arm'
32+
OpenSSLPlatform: 'VC-WIN32-ARM'
33+
arm64:
34+
Platform: 'arm64'
35+
VCPlatform: 'amd64_arm64'
36+
OpenSSLPlatform: 'VC-WIN64-ARM'
37+
38+
workspace:
39+
clean: all
40+
41+
steps:
42+
- checkout: none
43+
44+
- template: ./find-tools.yml
45+
46+
- powershell: |
47+
git clone $(SourcesRepo) -b $(SourceTag) --depth 1 .
48+
displayName: 'Check out OpenSSL sources'
49+
50+
- powershell: |
51+
$f = gi ms\uplink.c
52+
$c1 = gc $f
53+
$c2 = $c1 -replace '\(\(h = GetModuleHandle\(NULL\)\) == NULL\)', '((h = GetModuleHandleA("_ssl.pyd")) == NULL) if ((h = GetModuleHandleA("_ssl_d.pyd")) == NULL) if ((h = GetModuleHandle(NULL)) == NULL /*patched*/)'
54+
if ($c2 -ne $c1) {
55+
$c2 | Out-File $f -Encoding ASCII
56+
} else {
57+
Write-Host '##warning Failed to patch uplink.c'
58+
}
59+
displayName: 'Apply uplink.c patch'
60+
61+
- script: |
62+
call "$(vcvarsall)" $(VCPlatform)
63+
perl "$(Build.SourcesDirectory)\Configure" $(OpenSSLPlatform)
64+
nmake
65+
workingDirectory: '$(IntDir)'
66+
displayName: 'Build OpenSSL'
67+
68+
- script: |
69+
call "$(vcvarsall)" $(VCPlatform)
70+
signtool sign /q /a /n "$(SigningCertificate)" /fd sha256 /tr http://timestamp.digicert.com/ /td sha256 /d "OpenSSL for Python" *.dll
71+
workingDirectory: '$(IntDir)'
72+
displayName: 'Sign OpenSSL Build'
73+
condition: and(succeeded(), variables['SigningCertificate'])
74+
75+
- task: CopyFiles@2
76+
displayName: 'Copy built libraries for upload'
77+
inputs:
78+
SourceFolder: '$(IntDir)'
79+
Contents: |
80+
lib*.dll
81+
lib*.pdb
82+
lib*.lib
83+
include\openssl\*.h
84+
TargetFolder: '$(OutDir)'
85+
86+
- task: CopyFiles@2
87+
displayName: 'Copy header files for upload'
88+
inputs:
89+
SourceFolder: '$(Build.SourcesDirectory)'
90+
Contents: |
91+
include\openssl\*
92+
TargetFolder: '$(OutDir)'
93+
94+
- task: CopyFiles@2
95+
displayName: 'Copy applink files for upload'
96+
inputs:
97+
SourceFolder: '$(Build.SourcesDirectory)\ms'
98+
Contents: applink.c
99+
TargetFolder: '$(OutDir)\include'
100+
101+
- task: CopyFiles@2
102+
displayName: 'Copy LICENSE for upload'
103+
inputs:
104+
SourceFolder: '$(Build.SourcesDirectory)'
105+
Contents: LICENSE
106+
TargetFolder: '$(OutDir)'
107+
108+
- publish: '$(OutDir)'
109+
artifact: '$(Platform)'
110+
displayName: 'Publishing $(Platform)'

.azure-pipelines/tcltk-build.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: tcl$(TkSourceTag)_$(Date:yyyyMMdd)$(Rev:.rr)
2+
3+
variables:
4+
IntDir: '$(Build.BinariesDirectory)\obj'
5+
ExternalsDir: '$(Build.BinariesDirectory)\externals'
6+
OutDir: '$(Build.ArtifactStagingDirectory)'
7+
Configuration: 'Release'
8+
9+
# MUST BE SET AT QUEUE TIME
10+
# SigningCertificate: 'Python Software Foundation'
11+
# SourcesRepo: 'https://github.com/python/cpython-source-deps'
12+
# TclSourceTag: 'tcl-core-8.6.12.0'
13+
# TkSourceTag: 'tk-8.6.12.0'
14+
# TixSourceTag: 'tix-8.4.3.6'
15+
16+
jobs:
17+
- job: Build_TclTk
18+
displayName: 'Tcl/Tk'
19+
pool:
20+
name: 'Windows Release'
21+
#vmImage: windows-latest
22+
23+
workspace:
24+
clean: all
25+
26+
steps:
27+
- template: ./find-tools.yml
28+
29+
- powershell: |
30+
git clone $(SourcesRepo) -b $(TclSourceTag) --depth 1 "$(ExternalsDir)\$(TclSourceTag)"
31+
displayName: 'Check out Tcl sources'
32+
33+
- powershell: |
34+
git clone $(SourcesRepo) -b $(TkSourceTag) --depth 1 "$(ExternalsDir)\$(TkSourceTag)"
35+
displayName: 'Check out Tk sources'
36+
37+
- powershell: |
38+
git clone $(SourcesRepo) -b $(TixSourceTag) --depth 1 "$(ExternalsDir)\$(TixSourceTag)"
39+
displayName: 'Check out Tix sources'
40+
41+
# This msbuild.rsp file will be used by the build to forcibly override these variables
42+
- powershell: |
43+
del -Force -EA 0 msbuild.rsp
44+
"/p:IntDir=$(IntDir)\" >> msbuild.rsp
45+
"/p:ExternalsDir=$(ExternalsDir)\" >> msbuild.rsp
46+
"/p:tclDir=$(ExternalsDir)\$(TclSourceTag)\" >> msbuild.rsp
47+
"/p:tkDir=$(ExternalsDir)\$(TkSourceTag)\" >> msbuild.rsp
48+
"/p:tixDir=$(ExternalsDir)\$(TixSourceTag)\" >> msbuild.rsp
49+
displayName: 'Generate msbuild.rsp'
50+
51+
- powershell: |
52+
& "$(msbuild)" PCbuild\tcl.vcxproj "@msbuild.rsp" /p:Platform=Win32 /p:tcltkDir="$(OutDir)\win32"
53+
& "$(msbuild)" PCbuild\tk.vcxproj "@msbuild.rsp" /p:Platform=Win32 /p:tcltkDir="$(OutDir)\win32"
54+
& "$(msbuild)" PCbuild\tix.vcxproj "@msbuild.rsp" /p:Platform=Win32 /p:tcltkDir="$(OutDir)\win32"
55+
displayName: 'Build for win32'
56+
57+
- powershell: |
58+
& "$(msbuild)" PCbuild\tcl.vcxproj "@msbuild.rsp" /p:Platform=x64 /p:tcltkDir="$(OutDir)\amd64"
59+
& "$(msbuild)" PCbuild\tk.vcxproj "@msbuild.rsp" /p:Platform=x64 /p:tcltkDir="$(OutDir)\amd64"
60+
& "$(msbuild)" PCbuild\tix.vcxproj "@msbuild.rsp" /p:Platform=x64 /p:tcltkDir="$(OutDir)\amd64"
61+
displayName: 'Build for amd64'
62+
63+
- publish: '$(OutDir)'
64+
artifact: 'tcltk'
65+
displayName: 'Publishing tcltk'

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@ Lib/test/data/*
6262
/_bootstrap_python
6363
/Makefile
6464
/Makefile.pre
65+
Mac/Makefile
66+
Mac/PythonLauncher/Info.plist
67+
Mac/PythonLauncher/Makefile
68+
Mac/PythonLauncher/Python Launcher
69+
Mac/PythonLauncher/Python Launcher.app/*
70+
Mac/Resources/app/Info.plist
71+
Mac/Resources/framework/Info.plist
72+
Mac/pythonw
73+
/*.framework/
6574
Misc/python.pc
6675
Misc/python-embed.pc
6776
Misc/python-config.sh

Doc/extending/newtypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ analogous to the :ref:`rich comparison methods <richcmpfuncs>`, like
393393
:c:func:`PyObject_RichCompareBool`.
394394

395395
This function is called with two Python objects and the operator as arguments,
396-
where the operator is one of ``Py_EQ``, ``Py_NE``, ``Py_LE``, ``Py_GT``,
396+
where the operator is one of ``Py_EQ``, ``Py_NE``, ``Py_LE``, ``Py_GE``,
397397
``Py_LT`` or ``Py_GT``. It should compare the two objects with respect to the
398398
specified operator and return ``Py_True`` or ``Py_False`` if the comparison is
399399
successful, ``Py_NotImplemented`` to indicate that comparison is not

Doc/glossary.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -510,12 +510,13 @@ Glossary
510510
:func:`functools.singledispatch` decorator, and :pep:`443`.
511511

512512
generic type
513-
A :term:`type` that can be parameterized; typically a container like
514-
:class:`list`. Used for :term:`type hints <type hint>` and
513+
A :term:`type` that can be parameterized; typically a
514+
:ref:`container class<sequence-types>` such as :class:`list` or
515+
:class:`dict`. Used for :term:`type hints <type hint>` and
515516
:term:`annotations <annotation>`.
516517

517-
See :pep:`483` for more details, and :mod:`typing` or
518-
:ref:`generic alias type <types-genericalias>` for its uses.
518+
For more details, see :ref:`generic alias types<types-genericalias>`,
519+
:pep:`483`, :pep:`484`, :pep:`585`, and the :mod:`typing` module.
519520

520521
GIL
521522
See :term:`global interpreter lock`.

Doc/howto/enum.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ an incorrect member::
636636
Before :class:`StrEnum`, ``Directions.NORTH`` would have been the :class:`tuple`
637637
``('north',)``.
638638

639-
.. versionadded:: 3.10
639+
.. versionadded:: 3.11
640640

641641

642642
IntFlag
@@ -659,7 +659,7 @@ used.
659659
details.
660660

661661
.. versionadded:: 3.6
662-
.. versionchanged:: 3.10
662+
.. versionchanged:: 3.11
663663

664664
Sample :class:`IntFlag` class::
665665

@@ -696,7 +696,7 @@ It is also possible to name the combinations::
696696
Named combinations are considered aliases. Aliases do not show up during
697697
iteration, but can be returned from by-value lookups.
698698

699-
.. versionchanged:: 3.10
699+
.. versionchanged:: 3.11
700700

701701
Another important difference between :class:`IntFlag` and :class:`Enum` is that
702702
if no flags are set (the value is 0), its boolean evaluation is :data:`False`::
@@ -728,7 +728,7 @@ be combined with them (but may lose :class:`IntFlag` membership::
728728
>>> list(RW)
729729
[Perm.R, Perm.W]
730730

731-
.. versionadded:: 3.10
731+
.. versionadded:: 3.11
732732

733733

734734
Flag
@@ -789,7 +789,7 @@ value::
789789
>>> list(purple)
790790
[Color.RED, Color.BLUE]
791791

792-
.. versionadded:: 3.10
792+
.. versionadded:: 3.11
793793

794794
.. note::
795795

@@ -939,7 +939,7 @@ _Private__names
939939
:ref:`Private names <private-name-mangling>` are not converted to enum members,
940940
but remain normal attributes.
941941

942-
.. versionchanged:: 3.10
942+
.. versionchanged:: 3.11
943943

944944

945945
``Enum`` member type
@@ -962,7 +962,6 @@ it will raise a :exc:`DeprecationWarning`::
962962
<FieldTypes.size: 2>
963963

964964
.. versionchanged:: 3.5
965-
.. versionchanged:: 3.10
966965

967966

968967
Creating members that are mixed with other data types

0 commit comments

Comments
 (0)