Skip to content

Commit

Permalink
Deploying to gh-pages from @ 10794fd 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwang44 committed Nov 16, 2024
1 parent 317e735 commit 7ac9d72
Show file tree
Hide file tree
Showing 529 changed files with 4,583 additions and 4,529 deletions.
2 changes: 1 addition & 1 deletion _sources/library/pprint.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ let's fetch information about a project from `PyPI <https://pypi.org>`_::
>>> import json
>>> import pprint
>>> from urllib.request import urlopen
>>> with urlopen('https://pypi.org/pypi/sampleproject/json') as resp:
>>> with urlopen('https://pypi.org/pypi/sampleproject/1.2.0/json') as resp:
... project_info = json.load(resp)['info']

In its basic form, :func:`~pprint.pp` shows the whole object::
Expand Down
35 changes: 32 additions & 3 deletions _sources/library/socket.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,9 @@ The :mod:`socket` module also offers various network-related services:

.. versionadded:: 3.7

.. function:: getaddrinfo(host, port, family=0, type=0, proto=0, flags=0)
.. function:: getaddrinfo(host, port, family=AF_UNSPEC, type=0, proto=0, flags=0)

This function wraps the C function ``getaddrinfo`` of the underlying system.

Translate the *host*/*port* argument into a sequence of 5-tuples that contain
all the necessary arguments for creating a socket connected to that service.
Expand All @@ -930,8 +932,10 @@ The :mod:`socket` module also offers various network-related services:
and *port*, you can pass ``NULL`` to the underlying C API.

The *family*, *type* and *proto* arguments can be optionally specified
in order to narrow the list of addresses returned. Passing zero as a
value for each of these arguments selects the full range of results.
in order to provide options and limit the list of addresses returned.
Pass their default values (:data:`AF_UNSPEC`, 0, and 0, respectively)
to not limit the results. See the note below for details.

The *flags* argument can be one or several of the ``AI_*`` constants,
and will influence how results are computed and returned.
For example, :const:`AI_NUMERICHOST` will disable domain name resolution
Expand All @@ -951,6 +955,29 @@ The :mod:`socket` module also offers various network-related services:
:const:`AF_INET6`), and is meant to be passed to the :meth:`socket.connect`
method.

.. note::

If you intend to use results from :func:`!getaddrinfo` to create a socket
(rather than, for example, retrieve *canonname*),
consider limiting the results by *type* (e.g. :data:`SOCK_STREAM` or
:data:`SOCK_DGRAM`) and/or *proto* (e.g. :data:`IPPROTO_TCP` or
:data:`IPPROTO_UDP`) that your application can handle.

The behavior with default values of *family*, *type*, *proto*
and *flags* is system-specific.

Many systems (for example, most Linux configurations) will return a sorted
list of all matching addresses.
These addresses should generally be tried in order until a connection succeeds
(possibly tried in parallel, for example, using a `Happy Eyeballs`_ algorithm).
In these cases, limiting the *type* and/or *proto* can help eliminate
unsuccessful or unusable connecton attempts.

Some systems will, however, only return a single address.
(For example, this was reported on Solaris and AIX configurations.)
On these systems, limiting the *type* and/or *proto* helps ensure that
this address is usable.

.. audit-event:: socket.getaddrinfo host,port,family,type,protocol socket.getaddrinfo

The following example fetches address information for a hypothetical TCP
Expand All @@ -970,6 +997,8 @@ The :mod:`socket` module also offers various network-related services:
for IPv6 multicast addresses, string representing an address will not
contain ``%scope_id`` part.

.. _Happy Eyeballs: https://en.wikipedia.org/wiki/Happy_Eyeballs

.. function:: getfqdn([name])

Return a fully qualified domain name for *name*. If *name* is omitted or empty,
Expand Down
9 changes: 9 additions & 0 deletions _sources/library/urllib.parse.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,15 @@ or on combining URL components into a URL string.
If you do not want that behavior, preprocess the *url* with :func:`urlsplit` and
:func:`urlunsplit`, removing possible *scheme* and *netloc* parts.

.. warning::

Because an absolute URL may be passed as the ``url`` parameter, it is
generally **not secure** to use ``urljoin`` with an attacker-controlled
``url``. For example in,
``urljoin("https://website.com/users/", username)``, if ``username`` can
contain an absolute URL, the result of ``urljoin`` will be the absolute
URL.


.. versionchanged:: 3.5

Expand Down
3 changes: 2 additions & 1 deletion _sources/reference/expressions.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,8 @@ a user-defined function:
first thing the code block will do is bind the formal parameters to the
arguments; this is described in section :ref:`function`. When the code block
executes a :keyword:`return` statement, this specifies the return value of the
function call.
function call. If execution reaches the end of the code block without
executing a :keyword:`return` statement, the return value is ``None``.

a built-in function or method:
.. index::
Expand Down
2 changes: 2 additions & 0 deletions _sources/whatsnew/3.13.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1568,6 +1568,8 @@ and are now removed:
For audio playback, use the :pypi:`pygame` library from PyPI instead.
* :mod:`!pipes`:
Use the :mod:`subprocess` module instead.
Use :func:`shlex.quote` to replace the undocumented ``pipes.quote``
function.
* :mod:`!sndhdr`:
The :pypi:`filetype`, :pypi:`puremagic`, or :pypi:`python-magic` libraries
should be used as replacements.
Expand Down
2 changes: 1 addition & 1 deletion about.html
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion bugs.html
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/abstract.html
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/allocation.html
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/apiabiversion.html
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/arg.html
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/bool.html
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/buffer.html
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/bytearray.html
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/bytes.html
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/call.html
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/capsule.html
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/cell.html
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/code.html
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/codec.html
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/complex.html
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/concrete.html
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/contextvars.html
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/conversion.html
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/coro.html
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/datetime.html
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/descriptor.html
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/dict.html
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/exceptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/file.html
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/float.html
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/function.html
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/gcsupport.html
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/gen.html
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/hash.html
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/import.html
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 11月 13, 2024 (03:17 UTC)。
最後更新於 11月 16, 2024 (07:42 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
Loading

0 comments on commit 7ac9d72

Please sign in to comment.