Skip to content

Commit 9f75617

Browse files
Merge branch 'master' into fix-issue15045
* master: (1787 commits) Update opcode.h header comment to mention the source data file (pythonGH-9935) bpo-34936: Fix TclError in tkinter.Spinbox.selection_element(). (pythonGH-9760) Updated documentation on logging.debug(). (pythonGH-9946) bpo-34765: Update the install-sh file (pythonGH-9592) bpo-35008: Fix possible leaks in Element.__setstate__(). (pythonGH-9924) bpo-35011: Restore use of pyexpatns.h in libexpat (pythonGH-9939) bpo-24658: Fix read/write greater than 2 GiB on macOS (pythonGH-1705) Add missing comma to wsgiref doc (pythonGH-9932) bpo-23420: Verify the value of '-s' when execute the CLI of cProfile (pythonGH-9925) Doc: Fix is_prime (pythonGH-9909) In email docs, correct spelling of foregoing (python#9856) In email.parser in message_from_bytes, update `strict` to `policy` (python#9854) bpo-34997: Fix test_logging.ConfigDictTest.test_out_of_order (pythonGH-9913) Added CLI starter example to logging cookbook. (pythonGH-9910) bpo-34783: Fix test_nonexisting_script() (pythonGH-9896) bpo-23554: Change echo server example class name from EchoServerClientProtocol to EchoServerProtocol (pythonGH-9859) bpo-34989: python-gdb.py: fix current_line_num() (pythonGH-9889) Stop using deprecated logging API in Sphinx suspicious checker (pythonGH-9875) fix dangling keyfunc examples in documentation of heapq and sorted (python#1432) bpo-34844: logging.Formatter enhancement - Ensure style and format string matches in logging.Formatter (pythonGH-9703) ...
2 parents ed89708 + e3d1455 commit 9f75617

File tree

2,124 files changed

+154172
-73724
lines changed

Some content is hidden

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

2,124 files changed

+154172
-73724
lines changed

.azure-pipelines/ci.yml

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
variables:
2+
manylinux: false
3+
coverage: false
4+
5+
jobs:
6+
- job: Prebuild
7+
displayName: Pre-build checks
8+
9+
pool:
10+
vmImage: ubuntu-16.04
11+
12+
steps:
13+
- template: ./prebuild-checks.yml
14+
15+
16+
- job: Docs_PR
17+
displayName: Docs PR
18+
dependsOn: Prebuild
19+
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))
20+
21+
pool:
22+
vmImage: ubuntu-16.04
23+
24+
steps:
25+
- template: ./docs-steps.yml
26+
parameters:
27+
upload: true
28+
29+
30+
- job: macOS_CI_Tests
31+
displayName: macOS CI Tests
32+
dependsOn: Prebuild
33+
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
34+
35+
variables:
36+
testRunTitle: '$(build.sourceBranchName)-macos'
37+
testRunPlatform: macos
38+
39+
pool:
40+
vmImage: xcode9-macos10.13
41+
42+
steps:
43+
- template: ./macos-steps.yml
44+
45+
46+
- job: Ubuntu_CI_Tests
47+
displayName: Ubuntu CI Tests
48+
dependsOn: Prebuild
49+
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
50+
51+
pool:
52+
vmImage: ubuntu-16.04
53+
54+
variables:
55+
testRunTitle: '$(build.sourceBranchName)-linux'
56+
testRunPlatform: linux
57+
openssl_version: 1.1.0g
58+
59+
steps:
60+
- template: ./posix-steps.yml
61+
62+
63+
- job: ManyLinux1_CI_Tests
64+
displayName: ManyLinux1 CI Tests
65+
dependsOn: Prebuild
66+
condition: |
67+
and(
68+
and(
69+
succeeded(),
70+
eq(variables['manylinux'], 'true')
71+
),
72+
eq(dependencies.Prebuild.outputs['tests.run'], 'true')
73+
)
74+
75+
pool:
76+
vmImage: ubuntu-16.04
77+
78+
variables:
79+
testRunTitle: '$(build.sourceBranchName)-manylinux1'
80+
testRunPlatform: manylinux1
81+
imageName: 'dockcross/manylinux-x64'
82+
83+
steps:
84+
- template: ./docker-steps.yml
85+
86+
87+
- job: Ubuntu_Coverage_CI_Tests
88+
displayName: Ubuntu CI Tests (coverage)
89+
dependsOn: Prebuild
90+
condition: |
91+
and(
92+
and(
93+
succeeded(),
94+
eq(variables['coverage'], 'true')
95+
),
96+
eq(dependencies.Prebuild.outputs['tests.run'], 'true')
97+
)
98+
99+
pool:
100+
vmImage: ubuntu-16.04
101+
102+
variables:
103+
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
104+
testRunPlatform: linux-coverage
105+
openssl_version: 1.1.0g
106+
107+
steps:
108+
- template: ./posix-steps.yml
109+
parameters:
110+
coverage: true
111+
112+
113+
- job: Windows_CI_Tests
114+
displayName: Windows CI Tests
115+
dependsOn: Prebuild
116+
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
117+
118+
pool:
119+
vmImage: vs2017-win2016
120+
121+
strategy:
122+
matrix:
123+
win32:
124+
arch: win32
125+
buildOpt:
126+
testRunTitle: '$(Build.SourceBranchName)-win32'
127+
testRunPlatform: win32
128+
win64:
129+
arch: amd64
130+
buildOpt: '-p x64'
131+
testRunTitle: '$(Build.SourceBranchName)-win64'
132+
testRunPlatform: win64
133+
maxParallel: 2
134+
135+
steps:
136+
- template: ./windows-steps.yml

.azure-pipelines/docker-steps.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
steps:
2+
- checkout: self
3+
clean: true
4+
fetchDepth: 5
5+
6+
- ${{ if ne(parameters.targetBranch, '') }}:
7+
- script: |
8+
git fetch -q origin ${{ parameters.targetbranch }}
9+
if ! git diff --name-only HEAD $(git merge-base HEAD FETCH_HEAD) | grep -qvE '(\.rst$|^Doc|^Misc)'
10+
then
11+
echo "Only docs were updated, stopping build process."
12+
echo "##vso[task.setvariable variable=DocOnly]true"
13+
exit
14+
fi
15+
displayName: Detect doc-only changes
16+
17+
- task: docker@0
18+
displayName: 'Configure CPython (debug)'
19+
inputs:
20+
action: 'Run an image'
21+
imageName: $(imageName)
22+
volumes: |
23+
$(build.sourcesDirectory):/src
24+
$(build.binariesDirectory):/build
25+
workDir: '/src'
26+
containerCommand: './configure --with-pydebug'
27+
detached: false
28+
condition: and(succeeded(), ne(variables['DocOnly'], 'true'))
29+
30+
- task: docker@0
31+
displayName: 'Build CPython'
32+
inputs:
33+
action: 'Run an image'
34+
imageName: $(imageName)
35+
volumes: |
36+
$(build.sourcesDirectory):/src
37+
$(build.binariesDirectory):/build
38+
workDir: '/src'
39+
containerCommand: 'make -s -j4'
40+
detached: false
41+
condition: and(succeeded(), ne(variables['DocOnly'], 'true'))
42+
43+
- task: docker@0
44+
displayName: 'Display build info'
45+
inputs:
46+
action: 'Run an image'
47+
imageName: $(imageName)
48+
volumes: |
49+
$(build.sourcesDirectory):/src
50+
$(build.binariesDirectory):/build
51+
workDir: '/src'
52+
containerCommand: 'make pythoninfo'
53+
detached: false
54+
condition: and(succeeded(), ne(variables['DocOnly'], 'true'))
55+
56+
- task: docker@0
57+
displayName: 'Tests'
58+
inputs:
59+
action: 'Run an image'
60+
imageName: $(imageName)
61+
volumes: |
62+
$(build.sourcesDirectory):/src
63+
$(build.binariesDirectory):/build
64+
workDir: '/src'
65+
containerCommand: 'make buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=/build/test-results.xml"'
66+
detached: false
67+
condition: and(succeeded(), ne(variables['DocOnly'], 'true'))
68+
69+
- task: PublishTestResults@2
70+
displayName: 'Publish Test Results'
71+
inputs:
72+
testResultsFiles: '$(build.binariesDirectory)/test-results.xml'
73+
mergeTestResults: true
74+
testRunTitle: $(testRunTitle)
75+
platform: $(testRunPlatform)
76+
condition: and(succeededOrFailed(), ne(variables['DocOnly'], 'true'))

.azure-pipelines/docs-steps.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
parameters:
2+
latex: false
3+
upload: false
4+
5+
steps:
6+
- checkout: self
7+
clean: true
8+
fetchDepth: 5
9+
10+
- task: UsePythonVersion@0
11+
displayName: 'Use Python 3.6 or later'
12+
inputs:
13+
versionSpec: '>=3.6'
14+
15+
- script: python -m pip install sphinx~=1.6.1 blurb python-docs-theme
16+
displayName: 'Install build dependencies'
17+
18+
- ${{ if ne(parameters.latex, 'true') }}:
19+
- script: make check suspicious html PYTHON=python
20+
workingDirectory: '$(build.sourcesDirectory)/Doc'
21+
displayName: 'Build documentation'
22+
23+
- ${{ if eq(parameters.latex, 'true') }}:
24+
- script: sudo apt-get update && sudo apt-get install -qy --force-yes texlive-full
25+
displayName: 'Install LaTeX'
26+
27+
- script: make dist PYTHON=python SPHINXBUILD='python -m sphinx' BLURB='python -m blurb'
28+
workingDirectory: '$(build.sourcesDirectory)/Doc'
29+
displayName: 'Build documentation'
30+
31+
- ${{ if eq(parameters.upload, 'true') }}:
32+
- task: PublishBuildArtifacts@1
33+
displayName: 'Publish docs'
34+
35+
inputs:
36+
PathToPublish: '$(build.sourcesDirectory)/Doc/build'
37+
ArtifactName: docs
38+
publishLocation: Container
39+
40+
- ${{ if eq(parameters.latex, 'true') }}:
41+
- task: PublishBuildArtifacts@1
42+
displayName: 'Publish dist'
43+
inputs:
44+
PathToPublish: '$(build.sourcesDirectory)/Doc/dist'
45+
ArtifactName: docs_dist
46+
publishLocation: Container

.azure-pipelines/macos-steps.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
steps:
2+
- checkout: self
3+
clean: true
4+
fetchDepth: 5
5+
6+
- script: ./configure --with-pydebug --with-openssl=/usr/local/opt/openssl --prefix=/opt/python-azdev
7+
displayName: 'Configure CPython (debug)'
8+
9+
- script: make -s -j4
10+
displayName: 'Build CPython'
11+
12+
- script: make pythoninfo
13+
displayName: 'Display build info'
14+
15+
- script: make buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
16+
displayName: 'Tests'
17+
18+
- task: PublishTestResults@2
19+
displayName: 'Publish Test Results'
20+
inputs:
21+
testResultsFiles: '$(build.binariesDirectory)/test-results.xml'
22+
mergeTestResults: true
23+
testRunTitle: $(testRunTitle)
24+
platform: $(testRunPlatform)
25+
condition: succeededOrFailed()

.azure-pipelines/posix-deps.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
sudo apt-get update
2+
3+
sudo apt-get -yq install \
4+
build-essential \
5+
zlib1g-dev \
6+
libbz2-dev \
7+
liblzma-dev \
8+
libncurses5-dev \
9+
libreadline6-dev \
10+
libsqlite3-dev \
11+
libssl-dev \
12+
libgdbm-dev \
13+
tk-dev \
14+
lzma \
15+
lzma-dev \
16+
liblzma-dev \
17+
libffi-dev \
18+
uuid-dev \
19+
xvfb
20+
21+
if [ ! -z "$1" ]
22+
then
23+
echo ##vso[task.prependpath]$PWD/multissl/openssl/$1
24+
echo ##vso[task.setvariable variable=OPENSSL_DIR]$PWD/multissl/openssl/$1
25+
python3 Tools/ssl/multissltests.py --steps=library --base-directory $PWD/multissl --openssl $1 --system Linux
26+
fi

.azure-pipelines/posix-steps.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
parameters:
2+
coverage: false
3+
4+
steps:
5+
- checkout: self
6+
clean: true
7+
fetchDepth: 5
8+
9+
- script: ./.azure-pipelines/posix-deps.sh $(openssl_version)
10+
displayName: 'Install dependencies'
11+
12+
- script: ./configure --with-pydebug
13+
displayName: 'Configure CPython (debug)'
14+
15+
- script: make -s -j4
16+
displayName: 'Build CPython'
17+
18+
- ${{ if eq(parameters.coverage, 'true') }}:
19+
- script: ./python -m venv venv && ./venv/bin/python -m pip install -U coverage
20+
displayName: 'Set up virtual environment'
21+
22+
- script: ./venv/bin/python -m test.pythoninfo
23+
displayName: 'Display build info'
24+
25+
- script: |
26+
xvfb-run ./venv/bin/python -m coverage run --pylib -m test \
27+
--fail-env-changed \
28+
-uall,-cpu \
29+
--junit-xml=$(build.binariesDirectory)/test-results.xml" \
30+
-x test_multiprocessing_fork \
31+
-x test_multiprocessing_forkserver \
32+
-x test_multiprocessing_spawn \
33+
-x test_concurrent_futures
34+
displayName: 'Tests with coverage'
35+
36+
- script: ./venv/bin/python -m coverage xml
37+
displayName: 'Generate coverage.xml'
38+
39+
- script: source ./venv/bin/activate && bash <(curl -s https://codecov.io/bash)
40+
displayName: 'Publish code coverage results'
41+
42+
43+
- ${{ if ne(parameters.coverage, 'true') }}:
44+
- script: make pythoninfo
45+
displayName: 'Display build info'
46+
47+
- script: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
48+
displayName: 'Tests'
49+
50+
51+
- script: ./python Tools/scripts/patchcheck.py --travis true
52+
displayName: 'Run patchcheck.py'
53+
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
54+
55+
56+
- task: PublishTestResults@2
57+
displayName: 'Publish Test Results'
58+
inputs:
59+
testResultsFiles: '$(build.binariesDirectory)/test-results.xml'
60+
mergeTestResults: true
61+
testRunTitle: $(testRunTitle)
62+
platform: $(testRunPlatform)
63+
condition: succeededOrFailed()

0 commit comments

Comments
 (0)