Skip to content

Commit 953ea55

Browse files
sync with cpython 709041c3
1 parent afd2361 commit 953ea55

1 file changed

Lines changed: 41 additions & 32 deletions

File tree

library/asyncio-stream.po

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Python 3.14\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2025-10-05 00:16+0000\n"
11+
"POT-Creation-Date: 2026-08-05 00:29+0000\n"
1212
"PO-Revision-Date: 2022-10-31 16:28+0800\n"
1313
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
1414
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -42,7 +42,7 @@ msgstr ""
4242
msgid "Here is an example of a TCP echo client written using asyncio streams::"
4343
msgstr "這是一個使用 asyncio 串流編寫的 TCP echo 用戶端範例: ::"
4444

45-
#: ../../library/asyncio-stream.rst:22 ../../library/asyncio-stream.rst:441
45+
#: ../../library/asyncio-stream.rst:22 ../../library/asyncio-stream.rst:451
4646
msgid ""
4747
"import asyncio\n"
4848
"\n"
@@ -146,7 +146,7 @@ msgstr "移除 *loop* 參數。"
146146

147147
#: ../../library/asyncio-stream.rst:87 ../../library/asyncio-stream.rst:131
148148
#: ../../library/asyncio-stream.rst:167 ../../library/asyncio-stream.rst:202
149-
#: ../../library/asyncio-stream.rst:408
149+
#: ../../library/asyncio-stream.rst:418
150150
msgid "Added the *ssl_shutdown_timeout* parameter."
151151
msgstr "新增 *ssl_shutdown_timeout* 參數。"
152152

@@ -509,48 +509,57 @@ msgstr ""
509509
"(high watermark) 時,*drain()* 會阻塞直到緩衝區大小減少至最低標記位 (low "
510510
"watermark) 以便繼續寫入。當沒有要等待的資料時,:meth:`drain` 會立即回傳。"
511511

512-
#: ../../library/asyncio-stream.rst:389
512+
#: ../../library/asyncio-stream.rst:387
513+
msgid ""
514+
"When the write buffer is below the high watermark, :meth:`drain` returns "
515+
"immediately without yielding to the event loop. As a result, code which "
516+
"repeatedly calls ``write()`` followed by ``await drain()`` may prevent other "
517+
"tasks from running. To prevent blocking behavior, yield to the event loop "
518+
"explicitly with ``await asyncio.sleep(0)`` (see :func:`asyncio.sleep`)."
519+
msgstr ""
520+
521+
#: ../../library/asyncio-stream.rst:399
513522
msgid "Upgrade an existing stream-based connection to TLS."
514523
msgstr "將現有的基於串流的連線升級到 TLS。"
515524

516-
#: ../../library/asyncio-stream.rst:391
525+
#: ../../library/asyncio-stream.rst:401
517526
msgid "Parameters:"
518527
msgstr "參數:"
519528

520-
#: ../../library/asyncio-stream.rst:393
529+
#: ../../library/asyncio-stream.rst:403
521530
msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`."
522531
msgstr "*sslcontext*:一個 :class:`~ssl.SSLContext` 的已配置實例。"
523532

524-
#: ../../library/asyncio-stream.rst:395
533+
#: ../../library/asyncio-stream.rst:405
525534
msgid ""
526535
"*server_hostname*: sets or overrides the host name that the target server's "
527536
"certificate will be matched against."
528537
msgstr "*server_hostname*:設定或覆寫將會被目標伺服器憑證比對的主機名稱。"
529538

530-
#: ../../library/asyncio-stream.rst:398
539+
#: ../../library/asyncio-stream.rst:408
531540
msgid ""
532541
"*ssl_handshake_timeout* is the time in seconds to wait for the TLS handshake "
533542
"to complete before aborting the connection. ``60.0`` seconds if ``None`` "
534543
"(default)."
535544
msgstr ""
536545

537-
#: ../../library/asyncio-stream.rst:402
546+
#: ../../library/asyncio-stream.rst:412
538547
msgid ""
539548
"*ssl_shutdown_timeout* is the time in seconds to wait for the SSL shutdown "
540549
"to complete before aborting the connection. ``30.0`` seconds if ``None`` "
541550
"(default)."
542551
msgstr ""
543552

544-
#: ../../library/asyncio-stream.rst:414
553+
#: ../../library/asyncio-stream.rst:424
545554
msgid ""
546555
"Return ``True`` if the stream is closed or in the process of being closed."
547556
msgstr "如果串流已被關閉或正在被關閉則回傳 ``True``。"
548557

549-
#: ../../library/asyncio-stream.rst:422
558+
#: ../../library/asyncio-stream.rst:432
550559
msgid "Wait until the stream is closed."
551560
msgstr "等待直到串流被關閉。"
552561

553-
#: ../../library/asyncio-stream.rst:424
562+
#: ../../library/asyncio-stream.rst:434
554563
msgid ""
555564
"Should be called after :meth:`close` to wait until the underlying connection "
556565
"is closed, ensuring that all data has been flushed before e.g. exiting the "
@@ -559,19 +568,19 @@ msgstr ""
559568
"應當在 :meth:`close` 之後才被呼叫,這會持續等待直到底層的連線被關閉,以確保在"
560569
"這之前(例如在程式退出前)所有資料都已經被清空"
561570

562-
#: ../../library/asyncio-stream.rst:432
571+
#: ../../library/asyncio-stream.rst:442
563572
msgid "Examples"
564573
msgstr "範例"
565574

566-
#: ../../library/asyncio-stream.rst:437
575+
#: ../../library/asyncio-stream.rst:447
567576
msgid "TCP echo client using streams"
568577
msgstr "使用串流的 TCP echo 用戶端"
569578

570-
#: ../../library/asyncio-stream.rst:439
579+
#: ../../library/asyncio-stream.rst:449
571580
msgid "TCP echo client using the :func:`asyncio.open_connection` function::"
572581
msgstr "使用 :func:`asyncio.open_connection` 函式的 TCP echo 用戶端: ::"
573582

574-
#: ../../library/asyncio-stream.rst:463
583+
#: ../../library/asyncio-stream.rst:473
575584
msgid ""
576585
"The :ref:`TCP echo client protocol "
577586
"<asyncio_example_tcp_echo_client_protocol>` example uses the low-level :meth:"
@@ -580,15 +589,15 @@ msgstr ""
580589
"使用低階 :meth:`loop.create_connection` 方法的 :ref:`TCP echo 用戶端協定 "
581590
"<asyncio_example_tcp_echo_client_protocol>`\\ 範例。"
582591

583-
#: ../../library/asyncio-stream.rst:470
592+
#: ../../library/asyncio-stream.rst:480
584593
msgid "TCP echo server using streams"
585594
msgstr "使用串流的 TCP echo 伺服器"
586595

587-
#: ../../library/asyncio-stream.rst:472
596+
#: ../../library/asyncio-stream.rst:482
588597
msgid "TCP echo server using the :func:`asyncio.start_server` function::"
589598
msgstr "TCP echo 伺服器使用 :func:`asyncio.start_server` 函式: ::"
590599

591-
#: ../../library/asyncio-stream.rst:474
600+
#: ../../library/asyncio-stream.rst:484
592601
msgid ""
593602
"import asyncio\n"
594603
"\n"
@@ -648,7 +657,7 @@ msgstr ""
648657
"\n"
649658
"asyncio.run(main())"
650659

651-
#: ../../library/asyncio-stream.rst:506
660+
#: ../../library/asyncio-stream.rst:516
652661
msgid ""
653662
"The :ref:`TCP echo server protocol "
654663
"<asyncio_example_tcp_echo_server_protocol>` example uses the :meth:`loop."
@@ -657,16 +666,16 @@ msgstr ""
657666
"使用 :meth:`loop.create_server` 方法的 :ref:`TCP echo 伺服器協定 "
658667
"<asyncio_example_tcp_echo_server_protocol>` 範例。"
659668

660-
#: ../../library/asyncio-stream.rst:511
669+
#: ../../library/asyncio-stream.rst:521
661670
msgid "Get HTTP headers"
662671
msgstr "取得 HTTP 標頭"
663672

664-
#: ../../library/asyncio-stream.rst:513
673+
#: ../../library/asyncio-stream.rst:523
665674
msgid ""
666675
"Simple example querying HTTP headers of the URL passed on the command line::"
667676
msgstr "查詢自命令列傳入之 URL 所帶有 HTTP 標頭的簡單範例: ::"
668677

669-
#: ../../library/asyncio-stream.rst:515
678+
#: ../../library/asyncio-stream.rst:525
670679
msgid ""
671680
"import asyncio\n"
672681
"import urllib.parse\n"
@@ -705,34 +714,34 @@ msgid ""
705714
"asyncio.run(print_http_headers(url))"
706715
msgstr ""
707716

708-
#: ../../library/asyncio-stream.rst:552
717+
#: ../../library/asyncio-stream.rst:562
709718
msgid "Usage::"
710719
msgstr "用法: ::"
711720

712-
#: ../../library/asyncio-stream.rst:554
721+
#: ../../library/asyncio-stream.rst:564
713722
msgid "python example.py http://example.com/path/page.html"
714723
msgstr "python example.py http://example.com/path/page.html"
715724

716-
#: ../../library/asyncio-stream.rst:556
725+
#: ../../library/asyncio-stream.rst:566
717726
msgid "or with HTTPS::"
718727
msgstr "或使用 HTTPS: ::"
719728

720-
#: ../../library/asyncio-stream.rst:558
729+
#: ../../library/asyncio-stream.rst:568
721730
msgid "python example.py https://example.com/path/page.html"
722731
msgstr "python example.py https://example.com/path/page.html"
723732

724-
#: ../../library/asyncio-stream.rst:564
733+
#: ../../library/asyncio-stream.rst:574
725734
msgid "Register an open socket to wait for data using streams"
726735
msgstr "註冊一個使用串流來等待資料的開放 socket"
727736

728-
#: ../../library/asyncio-stream.rst:566
737+
#: ../../library/asyncio-stream.rst:576
729738
msgid ""
730739
"Coroutine waiting until a socket receives data using the :func:"
731740
"`open_connection` function::"
732741
msgstr ""
733742
"等待直到 socket 透過使用 :func:`open_connection` 函式接收到資料的協程: ::"
734743

735-
#: ../../library/asyncio-stream.rst:569
744+
#: ../../library/asyncio-stream.rst:579
736745
msgid ""
737746
"import asyncio\n"
738747
"import socket\n"
@@ -765,7 +774,7 @@ msgid ""
765774
"asyncio.run(wait_for_data())"
766775
msgstr ""
767776

768-
#: ../../library/asyncio-stream.rst:601
777+
#: ../../library/asyncio-stream.rst:611
769778
msgid ""
770779
"The :ref:`register an open socket to wait for data using a protocol "
771780
"<asyncio_example_create_connection>` example uses a low-level protocol and "
@@ -775,7 +784,7 @@ msgstr ""
775784
"<asyncio_example_create_connection>`\\ 範例中,有使用了低階協定以及 :meth:"
776785
"`loop.create_connection` 方法。"
777786

778-
#: ../../library/asyncio-stream.rst:605
787+
#: ../../library/asyncio-stream.rst:615
779788
msgid ""
780789
"The :ref:`watch a file descriptor for read events "
781790
"<asyncio_example_watch_fd>` example uses the low-level :meth:`loop."

0 commit comments

Comments
 (0)