Skip to content

Commit 7ac9d72

Browse files
committed
Deploying to gh-pages from @ 10794fd 🚀
1 parent 317e735 commit 7ac9d72

File tree

529 files changed

+4583
-4529
lines changed

Some content is hidden

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

529 files changed

+4583
-4529
lines changed

_sources/library/pprint.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ let's fetch information about a project from `PyPI <https://pypi.org>`_::
267267
>>> import json
268268
>>> import pprint
269269
>>> from urllib.request import urlopen
270-
>>> with urlopen('https://pypi.org/pypi/sampleproject/json') as resp:
270+
>>> with urlopen('https://pypi.org/pypi/sampleproject/1.2.0/json') as resp:
271271
... project_info = json.load(resp)['info']
272272

273273
In its basic form, :func:`~pprint.pp` shows the whole object::

_sources/library/socket.rst.txt

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,9 @@ The :mod:`socket` module also offers various network-related services:
920920

921921
.. versionadded:: 3.7
922922

923-
.. function:: getaddrinfo(host, port, family=0, type=0, proto=0, flags=0)
923+
.. function:: getaddrinfo(host, port, family=AF_UNSPEC, type=0, proto=0, flags=0)
924+
925+
This function wraps the C function ``getaddrinfo`` of the underlying system.
924926

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

932934
The *family*, *type* and *proto* arguments can be optionally specified
933-
in order to narrow the list of addresses returned. Passing zero as a
934-
value for each of these arguments selects the full range of results.
935+
in order to provide options and limit the list of addresses returned.
936+
Pass their default values (:data:`AF_UNSPEC`, 0, and 0, respectively)
937+
to not limit the results. See the note below for details.
938+
935939
The *flags* argument can be one or several of the ``AI_*`` constants,
936940
and will influence how results are computed and returned.
937941
For example, :const:`AI_NUMERICHOST` will disable domain name resolution
@@ -951,6 +955,29 @@ The :mod:`socket` module also offers various network-related services:
951955
:const:`AF_INET6`), and is meant to be passed to the :meth:`socket.connect`
952956
method.
953957

958+
.. note::
959+
960+
If you intend to use results from :func:`!getaddrinfo` to create a socket
961+
(rather than, for example, retrieve *canonname*),
962+
consider limiting the results by *type* (e.g. :data:`SOCK_STREAM` or
963+
:data:`SOCK_DGRAM`) and/or *proto* (e.g. :data:`IPPROTO_TCP` or
964+
:data:`IPPROTO_UDP`) that your application can handle.
965+
966+
The behavior with default values of *family*, *type*, *proto*
967+
and *flags* is system-specific.
968+
969+
Many systems (for example, most Linux configurations) will return a sorted
970+
list of all matching addresses.
971+
These addresses should generally be tried in order until a connection succeeds
972+
(possibly tried in parallel, for example, using a `Happy Eyeballs`_ algorithm).
973+
In these cases, limiting the *type* and/or *proto* can help eliminate
974+
unsuccessful or unusable connecton attempts.
975+
976+
Some systems will, however, only return a single address.
977+
(For example, this was reported on Solaris and AIX configurations.)
978+
On these systems, limiting the *type* and/or *proto* helps ensure that
979+
this address is usable.
980+
954981
.. audit-event:: socket.getaddrinfo host,port,family,type,protocol socket.getaddrinfo
955982

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

1000+
.. _Happy Eyeballs: https://en.wikipedia.org/wiki/Happy_Eyeballs
1001+
9731002
.. function:: getfqdn([name])
9741003

9751004
Return a fully qualified domain name for *name*. If *name* is omitted or empty,

_sources/library/urllib.parse.rst.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,15 @@ or on combining URL components into a URL string.
403403
If you do not want that behavior, preprocess the *url* with :func:`urlsplit` and
404404
:func:`urlunsplit`, removing possible *scheme* and *netloc* parts.
405405

406+
.. warning::
407+
408+
Because an absolute URL may be passed as the ``url`` parameter, it is
409+
generally **not secure** to use ``urljoin`` with an attacker-controlled
410+
``url``. For example in,
411+
``urljoin("https://website.com/users/", username)``, if ``username`` can
412+
contain an absolute URL, the result of ``urljoin`` will be the absolute
413+
URL.
414+
406415

407416
.. versionchanged:: 3.5
408417

_sources/reference/expressions.rst.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,8 @@ a user-defined function:
11561156
first thing the code block will do is bind the formal parameters to the
11571157
arguments; this is described in section :ref:`function`. When the code block
11581158
executes a :keyword:`return` statement, this specifies the return value of the
1159-
function call.
1159+
function call. If execution reaches the end of the code block without
1160+
executing a :keyword:`return` statement, the return value is ``None``.
11601161

11611162
a built-in function or method:
11621163
.. index::

_sources/whatsnew/3.13.rst.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,6 +1568,8 @@ and are now removed:
15681568
For audio playback, use the :pypi:`pygame` library from PyPI instead.
15691569
* :mod:`!pipes`:
15701570
Use the :mod:`subprocess` module instead.
1571+
Use :func:`shlex.quote` to replace the undocumented ``pipes.quote``
1572+
function.
15711573
* :mod:`!sndhdr`:
15721574
The :pypi:`filetype`, :pypi:`puremagic`, or :pypi:`python-magic` libraries
15731575
should be used as replacements.

about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ <h3>瀏覽</h3>
320320
<a href="https://www.python.org/psf/donations/">Please donate.</a>
321321
<br />
322322
<br />
323-
最後更新於 11月 13, 2024 (03:17 UTC)。
323+
最後更新於 11月 16, 2024 (07:42 UTC)。
324324

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

bugs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ <h3>瀏覽</h3>
359359
<a href="https://www.python.org/psf/donations/">Please donate.</a>
360360
<br />
361361
<br />
362-
最後更新於 11月 13, 2024 (03:17 UTC)。
362+
最後更新於 11月 16, 2024 (07:42 UTC)。
363363

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

c-api/abstract.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ <h3>瀏覽</h3>
329329
<a href="https://www.python.org/psf/donations/">Please donate.</a>
330330
<br />
331331
<br />
332-
最後更新於 11月 13, 2024 (03:17 UTC)。
332+
最後更新於 11月 16, 2024 (07:42 UTC)。
333333

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

c-api/allocation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ <h3>瀏覽</h3>
344344
<a href="https://www.python.org/psf/donations/">Please donate.</a>
345345
<br />
346346
<br />
347-
最後更新於 11月 13, 2024 (03:17 UTC)。
347+
最後更新於 11月 16, 2024 (07:42 UTC)。
348348

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

c-api/apiabiversion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ <h3>瀏覽</h3>
376376
<a href="https://www.python.org/psf/donations/">Please donate.</a>
377377
<br />
378378
<br />
379-
最後更新於 11月 13, 2024 (03:17 UTC)。
379+
最後更新於 11月 16, 2024 (07:42 UTC)。
380380

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

c-api/arg.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ <h3>瀏覽</h3>
924924
<a href="https://www.python.org/psf/donations/">Please donate.</a>
925925
<br />
926926
<br />
927-
最後更新於 11月 13, 2024 (03:17 UTC)。
927+
最後更新於 11月 16, 2024 (07:42 UTC)。
928928

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

c-api/bool.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ <h3>瀏覽</h3>
341341
<a href="https://www.python.org/psf/donations/">Please donate.</a>
342342
<br />
343343
<br />
344-
最後更新於 11月 13, 2024 (03:17 UTC)。
344+
最後更新於 11月 16, 2024 (07:42 UTC)。
345345

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

c-api/buffer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ <h3>瀏覽</h3>
10161016
<a href="https://www.python.org/psf/donations/">Please donate.</a>
10171017
<br />
10181018
<br />
1019-
最後更新於 11月 13, 2024 (03:17 UTC)。
1019+
最後更新於 11月 16, 2024 (07:42 UTC)。
10201020

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

c-api/bytearray.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ <h3>瀏覽</h3>
400400
<a href="https://www.python.org/psf/donations/">Please donate.</a>
401401
<br />
402402
<br />
403-
最後更新於 11月 13, 2024 (03:17 UTC)。
403+
最後更新於 11月 16, 2024 (07:42 UTC)。
404404

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

c-api/bytes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ <h3>瀏覽</h3>
521521
<a href="https://www.python.org/psf/donations/">Please donate.</a>
522522
<br />
523523
<br />
524-
最後更新於 11月 13, 2024 (03:17 UTC)。
524+
最後更新於 11月 16, 2024 (07:42 UTC)。
525525

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

c-api/call.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ <h3>瀏覽</h3>
652652
<a href="https://www.python.org/psf/donations/">Please donate.</a>
653653
<br />
654654
<br />
655-
最後更新於 11月 13, 2024 (03:17 UTC)。
655+
最後更新於 11月 16, 2024 (07:42 UTC)。
656656

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

c-api/capsule.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ <h3>瀏覽</h3>
441441
<a href="https://www.python.org/psf/donations/">Please donate.</a>
442442
<br />
443443
<br />
444-
最後更新於 11月 13, 2024 (03:17 UTC)。
444+
最後更新於 11月 16, 2024 (07:42 UTC)。
445445

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

c-api/cell.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ <h3>瀏覽</h3>
341341
<a href="https://www.python.org/psf/donations/">Please donate.</a>
342342
<br />
343343
<br />
344-
最後更新於 11月 13, 2024 (03:17 UTC)。
344+
最後更新於 11月 16, 2024 (07:42 UTC)。
345345

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

c-api/code.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ <h3>瀏覽</h3>
606606
<a href="https://www.python.org/psf/donations/">Please donate.</a>
607607
<br />
608608
<br />
609-
最後更新於 11月 13, 2024 (03:17 UTC)。
609+
最後更新於 11月 16, 2024 (07:42 UTC)。
610610

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

c-api/codec.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ <h3>瀏覽</h3>
445445
<a href="https://www.python.org/psf/donations/">Please donate.</a>
446446
<br />
447447
<br />
448-
最後更新於 11月 13, 2024 (03:17 UTC)。
448+
最後更新於 11月 16, 2024 (07:42 UTC)。
449449

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

c-api/complex.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ <h3>瀏覽</h3>
456456
<a href="https://www.python.org/psf/donations/">Please donate.</a>
457457
<br />
458458
<br />
459-
最後更新於 11月 13, 2024 (03:17 UTC)。
459+
最後更新於 11月 16, 2024 (07:42 UTC)。
460460

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

c-api/concrete.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ <h3>瀏覽</h3>
464464
<a href="https://www.python.org/psf/donations/">Please donate.</a>
465465
<br />
466466
<br />
467-
最後更新於 11月 13, 2024 (03:17 UTC)。
467+
最後更新於 11月 16, 2024 (07:42 UTC)。
468468

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

c-api/contextvars.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ <h3>瀏覽</h3>
451451
<a href="https://www.python.org/psf/donations/">Please donate.</a>
452452
<br />
453453
<br />
454-
最後更新於 11月 13, 2024 (03:17 UTC)。
454+
最後更新於 11月 16, 2024 (07:42 UTC)。
455455

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

c-api/conversion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ <h3>瀏覽</h3>
390390
<a href="https://www.python.org/psf/donations/">Please donate.</a>
391391
<br />
392392
<br />
393-
最後更新於 11月 13, 2024 (03:17 UTC)。
393+
最後更新於 11月 16, 2024 (07:42 UTC)。
394394

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

c-api/coro.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ <h3>瀏覽</h3>
319319
<a href="https://www.python.org/psf/donations/">Please donate.</a>
320320
<br />
321321
<br />
322-
最後更新於 11月 13, 2024 (03:17 UTC)。
322+
最後更新於 11月 16, 2024 (07:42 UTC)。
323323

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

c-api/datetime.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ <h3>瀏覽</h3>
630630
<a href="https://www.python.org/psf/donations/">Please donate.</a>
631631
<br />
632632
<br />
633-
最後更新於 11月 13, 2024 (03:17 UTC)。
633+
最後更新於 11月 16, 2024 (07:42 UTC)。
634634

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

c-api/descriptor.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ <h3>瀏覽</h3>
334334
<a href="https://www.python.org/psf/donations/">Please donate.</a>
335335
<br />
336336
<br />
337-
最後更新於 11月 13, 2024 (03:17 UTC)。
337+
最後更新於 11月 16, 2024 (07:42 UTC)。
338338

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

c-api/dict.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ <h3>瀏覽</h3>
746746
<a href="https://www.python.org/psf/donations/">Please donate.</a>
747747
<br />
748748
<br />
749-
最後更新於 11月 13, 2024 (03:17 UTC)。
749+
最後更新於 11月 16, 2024 (07:42 UTC)。
750750

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

c-api/exceptions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,7 @@ <h3>瀏覽</h3>
17081708
<a href="https://www.python.org/psf/donations/">Please donate.</a>
17091709
<br />
17101710
<br />
1711-
最後更新於 11月 13, 2024 (03:17 UTC)。
1711+
最後更新於 11月 16, 2024 (07:42 UTC)。
17121712

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

c-api/file.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ <h3>瀏覽</h3>
366366
<a href="https://www.python.org/psf/donations/">Please donate.</a>
367367
<br />
368368
<br />
369-
最後更新於 11月 13, 2024 (03:17 UTC)。
369+
最後更新於 11月 16, 2024 (07:42 UTC)。
370370

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

c-api/float.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ <h3>瀏覽</h3>
489489
<a href="https://www.python.org/psf/donations/">Please donate.</a>
490490
<br />
491491
<br />
492-
最後更新於 11月 13, 2024 (03:17 UTC)。
492+
最後更新於 11月 16, 2024 (07:42 UTC)。
493493

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

c-api/frame.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ <h3>瀏覽</h3>
508508
<a href="https://www.python.org/psf/donations/">Please donate.</a>
509509
<br />
510510
<br />
511-
最後更新於 11月 13, 2024 (03:17 UTC)。
511+
最後更新於 11月 16, 2024 (07:42 UTC)。
512512

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

c-api/function.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ <h3>瀏覽</h3>
468468
<a href="https://www.python.org/psf/donations/">Please donate.</a>
469469
<br />
470470
<br />
471-
最後更新於 11月 13, 2024 (03:17 UTC)。
471+
最後更新於 11月 16, 2024 (07:42 UTC)。
472472

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

c-api/gcsupport.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ <h3>瀏覽</h3>
611611
<a href="https://www.python.org/psf/donations/">Please donate.</a>
612612
<br />
613613
<br />
614-
最後更新於 11月 13, 2024 (03:17 UTC)。
614+
最後更新於 11月 16, 2024 (07:42 UTC)。
615615

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

c-api/gen.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ <h3>瀏覽</h3>
328328
<a href="https://www.python.org/psf/donations/">Please donate.</a>
329329
<br />
330330
<br />
331-
最後更新於 11月 13, 2024 (03:17 UTC)。
331+
最後更新於 11月 16, 2024 (07:42 UTC)。
332332

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

c-api/hash.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ <h3>瀏覽</h3>
420420
<a href="https://www.python.org/psf/donations/">Please donate.</a>
421421
<br />
422422
<br />
423-
最後更新於 11月 13, 2024 (03:17 UTC)。
423+
最後更新於 11月 16, 2024 (07:42 UTC)。
424424

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

c-api/import.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ <h3>瀏覽</h3>
633633
<a href="https://www.python.org/psf/donations/">Please donate.</a>
634634
<br />
635635
<br />
636-
最後更新於 11月 13, 2024 (03:17 UTC)。
636+
最後更新於 11月 16, 2024 (07:42 UTC)。
637637

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

0 commit comments

Comments
 (0)