Skip to content

Commit f7ff834

Browse files
committed
Merge branch 'httpupgrade' of github.com:jcomeauictx/cpython into httpupgrade
2 parents 48cdd20 + 4a6370b commit f7ff834

354 files changed

Lines changed: 9220 additions & 12736 deletions

File tree

Some content is hidden

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

.cirrus-DISABLED.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ jobs:
142142
run: echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
143143
- name: Configure ccache action
144144
uses: hendrikmuhs/ccache-action@v1.2
145+
with:
146+
save: false
145147
- name: Check Autoconf and aclocal versions
146148
run: |
147149
grep "Generated by GNU Autoconf 2.71" configure
@@ -284,6 +286,8 @@ jobs:
284286
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
285287
- name: Configure ccache action
286288
uses: hendrikmuhs/ccache-action@v1.2
289+
with:
290+
save: false
287291
- name: Configure CPython
288292
run: ./configure --config-cache --with-pydebug --with-openssl=$OPENSSL_DIR
289293
- name: Build CPython
@@ -327,6 +331,8 @@ jobs:
327331
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
328332
- name: Configure ccache action
329333
uses: hendrikmuhs/ccache-action@v1.2
334+
with:
335+
save: false
330336
- name: Setup directory envs for out-of-tree builds
331337
run: |
332338
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
@@ -446,6 +452,8 @@ jobs:
446452
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
447453
- name: Configure ccache action
448454
uses: hendrikmuhs/ccache-action@v1.2
455+
with:
456+
save: ${{ github.event_name == 'push' }}
449457
- name: Configure CPython
450458
run: ./configure --config-cache --with-address-sanitizer --without-pymalloc
451459
- name: Build CPython

.github/workflows/reusable-ubuntu.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ jobs:
4141
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
4242
- name: Configure ccache action
4343
uses: hendrikmuhs/ccache-action@v1.2
44+
with:
45+
save: ${{ github.event_name == 'push' }}
46+
max-size: "200M"
4447
- name: Setup directory envs for out-of-tree builds
4548
run: |
4649
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ repos:
2828
hooks:
2929
- id: sphinx-lint
3030
args: [--enable=default-role]
31-
files: ^Doc/|^Misc/NEWS.d/next/
31+
files: ^Doc/|^Misc/NEWS.d/
3232

3333
- repo: meta
3434
hooks:

Doc/c-api/object.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ Object Protocol
4747
4848
.. c:function:: int PyObject_HasAttr(PyObject *o, PyObject *attr_name)
4949
50-
Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise. This
51-
is equivalent to the Python expression ``hasattr(o, attr_name)``. This function
52-
always succeeds.
50+
Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise.
51+
This function always succeeds.
5352
5453
.. note::
5554

Doc/faq/design.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ on the key and a per-process seed; for example, ``'Python'`` could hash to
451451
to ``1142331976``. The hash code is then used to calculate a location in an
452452
internal array where the value will be stored. Assuming that you're storing
453453
keys that all have different hash values, this means that dictionaries take
454-
constant time -- O(1), in Big-O notation -- to retrieve a key.
454+
constant time -- *O*\ (1), in Big-O notation -- to retrieve a key.
455455

456456

457457
Why must dictionary keys be immutable?

Doc/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ Glossary
742742
list
743743
A built-in Python :term:`sequence`. Despite its name it is more akin
744744
to an array in other languages than to a linked list since access to
745-
elements is O(1).
745+
elements is *O*\ (1).
746746

747747
list comprehension
748748
A compact way to process all or part of the elements in a sequence and

Doc/howto/descriptor.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ instance::
12501250
<function D.f at 0x00C45070>
12511251

12521252
>>> d.f.__self__
1253-
<__main__.D object at 0x1012e1f98>
1253+
<__main__.D object at 0x00B18C90>
12541254

12551255
If you have ever wondered where *self* comes from in regular methods or where
12561256
*cls* comes from in class methods, this is it!

Doc/library/asyncio-policy.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ implementation used by the asyncio event loop:
237237

238238
It works reliably even when the asyncio event loop is run in a non-main OS thread.
239239

240-
There is no noticeable overhead when handling a big number of children (*O(1)* each
240+
There is no noticeable overhead when handling a big number of children (*O*\ (1) each
241241
time a child terminates), but starting a thread per process requires extra memory.
242242

243243
This watcher is used by default.
@@ -257,7 +257,7 @@ implementation used by the asyncio event loop:
257257
watcher is installed.
258258

259259
The solution is safe but it has a significant overhead when
260-
handling a big number of processes (*O(n)* each time a
260+
handling a big number of processes (*O*\ (*n*) each time a
261261
:py:data:`SIGCHLD` is received).
262262

263263
.. versionadded:: 3.8
@@ -273,7 +273,7 @@ implementation used by the asyncio event loop:
273273
The watcher avoids disrupting other code spawning processes
274274
by polling every process explicitly on a :py:data:`SIGCHLD` signal.
275275

276-
This solution is as safe as :class:`MultiLoopChildWatcher` and has the same *O(N)*
276+
This solution is as safe as :class:`MultiLoopChildWatcher` and has the same *O*\ (*n*)
277277
complexity but requires a running event loop in the main thread to work.
278278

279279
.. deprecated:: 3.12
@@ -285,7 +285,7 @@ implementation used by the asyncio event loop:
285285
processes and waiting for their termination.
286286

287287
There is no noticeable overhead when handling a big number of
288-
children (*O(1)* each time a child terminates).
288+
children (*O*\ (1) each time a child terminates).
289289

290290
This solution requires a running event loop in the main thread to work, as
291291
:class:`SafeChildWatcher`.

Doc/library/bisect.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ The following functions are provided:
7979
To support inserting records in a table, the *key* function (if any) is
8080
applied to *x* for the search step but not for the insertion step.
8181

82-
Keep in mind that the ``O(log n)`` search is dominated by the slow O(n)
82+
Keep in mind that the *O*\ (log *n*) search is dominated by the slow *O*\ (*n*)
8383
insertion step.
8484

8585
.. versionchanged:: 3.10
@@ -99,7 +99,7 @@ The following functions are provided:
9999
To support inserting records in a table, the *key* function (if any) is
100100
applied to *x* for the search step but not for the insertion step.
101101

102-
Keep in mind that the ``O(log n)`` search is dominated by the slow O(n)
102+
Keep in mind that the *O*\ (log *n*) search is dominated by the slow *O*\ (*n*)
103103
insertion step.
104104

105105
.. versionchanged:: 3.10
@@ -115,7 +115,7 @@ thoughts in mind:
115115
* Bisection is effective for searching ranges of values.
116116
For locating specific values, dictionaries are more performant.
117117

118-
* The *insort()* functions are ``O(n)`` because the logarithmic search step
118+
* The *insort()* functions are *O*\ (*n*) because the logarithmic search step
119119
is dominated by the linear time insertion step.
120120

121121
* The search functions are stateless and discard key function results after

0 commit comments

Comments
 (0)