Skip to content

Commit 712a618

Browse files
committed
Merge remote-tracking branch 'upstream/master' into fix-issue-31904-netrc
2 parents f1a0617 + 778ad92 commit 712a618

File tree

550 files changed

+16089
-11287
lines changed

Some content is hidden

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

550 files changed

+16089
-11287
lines changed

.azure-pipelines/ci.yml

Lines changed: 5 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
variables:
2-
manylinux: false
32
coverage: false
43

5-
resources:
6-
containers:
7-
- container: manylinux1
8-
image: pyca/cryptography-manylinux1:x86_64
4+
trigger: ['master', '3.9', '3.8', '3.7']
95

106
jobs:
117
- job: Prebuild
128
displayName: Pre-build checks
139

1410
pool:
15-
vmImage: ubuntu-16.04
11+
vmImage: ubuntu-18.04
1612

1713
steps:
1814
- template: ./prebuild-checks.yml
@@ -24,7 +20,7 @@ jobs:
2420
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))
2521

2622
pool:
27-
vmImage: ubuntu-16.04
23+
vmImage: ubuntu-18.04
2824

2925
steps:
3026
- template: ./docs-steps.yml
@@ -56,7 +52,7 @@ jobs:
5652
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
5753

5854
pool:
59-
vmImage: ubuntu-16.04
55+
vmImage: ubuntu-18.04
6056

6157
variables:
6258
testRunTitle: '$(build.sourceBranchName)-linux'
@@ -69,37 +65,6 @@ jobs:
6965
dependencies: apt
7066

7167

72-
- job: ManyLinux1_CI_Tests
73-
displayName: ManyLinux1 CI Tests
74-
dependsOn: Prebuild
75-
condition: |
76-
and(
77-
and(
78-
succeeded(),
79-
eq(variables['manylinux'], 'true')
80-
),
81-
eq(dependencies.Prebuild.outputs['tests.run'], 'true')
82-
)
83-
84-
pool:
85-
vmImage: ubuntu-16.04
86-
87-
container: manylinux1
88-
89-
variables:
90-
testRunTitle: '$(build.sourceBranchName)-manylinux1'
91-
testRunPlatform: manylinux1
92-
openssl_version: ''
93-
94-
steps:
95-
- template: ./posix-steps.yml
96-
parameters:
97-
dependencies: yum
98-
sudo_dependencies: ''
99-
xvfb: false
100-
patchcheck: false
101-
102-
10368
- job: Ubuntu_Coverage_CI_Tests
10469
displayName: Ubuntu CI Tests (coverage)
10570
dependsOn: Prebuild
@@ -113,7 +78,7 @@ jobs:
11378
)
11479
11580
pool:
116-
vmImage: ubuntu-16.04
81+
vmImage: ubuntu-18.04
11782

11883
variables:
11984
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'

.azure-pipelines/pr.yml

Lines changed: 5 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
variables:
2-
manylinux: false
32
coverage: false
43

5-
resources:
6-
containers:
7-
- container: manylinux1
8-
image: pyca/cryptography-manylinux1:x86_64
4+
pr: ['master', '3.9', '3.8', '3.7']
95

106
jobs:
117
- job: Prebuild
128
displayName: Pre-build checks
139

1410
pool:
15-
vmImage: ubuntu-16.04
11+
vmImage: ubuntu-18.04
1612

1713
steps:
1814
- template: ./prebuild-checks.yml
@@ -24,7 +20,7 @@ jobs:
2420
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))
2521

2622
pool:
27-
vmImage: ubuntu-16.04
23+
vmImage: ubuntu-18.04
2824

2925
steps:
3026
- template: ./docs-steps.yml
@@ -56,7 +52,7 @@ jobs:
5652
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
5753

5854
pool:
59-
vmImage: ubuntu-16.04
55+
vmImage: ubuntu-18.04
6056

6157
variables:
6258
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
@@ -69,37 +65,6 @@ jobs:
6965
dependencies: apt
7066

7167

72-
- job: ManyLinux1_PR_Tests
73-
displayName: ManyLinux1 PR Tests
74-
dependsOn: Prebuild
75-
condition: |
76-
and(
77-
and(
78-
succeeded(),
79-
eq(variables['manylinux'], 'true')
80-
),
81-
eq(dependencies.Prebuild.outputs['tests.run'], 'true')
82-
)
83-
84-
pool:
85-
vmImage: ubuntu-16.04
86-
87-
container: manylinux1
88-
89-
variables:
90-
testRunTitle: '$(system.pullRequest.TargetBranch)-manylinux1'
91-
testRunPlatform: manylinux1
92-
openssl_version: ''
93-
94-
steps:
95-
- template: ./posix-steps.yml
96-
parameters:
97-
dependencies: yum
98-
sudo_dependencies: ''
99-
xvfb: false
100-
patchcheck: false
101-
102-
10368
- job: Ubuntu_Coverage_PR_Tests
10469
displayName: Ubuntu PR Tests (coverage)
10570
dependsOn: Prebuild
@@ -113,7 +78,7 @@ jobs:
11378
)
11479
11580
pool:
116-
vmImage: ubuntu-16.04
81+
vmImage: ubuntu-18.04
11782

11883
variables:
11984
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
steps:
22
- template: ./checkout.yml
33

4+
- powershell: |
5+
$d = (.\PCbuild\build.bat -V) | %{ if($_ -match '\s+(\w+):\s*(.+)\s*$') { @{$Matches[1] = $Matches[2];} }};
6+
Write-Host "##vso[task.setvariable variable=SigningDescription]Python $($d.PythonVersion)"
7+
displayName: 'Update signing description'
8+
condition: and(succeeded(), not(variables['SigningDescription']))
9+
410
- task: DownloadPipelineArtifact@1
511
displayName: 'Download artifact: doc'
612
inputs:

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,15 @@ jobs:
105105
clean: all
106106

107107
steps:
108-
- checkout: none
108+
- template: ./checkout.yml
109109
- template: ./find-sdk.yml
110110

111+
- powershell: |
112+
$d = (.\PCbuild\build.bat -V) | %{ if($_ -match '\s+(\w+):\s*(.+)\s*$') { @{$Matches[1] = $Matches[2];} }};
113+
Write-Host "##vso[task.setvariable variable=SigningDescription]Python $($d.PythonVersion)"
114+
displayName: 'Update signing description'
115+
condition: and(succeeded(), not(variables['SigningDescription']))
116+
111117
- task: DownloadBuildArtifacts@0
112118
displayName: 'Download Artifact: unsigned_msix'
113119
inputs:

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ jobs:
2626
- template: ./checkout.yml
2727
- template: ./find-sdk.yml
2828

29+
- powershell: |
30+
$d = (.\PCbuild\build.bat -V) | %{ if($_ -match '\s+(\w+):\s*(.+)\s*$') { @{$Matches[1] = $Matches[2];} }};
31+
Write-Host "##vso[task.setvariable variable=SigningDescription]Python $($d.PythonVersion)"
32+
displayName: 'Update signing description'
33+
condition: and(succeeded(), not(variables['SigningDescription']))
34+
2935
- powershell: |
3036
Write-Host "##vso[build.addbuildtag]signed"
3137
displayName: 'Add build tags'

.github/workflows/build.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,20 @@ jobs:
3232
echo '::set-output name=run_tests::true'
3333
else
3434
git fetch origin $GITHUB_BASE_REF --depth=1
35-
git diff --name-only origin/$GITHUB_BASE_REF... | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
35+
# git diff "origin/$GITHUB_BASE_REF..." (3 dots) may be more
36+
# reliable than git diff "origin/$GITHUB_BASE_REF.." (2 dots),
37+
# but it requires to download more commits (this job uses
38+
# "git fetch --depth=1").
39+
#
40+
# git diff "origin/$GITHUB_BASE_REF..." (3 dots) works with Git
41+
# 2.26, but Git 2.28 is stricter and fails with "no merge base".
42+
#
43+
# git diff "origin/$GITHUB_BASE_REF.." (2 dots) should be enough on
44+
# GitHub, since GitHub starts by merging origin/$GITHUB_BASE_REF
45+
# into the PR branch anyway.
46+
#
47+
# https://github.com/python/core-workflow/issues/373
48+
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
3649
fi
3750
build_win32:
3851
name: 'Windows (x86)'

.travis.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ matrix:
5151
env: TESTING=docs
5252
before_script:
5353
- cd Doc
54-
# Sphinx is pinned so that new versions that introduce new warnings won't suddenly cause build failures.
55-
# (Updating the version is fine as long as no warnings are raised by doing so.)
56-
# The theme used by the docs is stored separately, so we need to install that as well.
57-
- python -m pip install sphinx==2.2.0 blurb python-docs-theme
54+
- make venv PYTHON=python
5855
script:
5956
- make check suspicious html SPHINXOPTS="-q -W -j4"
6057
- name: "Documentation tests"

Doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ clean:
143143
venv:
144144
$(PYTHON) -m venv $(VENVDIR)
145145
$(VENVDIR)/bin/python3 -m pip install -U pip setuptools
146-
$(VENVDIR)/bin/python3 -m pip install -U Sphinx==2.3.1 blurb python-docs-theme
146+
$(VENVDIR)/bin/python3 -m pip install -r requirements.txt
147147
@echo "The venv has been created in the $(VENVDIR) directory"
148148

149149
dist:

Doc/c-api/arg.rst

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ which disallows mutable objects such as :class:`bytearray`.
129129
``S`` (:class:`bytes`) [PyBytesObject \*]
130130
Requires that the Python object is a :class:`bytes` object, without
131131
attempting any conversion. Raises :exc:`TypeError` if the object is not
132-
a bytes object. The C variable may also be declared as :c:type:`PyObject\*`.
132+
a bytes object. The C variable may also be declared as :c:type:`PyObject*`.
133133

134134
``Y`` (:class:`bytearray`) [PyByteArrayObject \*]
135135
Requires that the Python object is a :class:`bytearray` object, without
136136
attempting any conversion. Raises :exc:`TypeError` if the object is not
137-
a :class:`bytearray` object. The C variable may also be declared as :c:type:`PyObject\*`.
137+
a :class:`bytearray` object. The C variable may also be declared as :c:type:`PyObject*`.
138138

139139
``u`` (:class:`str`) [const Py_UNICODE \*]
140140
Convert a Python Unicode object to a C pointer to a NUL-terminated buffer of
@@ -181,7 +181,7 @@ which disallows mutable objects such as :class:`bytearray`.
181181
``U`` (:class:`str`) [PyObject \*]
182182
Requires that the Python object is a Unicode object, without attempting
183183
any conversion. Raises :exc:`TypeError` if the object is not a Unicode
184-
object. The C variable may also be declared as :c:type:`PyObject\*`.
184+
object. The C variable may also be declared as :c:type:`PyObject*`.
185185

186186
``w*`` (read-write :term:`bytes-like object`) [Py_buffer]
187187
This format accepts any object which implements the read-write buffer
@@ -194,10 +194,10 @@ which disallows mutable objects such as :class:`bytearray`.
194194
It only works for encoded data without embedded NUL bytes.
195195

196196
This format requires two arguments. The first is only used as input, and
197-
must be a :c:type:`const char\*` which points to the name of an encoding as a
197+
must be a :c:type:`const char*` which points to the name of an encoding as a
198198
NUL-terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is used.
199199
An exception is raised if the named encoding is not known to Python. The
200-
second argument must be a :c:type:`char\*\*`; the value of the pointer it
200+
second argument must be a :c:type:`char**`; the value of the pointer it
201201
references will be set to a buffer with the contents of the argument text.
202202
The text will be encoded in the encoding specified by the first argument.
203203

@@ -217,10 +217,10 @@ which disallows mutable objects such as :class:`bytearray`.
217217
characters.
218218

219219
It requires three arguments. The first is only used as input, and must be a
220-
:c:type:`const char\*` which points to the name of an encoding as a
220+
:c:type:`const char*` which points to the name of an encoding as a
221221
NUL-terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is used.
222222
An exception is raised if the named encoding is not known to Python. The
223-
second argument must be a :c:type:`char\*\*`; the value of the pointer it
223+
second argument must be a :c:type:`char**`; the value of the pointer it
224224
references will be set to a buffer with the contents of the argument text.
225225
The text will be encoded in the encoding specified by the first argument.
226226
The third argument must be a pointer to an integer; the referenced integer
@@ -320,7 +320,7 @@ Other objects
320320
``O!`` (object) [*typeobject*, PyObject \*]
321321
Store a Python object in a C object pointer. This is similar to ``O``, but
322322
takes two C arguments: the first is the address of a Python type object, the
323-
second is the address of the C variable (of type :c:type:`PyObject\*`) into which
323+
second is the address of the C variable (of type :c:type:`PyObject*`) into which
324324
the object pointer is stored. If the Python object does not have the required
325325
type, :exc:`TypeError` is raised.
326326

@@ -329,13 +329,13 @@ Other objects
329329
``O&`` (object) [*converter*, *anything*]
330330
Convert a Python object to a C variable through a *converter* function. This
331331
takes two arguments: the first is a function, the second is the address of a C
332-
variable (of arbitrary type), converted to :c:type:`void \*`. The *converter*
332+
variable (of arbitrary type), converted to :c:type:`void *`. The *converter*
333333
function in turn is called as follows::
334334

335335
status = converter(object, address);
336336

337337
where *object* is the Python object to be converted and *address* is the
338-
:c:type:`void\*` argument that was passed to the :c:func:`PyArg_Parse\*` function.
338+
:c:type:`void*` argument that was passed to the :c:func:`PyArg_Parse\*` function.
339339
The returned *status* should be ``1`` for a successful conversion and ``0`` if
340340
the conversion has failed. When the conversion fails, the *converter* function
341341
should raise an exception and leave the content of *address* unmodified.
@@ -481,7 +481,7 @@ API Functions
481481
*args*; it must actually be a tuple. The length of the tuple must be at least
482482
*min* and no more than *max*; *min* and *max* may be equal. Additional
483483
arguments must be passed to the function, each of which should be a pointer to a
484-
:c:type:`PyObject\*` variable; these will be filled in with the values from
484+
:c:type:`PyObject*` variable; these will be filled in with the values from
485485
*args*; they will contain borrowed references. The variables which correspond
486486
to optional parameters not given by *args* will not be filled in; these should
487487
be initialized by the caller. This function returns true on success and false if
@@ -650,8 +650,8 @@ Building values
650650
651651
``O&`` (object) [*converter*, *anything*]
652652
Convert *anything* to a Python object through a *converter* function. The
653-
function is called with *anything* (which should be compatible with :c:type:`void
654-
\*`) as its argument and should return a "new" Python object, or ``NULL`` if an
653+
function is called with *anything* (which should be compatible with :c:type:`void*`)
654+
as its argument and should return a "new" Python object, or ``NULL`` if an
655655
error occurred.
656656
657657
``(items)`` (:class:`tuple`) [*matching-items*]

0 commit comments

Comments
 (0)