Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitddc44b8

Browse files
Merge branch 'main' into fix-blocksize-in-sendfile
2 parents88367ab +d4dfad2 commitddc44b8

File tree

340 files changed

+5470
-9056
lines changed

Some content is hidden

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

340 files changed

+5470
-9056
lines changed

‎.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/complex.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,29 @@ Complex Numbers as Python Objects
117117
118118
Return the real part of *op* as a C:c:expr:`double`.
119119
120+
If *op* is not a Python complex number object but has a
121+
:meth:`~object.__complex__` method, this method will first be called to
122+
convert *op* to a Python complex number object. If:meth:`!__complex__` is
123+
not defined then it falls back to call:c:func:`PyFloat_AsDouble` and
124+
returns its result. Upon failure, this method returns ``-1.0``, so one
125+
should call:c:func:`PyErr_Occurred` to check for errors.
126+
127+
..versionchanged::3.13
128+
Use:meth:`~object.__complex__` if available.
120129
121130
..c:function::doublePyComplex_ImagAsDouble(PyObject *op)
122131
123132
Return the imaginary part of *op* as a C:c:expr:`double`.
124133
134+
If *op* is not a Python complex number object but has a
135+
:meth:`~object.__complex__` method, this method will first be called to
136+
convert *op* to a Python complex number object. If:meth:`!__complex__` is
137+
not defined then it falls back to call:c:func:`PyFloat_AsDouble` and
138+
returns ``0.0`` on success. Upon failure, this method returns ``-1.0``, so
139+
one should call:c:func:`PyErr_Occurred` to check for errors.
140+
141+
..versionchanged::3.13
142+
Use:meth:`~object.__complex__` if available.
125143
126144
..c:function:: Py_complexPyComplex_AsCComplex(PyObject *op)
127145

‎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::intPyObject_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 isO(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 at0x1012e1f98>
1253+
<__main__.D object at0x00B18C90>
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/howto/urllib2.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -392,16 +392,16 @@ info and geturl
392392
===============
393393

394394
The response returned by urlopen (or the:exc:`~urllib.error.HTTPError` instance) has two
395-
useful methods:meth:`info` and:meth:`geturl` and is defined in the module
396-
:mod:`urllib.response`..
395+
useful methods:meth:`!info` and:meth:`!geturl` and is defined in the module
396+
:mod:`urllib.response`.
397397

398-
**geturl** - this returns the real URL of the page fetched. This is useful
399-
because ``urlopen`` (or the opener object used) may have followed a
400-
redirect. The URL of the page fetched may not be the same as the URL requested.
398+
* **geturl** - this returns the real URL of the page fetched. This is useful
399+
because ``urlopen`` (or the opener object used) may have followed a
400+
redirect. The URL of the page fetched may not be the same as the URL requested.
401401

402-
**info** - this returns a dictionary-like object that describes the page
403-
fetched, particularly the headers sent by the server. It is currently an
404-
:class:`http.client.HTTPMessage` instance.
402+
* **info** - this returns a dictionary-like object that describes the page
403+
fetched, particularly the headers sent by the server. It is currently an
404+
:class:`http.client.HTTPMessage` instance.
405405

406406
Typical headers include 'Content-length', 'Content-type', and so on. See the
407407
`Quick Reference to HTTP Headers<https://jkorpela.fi/http.html>`_
@@ -507,7 +507,7 @@ than the URL you pass to .add_password() will also match. ::
507507

508508
In the above example we only supplied our ``HTTPBasicAuthHandler`` to
509509
``build_opener``. By default openers have the handlers for normal situations
510-
-- ``ProxyHandler`` (if a proxy setting such as an:envvar:`http_proxy`
510+
-- ``ProxyHandler`` (if a proxy setting such as an:envvar:`!http_proxy`
511511
environment variable is set), ``UnknownHandler``, ``HTTPHandler``,
512512
``HTTPDefaultErrorHandler``, ``HTTPRedirectHandler``, ``FTPHandler``,
513513
``FileHandler``, ``DataHandler``, ``HTTPErrorProcessor``.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp