Skip to content

Commit db19f0e

Browse files
authored
Merge branch 'main' into windows-use-py-debug
2 parents 951ac18 + f0dcb29 commit db19f0e

File tree

56 files changed

+654
-247
lines changed

Some content is hidden

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

56 files changed

+654
-247
lines changed

Doc/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,12 +631,12 @@
631631
'line_color': '#3776ab',
632632
}
633633
ogp_custom_meta_tags = [
634-
'<meta name="theme-color" content="#3776ab" />',
634+
'<meta name="theme-color" content="#3776ab">',
635635
]
636636
if 'create-social-cards' not in tags: # noqa: F821
637637
# Define a static preview image when not creating social cards
638638
ogp_image = '_static/og-image.png'
639639
ogp_custom_meta_tags += [
640-
'<meta property="og:image:width" content="200" />',
641-
'<meta property="og:image:height" content="200" />',
640+
'<meta property="og:image:width" content="200">',
641+
'<meta property="og:image:height" content="200">',
642642
]

Doc/includes/email-alternative.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
recette
3737
</a> sera sûrement un très bon repas.
3838
</p>
39-
<img src="cid:{asparagus_cid}" />
39+
<img src="cid:{asparagus_cid}">
4040
</body>
4141
</html>
4242
""".format(asparagus_cid=asparagus_cid[1:-1]), subtype='html')

Doc/library/cmath.rst

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,57 @@ the function is then applied to the result of the conversion.
3838
1.4142135623730951j
3939

4040

41+
==================================================== ============================================
42+
**Conversions to and from polar coordinates**
43+
--------------------------------------------------------------------------------------------------
44+
:func:`phase(z) <phase>` Return the phase of *z*
45+
:func:`polar(z) <polar>` Return the representation of *z* in polar coordinates
46+
:func:`rect(r, phi) <rect>` Return the complex number *z* with polar coordinates *r* and *phi*
47+
48+
**Power and logarithmic functions**
49+
--------------------------------------------------------------------------------------------------
50+
:func:`exp(z) <exp>` Return *e* raised to the power *z*
51+
:func:`log(z[, base]) <log>` Return the logarithm of *z* to the given *base* (*e* by default)
52+
:func:`log10(z) <log10>` Return the base-10 logarithm of *z*
53+
:func:`sqrt(z) <sqrt>` Return the square root of *z*
54+
55+
**Trigonometric functions**
56+
--------------------------------------------------------------------------------------------------
57+
:func:`acos(z) <acos>` Return the arc cosine of *z*
58+
:func:`asin(z) <asin>` Return the arc sine of *z*
59+
:func:`atan(z) <atan>` Return the arc tangent of *z*
60+
:func:`cos(z) <cos>` Return the cosine of *z*
61+
:func:`sin(z) <sin>` Return the sine of *z*
62+
:func:`tan(z) <tan>` Return the tangent of *z*
63+
64+
**Hyperbolic functions**
65+
--------------------------------------------------------------------------------------------------
66+
:func:`acosh(z) <acosh>` Return the inverse hyperbolic cosine of *z*
67+
:func:`asinh(z) <asinh>` Return the inverse hyperbolic sine of *z*
68+
:func:`atanh(z) <atanh>` Return the inverse hyperbolic tangent of *z*
69+
:func:`cosh(z) <cosh>` Return the hyperbolic cosine of *z*
70+
:func:`sinh(z) <sinh>` Return the hyperbolic sine of *z*
71+
:func:`tanh(z) <tanh>` Return the hyperbolic tangent of *z*
72+
73+
**Classification functions**
74+
--------------------------------------------------------------------------------------------------
75+
:func:`isfinite(z) <isfinite>` Check if all components of *z* are finite
76+
:func:`isinf(z) <isinf>` Check if any component of *z* is infinite
77+
:func:`isnan(z) <isnan>` Check if any component of *z* is a NaN
78+
:func:`isclose(a, b, *, rel_tol, abs_tol) <isclose>` Check if the values *a* and *b* are close to each other
79+
80+
**Constants**
81+
--------------------------------------------------------------------------------------------------
82+
:data:`pi` *π* = 3.141592...
83+
:data:`e` *e* = 2.718281...
84+
:data:`tau` *τ* = 2\ *π* = 6.283185...
85+
:data:`inf` Positive infinity
86+
:data:`infj` Pure imaginary infinity
87+
:data:`nan` "Not a number" (NaN)
88+
:data:`nanj` Pure imaginary NaN
89+
==================================================== ============================================
90+
91+
4192
Conversions to and from polar coordinates
4293
-----------------------------------------
4394

Doc/library/ctypes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2632,6 +2632,9 @@ These are the fundamental ctypes data types:
26322632
Represents the C :c:expr:`PyObject *` datatype. Calling this without an
26332633
argument creates a ``NULL`` :c:expr:`PyObject *` pointer.
26342634

2635+
.. versionchanged:: next
2636+
:class:`!py_object` is now a :term:`generic type`.
2637+
26352638
The :mod:`!ctypes.wintypes` module provides quite some other Windows specific
26362639
data types, for example :c:type:`!HWND`, :c:type:`!WPARAM`, or :c:type:`!DWORD`.
26372640
Some useful structures like :c:type:`!MSG` or :c:type:`!RECT` are also defined.

Doc/library/dataclasses.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Module contents
164164

165165
- *match_args*: If true (the default is ``True``), the
166166
:attr:`~object.__match_args__` tuple will be created from the list of
167-
parameters to the generated :meth:`~object.__init__` method (even if
167+
non keyword-only parameters to the generated :meth:`~object.__init__` method (even if
168168
:meth:`!__init__` is not generated, see above). If false, or if
169169
:attr:`!__match_args__` is already defined in the class, then
170170
:attr:`!__match_args__` will not be generated.
@@ -175,11 +175,12 @@ Module contents
175175
fields will be marked as keyword-only. If a field is marked as
176176
keyword-only, then the only effect is that the :meth:`~object.__init__`
177177
parameter generated from a keyword-only field must be specified
178-
with a keyword when :meth:`!__init__` is called. There is no
179-
effect on any other aspect of dataclasses. See the
180-
:term:`parameter` glossary entry for details. Also see the
178+
with a keyword when :meth:`!__init__` is called. See the :term:`parameter`
179+
glossary entry for details. Also see the
181180
:const:`KW_ONLY` section.
182181

182+
Keyword-only fields are not included in :attr:`!__match_args__`.
183+
183184
.. versionadded:: 3.10
184185

185186
- *slots*: If true (the default is ``False``), :attr:`~object.__slots__` attribute
@@ -299,6 +300,8 @@ Module contents
299300
This is used when the generated :meth:`~object.__init__` method's
300301
parameters are computed.
301302

303+
Keyword-only fields are also not included in :attr:`!__match_args__`.
304+
302305
.. versionadded:: 3.10
303306

304307
- ``doc``: optional docstring for this field.

Doc/library/string.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -737,10 +737,10 @@ Using the comma or the underscore as a digit group separator::
737737
'4996_02d2'
738738
>>> '{:_}'.format(123456789.123456789)
739739
'123_456_789.12345679'
740-
>>> '{:._}'.format(123456789.123456789)
741-
'123456789.123_456_79'
742-
>>> '{:_._}'.format(123456789.123456789)
743-
'123_456_789.123_456_79'
740+
>>> '{:.,}'.format(123456789.123456789)
741+
'123456789.123,456,79'
742+
>>> '{:,._}'.format(123456789.123456789)
743+
'123,456,789.123_456_79'
744744

745745
Expressing a percentage::
746746

Doc/library/uuid.rst

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,10 @@ which relays any information about the UUID's safety, using this enumeration:
121121
- The last 48 bits of the UUID. Only relevant to version 1.
122122

123123
* - .. attribute:: UUID.time
124-
- The 60-bit timestamp for version 1 and 6,
125-
or the 48-bit timestamp for version 7.
124+
- The 60-bit timestamp as a count of 100-nanosecond intervals since
125+
Gregorian epoch (1582-10-15 00:00:00) for versions 1 and 6, or the
126+
48-bit timestamp in milliseconds since Unix epoch (1970-01-01 00:00:00)
127+
for version 7.
126128

127129
* - .. attribute:: UUID.clock_seq
128130
- The 14-bit sequence number. Only relevant to versions 1 and 6.
@@ -434,6 +436,15 @@ Here are some examples of typical usage of the :mod:`uuid` module::
434436
>>> uuid.MAX
435437
UUID('ffffffff-ffff-ffff-ffff-ffffffffffff')
436438

439+
>>> # get UUIDv7 creation (local) time as a timestamp in milliseconds
440+
>>> u = uuid.uuid7()
441+
>>> u.time # doctest: +SKIP
442+
1743936859822
443+
>>> # get UUIDv7 creation (local) time as a datetime object
444+
>>> import datetime as dt
445+
>>> dt.datetime.fromtimestamp(u.time / 1000) # doctest: +SKIP
446+
datetime.datetime(...)
447+
437448

438449
.. _uuid-cli-example:
439450

Doc/library/zipfile.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,14 @@ The following data attributes are also available:
538538
it should be no longer than 65535 bytes. Comments longer than this will be
539539
truncated.
540540

541+
.. attribute:: ZipFile.data_offset
542+
543+
The offset to the start of ZIP data from the beginning of the file. When the
544+
:class:`ZipFile` is opened in either mode ``'w'`` or ``'x'`` and the
545+
underlying file does not support ``tell()``, the value will be ``None``
546+
instead.
547+
548+
.. versionadded:: 3.14
541549

542550
.. _path-objects:
543551

Doc/tools/templates/indexcontent.html

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,47 +10,47 @@ <h1>{{ docstitle|e }}</h1>
1010
<p><strong>{% trans %}Documentation sections:{% endtrans %}</strong></p>
1111
<table class="contentstable" align="center"><tr>
1212
<td width="50%">
13-
<p class="biglink"><a class="biglink" href="{{ pathto("whatsnew/" + version) }}">{% trans %}What's new in Python {{ version }}?{% endtrans %}</a><br/>
13+
<p class="biglink"><a class="biglink" href="{{ pathto("whatsnew/" + version) }}">{% trans %}What's new in Python {{ version }}?{% endtrans %}</a><br>
1414
<span class="linkdescr"> {% trans whatsnew_index=pathto("whatsnew/index") %}Or <a href="{{ whatsnew_index }}">all "What's new" documents since Python 2.0</a>{% endtrans %}</span></p>
15-
<p class="biglink"><a class="biglink" href="{{ pathto("tutorial/index") }}">{% trans %}Tutorial{% endtrans %}</a><br/>
15+
<p class="biglink"><a class="biglink" href="{{ pathto("tutorial/index") }}">{% trans %}Tutorial{% endtrans %}</a><br>
1616
<span class="linkdescr">{% trans %}Start here: a tour of Python's syntax and features{% endtrans %}</span></p>
17-
<p class="biglink"><a class="biglink" href="{{ pathto("library/index") }}">{% trans %}Library reference{% endtrans %}</a><br/>
17+
<p class="biglink"><a class="biglink" href="{{ pathto("library/index") }}">{% trans %}Library reference{% endtrans %}</a><br>
1818
<span class="linkdescr">{% trans %}Standard library and builtins{% endtrans %}</span></p>
19-
<p class="biglink"><a class="biglink" href="{{ pathto("reference/index") }}">{% trans %}Language reference{% endtrans %}</a><br/>
19+
<p class="biglink"><a class="biglink" href="{{ pathto("reference/index") }}">{% trans %}Language reference{% endtrans %}</a><br>
2020
<span class="linkdescr">{% trans %}Syntax and language elements{% endtrans %}</span></p>
21-
<p class="biglink"><a class="biglink" href="{{ pathto("using/index") }}">{% trans %}Python setup and usage{% endtrans %}</a><br/>
21+
<p class="biglink"><a class="biglink" href="{{ pathto("using/index") }}">{% trans %}Python setup and usage{% endtrans %}</a><br>
2222
<span class="linkdescr">{% trans %}How to install, configure, and use Python{% endtrans %}</span></p>
23-
<p class="biglink"><a class="biglink" href="{{ pathto("howto/index") }}">{% trans %}Python HOWTOs{% endtrans %}</a><br/>
23+
<p class="biglink"><a class="biglink" href="{{ pathto("howto/index") }}">{% trans %}Python HOWTOs{% endtrans %}</a><br>
2424
<span class="linkdescr">{% trans %}In-depth topic manuals{% endtrans %}</span></p>
2525
</td><td width="50%">
26-
<p class="biglink"><a class="biglink" href="{{ pathto("installing/index") }}">{% trans %}Installing Python modules{% endtrans %}</a><br/>
26+
<p class="biglink"><a class="biglink" href="{{ pathto("installing/index") }}">{% trans %}Installing Python modules{% endtrans %}</a><br>
2727
<span class="linkdescr">{% trans %}Third-party modules and PyPI.org{% endtrans %}</span></p>
28-
<p class="biglink"><a class="biglink" href="{{ pathto("distributing/index") }}">{% trans %}Distributing Python modules{% endtrans %}</a><br/>
28+
<p class="biglink"><a class="biglink" href="{{ pathto("distributing/index") }}">{% trans %}Distributing Python modules{% endtrans %}</a><br>
2929
<span class="linkdescr">{% trans %}Publishing modules for use by other people{% endtrans %}</span></p>
30-
<p class="biglink"><a class="biglink" href="{{ pathto("extending/index") }}">{% trans %}Extending and embedding{% endtrans %}</a><br/>
30+
<p class="biglink"><a class="biglink" href="{{ pathto("extending/index") }}">{% trans %}Extending and embedding{% endtrans %}</a><br>
3131
<span class="linkdescr">{% trans %}For C/C++ programmers{% endtrans %}</span></p>
32-
<p class="biglink"><a class="biglink" href="{{ pathto("c-api/index") }}">{% trans %}Python's C API{% endtrans %}</a><br/>
32+
<p class="biglink"><a class="biglink" href="{{ pathto("c-api/index") }}">{% trans %}Python's C API{% endtrans %}</a><br>
3333
<span class="linkdescr">{% trans %}C API reference{% endtrans %}</span></p>
34-
<p class="biglink"><a class="biglink" href="{{ pathto("faq/index") }}">{% trans %}FAQs{% endtrans %}</a><br/>
34+
<p class="biglink"><a class="biglink" href="{{ pathto("faq/index") }}">{% trans %}FAQs{% endtrans %}</a><br>
3535
<span class="linkdescr">{% trans %}Frequently asked questions (with answers!){% endtrans %}</span></p>
36-
<p class="biglink"><a class="biglink" href="{{ pathto("deprecations/index") }}">{% trans %}Deprecations{% endtrans %}</a><br/>
36+
<p class="biglink"><a class="biglink" href="{{ pathto("deprecations/index") }}">{% trans %}Deprecations{% endtrans %}</a><br>
3737
<span class="linkdescr">{% trans %}Deprecated functionality{% endtrans %}</span></p>
3838
</td></tr>
3939
</table>
4040

4141
<p><strong>{% trans %}Indices, glossary, and search:{% endtrans %}</strong></p>
4242
<table class="contentstable" align="center"><tr>
4343
<td width="50%">
44-
<p class="biglink"><a class="biglink" href="{{ pathto("py-modindex") }}">{% trans %}Global module index{% endtrans %}</a><br/>
44+
<p class="biglink"><a class="biglink" href="{{ pathto("py-modindex") }}">{% trans %}Global module index{% endtrans %}</a><br>
4545
<span class="linkdescr">{% trans %}All modules and libraries{% endtrans %}</span></p>
46-
<p class="biglink"><a class="biglink" href="{{ pathto("genindex") }}">{% trans %}General index{% endtrans %}</a><br/>
46+
<p class="biglink"><a class="biglink" href="{{ pathto("genindex") }}">{% trans %}General index{% endtrans %}</a><br>
4747
<span class="linkdescr">{% trans %}All functions, classes, and terms{% endtrans %}</span></p>
48-
<p class="biglink"><a class="biglink" href="{{ pathto("glossary") }}">{% trans %}Glossary{% endtrans %}</a><br/>
48+
<p class="biglink"><a class="biglink" href="{{ pathto("glossary") }}">{% trans %}Glossary{% endtrans %}</a><br>
4949
<span class="linkdescr">{% trans %}Terms explained{% endtrans %}</span></p>
5050
</td><td width="50%">
51-
<p class="biglink"><a class="biglink" href="{{ pathto("search") }}">{% trans %}Search page{% endtrans %}</a><br/>
51+
<p class="biglink"><a class="biglink" href="{{ pathto("search") }}">{% trans %}Search page{% endtrans %}</a><br>
5252
<span class="linkdescr">{% trans %}Search this documentation{% endtrans %}</span></p>
53-
<p class="biglink"><a class="biglink" href="{{ pathto("contents") }}">{% trans %}Complete table of contents{% endtrans %}</a><br/>
53+
<p class="biglink"><a class="biglink" href="{{ pathto("contents") }}">{% trans %}Complete table of contents{% endtrans %}</a><br>
5454
<span class="linkdescr">{% trans %}Lists all sections and subsections{% endtrans %}</span></p>
5555
</td></tr>
5656
</table>

Doc/tools/templates/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
{% if builder == "html" and enable_analytics %}
3030
<script defer data-domain="docs.python.org" src="https://plausible.io/js/script.js"></script>
3131
{% endif %}
32-
<link rel="canonical" href="https://docs.python.org/3/{{pagename}}.html" />
32+
<link rel="canonical" href="https://docs.python.org/3/{{pagename}}.html">
3333
{% if builder != "htmlhelp" %}
3434
{% if pagename == 'whatsnew/changelog' and not embedded %}
3535
<script type="text/javascript" src="{{ pathto('_static/changelog_search.js', 1) }}"></script>{% endif %}

0 commit comments

Comments
 (0)