Skip to content

Commit 1e15936

Browse files
Merge branch 'main' into bpo-38267-shutdown_default_executor-timeout
2 parents 4db9e1d + 2b428a1 commit 1e15936

File tree

154 files changed

+29731
-28360
lines changed

Some content is hidden

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

154 files changed

+29731
-28360
lines changed

Doc/about.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ These documents are generated from `reStructuredText`_ sources by `Sphinx`_, a
77
document processor specifically written for the Python documentation.
88

99
.. _reStructuredText: https://docutils.sourceforge.io/rst.html
10-
.. _Sphinx: http://sphinx-doc.org/
10+
.. _Sphinx: https://www.sphinx-doc.org/
1111

1212
.. In the online version of these documents, you can submit comments and suggest
1313
changes directly on the documentation pages.

Doc/c-api/code.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.. highlight:: c
22

3-
.. _codeobjects:
4-
53
.. index:: object; code, code object
64

5+
.. _codeobjects:
6+
77
Code Objects
88
------------
99

Doc/c-api/function.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ There are a few functions specific to Python functions.
8383
Raises :exc:`SystemError` and returns ``-1`` on failure.
8484
8585
86+
.. c:function:: void PyFunction_SetVectorcall(PyFunctionObject *func, vectorcallfunc vectorcall)
87+
88+
Set the vectorcall field of a given function object *func*.
89+
90+
Warning: extensions using this API must preserve the behavior
91+
of the unaltered (default) vectorcall function!
92+
93+
.. versionadded:: 3.12
94+
8695
.. c:function:: PyObject* PyFunction_GetClosure(PyObject *op)
8796
8897
Return the closure associated with the function object *op*. This can be ``NULL``

Doc/faq/design.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,10 @@ This also has the side-effect of increasing execution speed because name
703703
bindings are resolved at run-time in Python, and the second version only needs
704704
to perform the resolution once.
705705

706+
Similar proposals that would introduce syntax to further reduce code volume,
707+
such as using a 'leading dot', have been rejected in favour of explicitness (see
708+
https://mail.python.org/pipermail/python-ideas/2016-May/040070.html).
709+
706710

707711
Why don't generators support the with statement?
708712
------------------------------------------------

Doc/faq/general.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ at https://docs.python.org/3/. PDF, plain text, and downloadable HTML versions
182182
also available at https://docs.python.org/3/download.html.
183183

184184
The documentation is written in reStructuredText and processed by `the Sphinx
185-
documentation tool <http://sphinx-doc.org/>`__. The reStructuredText source for
185+
documentation tool <https://www.sphinx-doc.org/>`__. The reStructuredText source for
186186
the documentation is part of the Python source distribution.
187187

188188

@@ -264,7 +264,7 @@ Where in the world is www.python.org located?
264264
---------------------------------------------
265265

266266
The Python project's infrastructure is located all over the world and is managed
267-
by the Python Infrastructure Team. Details `here <http://infra.psf.io>`__.
267+
by the Python Infrastructure Team. Details `here <https://infra.psf.io>`__.
268268

269269

270270
Why is it called Python?

Doc/faq/library.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ How do I create documentation from doc strings?
181181
The :mod:`pydoc` module can create HTML from the doc strings in your Python
182182
source code. An alternative for creating API documentation purely from
183183
docstrings is `epydoc <http://epydoc.sourceforge.net/>`_. `Sphinx
184-
<http://sphinx-doc.org>`_ can also include docstring content.
184+
<https://www.sphinx-doc.org>`_ can also include docstring content.
185185
186186
187187
How do I get a single keypress at a time?

Doc/faq/programming.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ use a list comprehension::
12701270
A = [[None] * w for i in range(h)]
12711271

12721272
Or, you can use an extension that provides a matrix datatype; `NumPy
1273-
<http://www.numpy.org/>`_ is the best known.
1273+
<https://numpy.org/>`_ is the best known.
12741274

12751275

12761276
How do I apply a method to a sequence of objects?
@@ -1897,6 +1897,8 @@ The classes can be used like this:
18971897
'blog-why-python-rocks'
18981898

18991899

1900+
.. _faq-cache-method-calls:
1901+
19001902
How do I cache method calls?
19011903
----------------------------
19021904

Doc/faq/windows.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,3 +276,11 @@ How do I check for a keypress without blocking?
276276
Use the :mod:`msvcrt` module. This is a standard Windows-specific extension module.
277277
It defines a function ``kbhit()`` which checks whether a keyboard hit is
278278
present, and ``getch()`` which gets one character without echoing it.
279+
280+
How do I solve the missing api-ms-win-crt-runtime-l1-1-0.dll error?
281+
-------------------------------------------------------------------
282+
283+
This can occur on Python 3.5 and later when using Windows 8.1 or earlier without all updates having been installed.
284+
First ensure your operating system is supported and is up to date, and if that does not resolve the issue,
285+
visit the `Microsoft support page <https://support.microsoft.com/en-us/help/3118401/>`_
286+
for guidance on manually installing the C Runtime update.

Doc/howto/unicode.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ References
517517
518518
Some good alternative discussions of Python's Unicode support are:
519519

520-
* `Processing Text Files in Python 3 <http://python-notes.curiousefficiency.org/en/latest/python3/text_file_processing.html>`_, by Nick Coghlan.
520+
* `Processing Text Files in Python 3 <https://python-notes.curiousefficiency.org/en/latest/python3/text_file_processing.html>`_, by Nick Coghlan.
521521
* `Pragmatic Unicode <https://nedbatchelder.com/text/unipain.html>`_, a PyCon 2012 presentation by Ned Batchelder.
522522

523523
The :class:`str` type is described in the Python library reference at

Doc/includes/email-read-alternative.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,15 @@
88
from email import policy
99
from email.parser import BytesParser
1010

11-
# An imaginary module that would make this work and be safe.
12-
from imaginary import magic_html_parser
11+
12+
def magic_html_parser(html_text, partfiles):
13+
"""Return safety-sanitized html linked to partfiles.
14+
15+
Rewrite the href="cid:...." attributes to point to the filenames in partfiles.
16+
Though not trivial, this should be possible using html.parser.
17+
"""
18+
raise NotImplementedError("Add the magic needed")
19+
1320

1421
# In a real program you'd get the filename from the arguments.
1522
with open('outgoing.msg', 'rb') as fp:
@@ -62,9 +69,6 @@
6269
print("Don't know how to display {}".format(richest.get_content_type()))
6370
sys.exit()
6471
with tempfile.NamedTemporaryFile(mode='w', delete=False) as f:
65-
# The magic_html_parser has to rewrite the href="cid:...." attributes to
66-
# point to the filenames in partfiles. It also has to do a safety-sanitize
67-
# of the html. It could be written using html.parser.
6872
f.write(magic_html_parser(body.get_content(), partfiles))
6973
webbrowser.open(f.name)
7074
os.remove(f.name)

0 commit comments

Comments
 (0)