Skip to content

Commit f32592b

Browse files
sync with cpython 8566ee25
1 parent 6d13e6b commit f32592b

File tree

4 files changed

+1037
-933
lines changed

4 files changed

+1037
-933
lines changed

library/asyncio-stream.po

Lines changed: 52 additions & 52 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-08-19 00:16+0000\n"
11+
"POT-Creation-Date: 2025-10-05 00:16+0000\n"
1212
"PO-Revision-Date: 2022-10-31 16:28+0800\n"
1313
"Last-Translator: Matt Wang <[email protected]>\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:440
45+
#: ../../library/asyncio-stream.rst:22 ../../library/asyncio-stream.rst:441
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:407
149+
#: ../../library/asyncio-stream.rst:408
150150
msgid "Added the *ssl_shutdown_timeout* parameter."
151151
msgstr "新增 *ssl_shutdown_timeout* 參數。"
152152

@@ -409,25 +409,25 @@ msgstr ""
409409
"此方法會嘗試立即將 *data* 寫入到底層的 socket。如果失敗,資料會被放到內部寫入"
410410
"緩衝中排隊等待 (queue),直到它可被發送。"
411411

412-
#: ../../library/asyncio-stream.rst:319 ../../library/asyncio-stream.rst:334
412+
#: ../../library/asyncio-stream.rst:319
413+
msgid ""
414+
"The *data* buffer should be a bytes, bytearray, or C-contiguous one-"
415+
"dimensional memoryview object."
416+
msgstr ""
417+
418+
#: ../../library/asyncio-stream.rst:322 ../../library/asyncio-stream.rst:335
413419
msgid "The method should be used along with the ``drain()`` method::"
414420
msgstr "此方法應當與 ``drain()`` 方法一起使用: ::"
415421

416-
#: ../../library/asyncio-stream.rst:321
422+
#: ../../library/asyncio-stream.rst:324
417423
msgid ""
418424
"stream.write(data)\n"
419425
"await stream.drain()"
420426
msgstr ""
421427
"stream.write(data)\n"
422428
"await stream.drain()"
423429

424-
#: ../../library/asyncio-stream.rst:325
425-
msgid ""
426-
"The *data* buffer should be a C contiguous one-dimensional :term:`bytes-like "
427-
"object <bytes-like object>`."
428-
msgstr ""
429-
430-
#: ../../library/asyncio-stream.rst:329
430+
#: ../../library/asyncio-stream.rst:330
431431
msgid ""
432432
"The method writes a list (or any iterable) of bytes to the underlying socket "
433433
"immediately. If that fails, the data is queued in an internal write buffer "
@@ -436,68 +436,68 @@ msgstr ""
436436
"此方法會立即嘗試將一個位元組 list(或任何可疊代物件 (iterable))寫入到底層的 "
437437
"socket。如果失敗,資料會被放到內部寫入緩衝中排隊等待,直到它可被發送。"
438438

439-
#: ../../library/asyncio-stream.rst:336
439+
#: ../../library/asyncio-stream.rst:337
440440
msgid ""
441441
"stream.writelines(lines)\n"
442442
"await stream.drain()"
443443
msgstr ""
444444
"stream.writelines(lines)\n"
445445
"await stream.drain()"
446446

447-
#: ../../library/asyncio-stream.rst:341
447+
#: ../../library/asyncio-stream.rst:342
448448
msgid "The method closes the stream and the underlying socket."
449449
msgstr "此方法會關閉串流以及底層的 socket。"
450450

451-
#: ../../library/asyncio-stream.rst:343
451+
#: ../../library/asyncio-stream.rst:344
452452
msgid ""
453453
"The method should be used, though not mandatory, along with the "
454454
"``wait_closed()`` method::"
455455
msgstr "此方法應與 ``wait_closed()`` 方法一起使用,但並非強制: ::"
456456

457-
#: ../../library/asyncio-stream.rst:346
457+
#: ../../library/asyncio-stream.rst:347
458458
msgid ""
459459
"stream.close()\n"
460460
"await stream.wait_closed()"
461461
msgstr ""
462462
"stream.close()\n"
463463
"await stream.wait_closed()"
464464

465-
#: ../../library/asyncio-stream.rst:351
465+
#: ../../library/asyncio-stream.rst:352
466466
msgid ""
467467
"Return ``True`` if the underlying transport supports the :meth:`write_eof` "
468468
"method, ``False`` otherwise."
469469
msgstr ""
470470
"如果底層的傳輸支援 :meth:`write_eof` 方法就回傳 ``True``,否則回傳 "
471471
"``False``。"
472472

473-
#: ../../library/asyncio-stream.rst:356
473+
#: ../../library/asyncio-stream.rst:357
474474
msgid ""
475475
"Close the write end of the stream after the buffered write data is flushed."
476476
msgstr "在已緩衝的寫入資料被清理 (flush) 後關閉串流的寫入端。"
477477

478-
#: ../../library/asyncio-stream.rst:361
478+
#: ../../library/asyncio-stream.rst:362
479479
msgid "Return the underlying asyncio transport."
480480
msgstr "回傳底層的 asyncio 傳輸。"
481481

482-
#: ../../library/asyncio-stream.rst:365
482+
#: ../../library/asyncio-stream.rst:366
483483
msgid ""
484484
"Access optional transport information; see :meth:`BaseTransport."
485485
"get_extra_info` for details."
486486
msgstr "存取可選的傳輸資訊;詳情請見 :meth:`BaseTransport.get_extra_info`。"
487487

488-
#: ../../library/asyncio-stream.rst:371
488+
#: ../../library/asyncio-stream.rst:372
489489
msgid "Wait until it is appropriate to resume writing to the stream. Example::"
490490
msgstr "等待直到可以繼續寫入到串流。範例: ::"
491491

492-
#: ../../library/asyncio-stream.rst:374
492+
#: ../../library/asyncio-stream.rst:375
493493
msgid ""
494494
"writer.write(data)\n"
495495
"await writer.drain()"
496496
msgstr ""
497497
"writer.write(data)\n"
498498
"await writer.drain()"
499499

500-
#: ../../library/asyncio-stream.rst:377
500+
#: ../../library/asyncio-stream.rst:378
501501
msgid ""
502502
"This is a flow control method that interacts with the underlying IO write "
503503
"buffer. When the size of the buffer reaches the high watermark, *drain()* "
@@ -509,48 +509,48 @@ msgstr ""
509509
"(high watermark) 時,*drain()* 會阻塞直到緩衝區大小減少至最低標記位 (low "
510510
"watermark) 以便繼續寫入。當沒有要等待的資料時,:meth:`drain` 會立即回傳。"
511511

512-
#: ../../library/asyncio-stream.rst:388
512+
#: ../../library/asyncio-stream.rst:389
513513
msgid "Upgrade an existing stream-based connection to TLS."
514514
msgstr "將現有的基於串流的連線升級到 TLS。"
515515

516-
#: ../../library/asyncio-stream.rst:390
516+
#: ../../library/asyncio-stream.rst:391
517517
msgid "Parameters:"
518518
msgstr "參數:"
519519

520-
#: ../../library/asyncio-stream.rst:392
520+
#: ../../library/asyncio-stream.rst:393
521521
msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`."
522522
msgstr "*sslcontext*:一個 :class:`~ssl.SSLContext` 的已配置實例。"
523523

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

530-
#: ../../library/asyncio-stream.rst:397
530+
#: ../../library/asyncio-stream.rst:398
531531
msgid ""
532532
"*ssl_handshake_timeout* is the time in seconds to wait for the TLS handshake "
533533
"to complete before aborting the connection. ``60.0`` seconds if ``None`` "
534534
"(default)."
535535
msgstr ""
536536

537-
#: ../../library/asyncio-stream.rst:401
537+
#: ../../library/asyncio-stream.rst:402
538538
msgid ""
539539
"*ssl_shutdown_timeout* is the time in seconds to wait for the SSL shutdown "
540540
"to complete before aborting the connection. ``30.0`` seconds if ``None`` "
541541
"(default)."
542542
msgstr ""
543543

544-
#: ../../library/asyncio-stream.rst:413
544+
#: ../../library/asyncio-stream.rst:414
545545
msgid ""
546546
"Return ``True`` if the stream is closed or in the process of being closed."
547547
msgstr "如果串流已被關閉或正在被關閉則回傳 ``True``。"
548548

549-
#: ../../library/asyncio-stream.rst:421
549+
#: ../../library/asyncio-stream.rst:422
550550
msgid "Wait until the stream is closed."
551551
msgstr "等待直到串流被關閉。"
552552

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

562-
#: ../../library/asyncio-stream.rst:431
562+
#: ../../library/asyncio-stream.rst:432
563563
msgid "Examples"
564564
msgstr "範例"
565565

566-
#: ../../library/asyncio-stream.rst:436
566+
#: ../../library/asyncio-stream.rst:437
567567
msgid "TCP echo client using streams"
568568
msgstr "使用串流的 TCP echo 用戶端"
569569

570-
#: ../../library/asyncio-stream.rst:438
570+
#: ../../library/asyncio-stream.rst:439
571571
msgid "TCP echo client using the :func:`asyncio.open_connection` function::"
572572
msgstr "使用 :func:`asyncio.open_connection` 函式的 TCP echo 用戶端: ::"
573573

574-
#: ../../library/asyncio-stream.rst:462
574+
#: ../../library/asyncio-stream.rst:463
575575
msgid ""
576576
"The :ref:`TCP echo client protocol "
577577
"<asyncio_example_tcp_echo_client_protocol>` example uses the low-level :meth:"
@@ -580,15 +580,15 @@ msgstr ""
580580
"使用低階 :meth:`loop.create_connection` 方法的 :ref:`TCP echo 用戶端協定 "
581581
"<asyncio_example_tcp_echo_client_protocol>`\\ 範例。"
582582

583-
#: ../../library/asyncio-stream.rst:469
583+
#: ../../library/asyncio-stream.rst:470
584584
msgid "TCP echo server using streams"
585585
msgstr "使用串流的 TCP echo 伺服器"
586586

587-
#: ../../library/asyncio-stream.rst:471
587+
#: ../../library/asyncio-stream.rst:472
588588
msgid "TCP echo server using the :func:`asyncio.start_server` function::"
589589
msgstr "TCP echo 伺服器使用 :func:`asyncio.start_server` 函式: ::"
590590

591-
#: ../../library/asyncio-stream.rst:473
591+
#: ../../library/asyncio-stream.rst:474
592592
msgid ""
593593
"import asyncio\n"
594594
"\n"
@@ -648,7 +648,7 @@ msgstr ""
648648
"\n"
649649
"asyncio.run(main())"
650650

651-
#: ../../library/asyncio-stream.rst:505
651+
#: ../../library/asyncio-stream.rst:506
652652
msgid ""
653653
"The :ref:`TCP echo server protocol "
654654
"<asyncio_example_tcp_echo_server_protocol>` example uses the :meth:`loop."
@@ -657,16 +657,16 @@ msgstr ""
657657
"使用 :meth:`loop.create_server` 方法的 :ref:`TCP echo 伺服器協定 "
658658
"<asyncio_example_tcp_echo_server_protocol>` 範例。"
659659

660-
#: ../../library/asyncio-stream.rst:510
660+
#: ../../library/asyncio-stream.rst:511
661661
msgid "Get HTTP headers"
662662
msgstr "取得 HTTP 標頭"
663663

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

669-
#: ../../library/asyncio-stream.rst:514
669+
#: ../../library/asyncio-stream.rst:515
670670
msgid ""
671671
"import asyncio\n"
672672
"import urllib.parse\n"
@@ -705,34 +705,34 @@ msgid ""
705705
"asyncio.run(print_http_headers(url))"
706706
msgstr ""
707707

708-
#: ../../library/asyncio-stream.rst:551
708+
#: ../../library/asyncio-stream.rst:552
709709
msgid "Usage::"
710710
msgstr "用法: ::"
711711

712-
#: ../../library/asyncio-stream.rst:553
712+
#: ../../library/asyncio-stream.rst:554
713713
msgid "python example.py http://example.com/path/page.html"
714714
msgstr "python example.py http://example.com/path/page.html"
715715

716-
#: ../../library/asyncio-stream.rst:555
716+
#: ../../library/asyncio-stream.rst:556
717717
msgid "or with HTTPS::"
718718
msgstr "或使用 HTTPS: ::"
719719

720-
#: ../../library/asyncio-stream.rst:557
720+
#: ../../library/asyncio-stream.rst:558
721721
msgid "python example.py https://example.com/path/page.html"
722722
msgstr "python example.py https://example.com/path/page.html"
723723

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

728-
#: ../../library/asyncio-stream.rst:565
728+
#: ../../library/asyncio-stream.rst:566
729729
msgid ""
730730
"Coroutine waiting until a socket receives data using the :func:"
731731
"`open_connection` function::"
732732
msgstr ""
733733
"等待直到 socket 透過使用 :func:`open_connection` 函式接收到資料的協程: ::"
734734

735-
#: ../../library/asyncio-stream.rst:568
735+
#: ../../library/asyncio-stream.rst:569
736736
msgid ""
737737
"import asyncio\n"
738738
"import socket\n"
@@ -765,7 +765,7 @@ msgid ""
765765
"asyncio.run(wait_for_data())"
766766
msgstr ""
767767

768-
#: ../../library/asyncio-stream.rst:600
768+
#: ../../library/asyncio-stream.rst:601
769769
msgid ""
770770
"The :ref:`register an open socket to wait for data using a protocol "
771771
"<asyncio_example_create_connection>` example uses a low-level protocol and "
@@ -775,7 +775,7 @@ msgstr ""
775775
"<asyncio_example_create_connection>`\\ 範例中,有使用了低階協定以及 :meth:"
776776
"`loop.create_connection` 方法。"
777777

778-
#: ../../library/asyncio-stream.rst:604
778+
#: ../../library/asyncio-stream.rst:605
779779
msgid ""
780780
"The :ref:`watch a file descriptor for read events "
781781
"<asyncio_example_watch_fd>` example uses the low-level :meth:`loop."

library/compression.po

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.14\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2025-09-08 15:25+0800\n"
10+
"POT-Creation-Date: 2025-10-05 00:16+0000\n"
1111
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1212
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1313
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -20,7 +20,7 @@ msgstr ""
2020
msgid "The :mod:`!compression` package"
2121
msgstr ":mod:`!compression` 套件"
2222

23-
#: ../../library/compression.rst:6
23+
#: ../../library/compression.rst:8
2424
msgid ""
2525
"The :mod:`!compression` package contains the canonical compression modules "
2626
"containing interfaces to several different compression algorithms. Some of "
@@ -30,23 +30,23 @@ msgid ""
3030
"modules in :mod:`!compression` is encouraged where practical."
3131
msgstr ""
3232

33-
#: ../../library/compression.rst:13
33+
#: ../../library/compression.rst:15
3434
msgid ":mod:`!compression.bz2` -- Re-exports :mod:`bz2`"
3535
msgstr ""
3636

37-
#: ../../library/compression.rst:14
37+
#: ../../library/compression.rst:16
3838
msgid ":mod:`!compression.gzip` -- Re-exports :mod:`gzip`"
3939
msgstr ""
4040

41-
#: ../../library/compression.rst:15
41+
#: ../../library/compression.rst:17
4242
msgid ":mod:`!compression.lzma` -- Re-exports :mod:`lzma`"
4343
msgstr ""
4444

45-
#: ../../library/compression.rst:16
45+
#: ../../library/compression.rst:18
4646
msgid ":mod:`!compression.zlib` -- Re-exports :mod:`zlib`"
4747
msgstr ""
4848

49-
#: ../../library/compression.rst:17
49+
#: ../../library/compression.rst:19
5050
msgid ""
5151
":mod:`compression.zstd` -- Wrapper for the Zstandard compression library"
5252
msgstr ""

0 commit comments

Comments
 (0)