@@ -2501,6 +2501,8 @@ msgid ""
2501
2501
"way to implement custom authentication mechanisms. (Contributed by Milan "
2502
2502
"Oberkirch in :issue:`15014`.)"
2503
2503
msgstr ""
2504
+ "新增的 :meth:`SMTP.auth() <smtplib.SMTP.auth>` 方法为实现自定义身份验证机制提供了一个便捷的方式。 (由 "
2505
+ "Milan Oberkirch 在 :issue:`15014` 中贡献。)"
2504
2506
2505
2507
#: ../../whatsnew/3.5.rst:1704
2506
2508
msgid ""
@@ -2509,6 +2511,9 @@ msgid ""
2509
2511
"messages. (Contributed by Gavin Chappell and Maciej Szulik in "
2510
2512
":issue:`16914`.)"
2511
2513
msgstr ""
2514
+ "现在 :meth:`SMTP.set_debuglevel() <smtplib.SMTP.set_debuglevel>` 方法可接受额外的 "
2515
+ "debuglevel (2),它将在调试消息中启用时间戳。 (由 Gavin Chappell 和 Maciej Szulik 在 "
2516
+ ":issue:`16914` 中贡献。)"
2512
2517
2513
2518
#: ../../whatsnew/3.5.rst:1708
2514
2519
msgid ""
@@ -2517,6 +2522,9 @@ msgid ""
2517
2522
":rfc:`6531` (SMTPUTF8). (Contributed by Milan Oberkirch and R. David Murray "
2518
2523
"in :issue:`22027`.)"
2519
2524
msgstr ""
2525
+ "现在 :meth:`SMTP.sendmail() <smtplib.SMTP.sendmail>` 和 "
2526
+ ":meth:`SMTP.send_message() <smtplib.SMTP.send_message>` 方法均支持 :rfc:`6531` "
2527
+ "(SMTPUTF8)。 (由 Milan Oberkirch 和 R. David Murray 在 :issue:`22027` 中贡献。)"
2520
2528
2521
2529
#: ../../whatsnew/3.5.rst:1715
2522
2530
msgid "sndhdr"
@@ -2539,7 +2547,7 @@ msgstr "socket"
2539
2547
msgid ""
2540
2548
"Functions with timeouts now use a monotonic clock, instead of a system "
2541
2549
"clock. (Contributed by Victor Stinner in :issue:`22043`.)"
2542
- msgstr ""
2550
+ msgstr "现在函数的超时设置将使用单调时钟,而不是系统时钟。 (由 Victor Stinner 在 :issue:`22043` 中贡献。) "
2543
2551
2544
2552
#: ../../whatsnew/3.5.rst:1728
2545
2553
msgid ""
@@ -2549,6 +2557,9 @@ msgid ""
2549
2557
" times faster than when using plain :meth:`socket.send() "
2550
2558
"<socket.socket.send>`. (Contributed by Giampaolo Rodola' in :issue:`17552`.)"
2551
2559
msgstr ""
2560
+ "新增的 :meth:`socket.sendfile() <socket.socket.sendfile>` 方法允许在 UNIX 上使用高性能的 "
2561
+ ":func:`os.sendfile` 函数通过套接字发送文件,使得上传速度比使用简单的 :meth:`socket.send() "
2562
+ "<socket.socket.send>` 快 2 至 3 倍。 (由 Giampaolo Rodola' 在 :issue:`17552` 中贡献。)"
2552
2563
2553
2564
#: ../../whatsnew/3.5.rst:1734
2554
2565
msgid ""
@@ -2557,6 +2568,8 @@ msgid ""
2557
2568
"timeout is now the maximum total duration to send all data. (Contributed by "
2558
2569
"Victor Stinner in :issue:`23853`.)"
2559
2570
msgstr ""
2571
+ ":meth:`socket.sendall() <socket.socket.sendall>` 方法每次接受或发送字节数据时将不再重置套接字超时。 "
2572
+ "现在套接字超时将为发送所有数据最大总计持续时间。 (由 Victor Stinner 在 :issue:`23853` 中贡献。)"
2560
2573
2561
2574
#: ../../whatsnew/3.5.rst:1739
2562
2575
msgid ""
@@ -2565,6 +2578,9 @@ msgid ""
2565
2578
"<socket.SOMAXCONN>` or to ``128``, whichever is less. (Contributed by "
2566
2579
"Charles-François Natali in :issue:`21455`.)"
2567
2580
msgstr ""
2581
+ "现在 :meth:`socket.listen() <socket.socket.listen>` 方法的 *backlog* 参数将是可选的。 "
2582
+ "在默认情况下它会被设为 :data:`SOMAXCONN <socket.SOMAXCONN>` 或 ``128``,取其中的较小值。 (由 "
2583
+ "Charles-François Natali 在 :issue:`21455` 中贡献。)"
2568
2584
2569
2585
#: ../../whatsnew/3.5.rst:1746
2570
2586
msgid "ssl"
@@ -2588,19 +2604,27 @@ msgid ""
2588
2604
":class:`~ssl.MemoryBIO` class can be used to pass data between Python and an"
2589
2605
" SSL protocol instance."
2590
2606
msgstr ""
2607
+ "新增了 :class:`~ssl.SSLObject` 类以针对 :class:`~ssl.SSLSocket` 的网络 I/O "
2608
+ "能力是非必要或未优化的情况提供 SSL 协议支持。 ``SSLObject`` 代表一个 SSL 协议实例,但不实现任何网络 I/O "
2609
+ "方法,而是提供一个内存缓冲区接口。 新增的 :class:`~ssl.MemoryBIO` 类可被用于在 Python 和 SSL "
2610
+ "协议实例之间传递数据。"
2591
2611
2592
2612
#: ../../whatsnew/3.5.rst:1762
2593
2613
msgid ""
2594
2614
"The memory BIO SSL support is primarily intended to be used in frameworks "
2595
2615
"implementing asynchronous I/O for which :class:`~ssl.SSLSocket`'s readiness "
2596
2616
"model (\" select/poll\" ) is inefficient."
2597
2617
msgstr ""
2618
+ "内存 BIO SSL 支持主要被用来为对 :class:`~ssl.SSLSocket` 的就绪模型(\" 选择/轮询\" )来说效率较低的框架实现异步 "
2619
+ "I/O。"
2598
2620
2599
2621
#: ../../whatsnew/3.5.rst:1766
2600
2622
msgid ""
2601
2623
"A new :meth:`SSLContext.wrap_bio() <ssl.SSLContext.wrap_bio>` method can be "
2602
2624
"used to create a new ``SSLObject`` instance."
2603
2625
msgstr ""
2626
+ "新增的 :meth:`SSLContext.wrap_bio() <ssl.SSLContext.wrap_bio>` 方法可被用于创建新的 "
2627
+ "``SSLObject`` 实例。"
2604
2628
2605
2629
#: ../../whatsnew/3.5.rst:1771
2606
2630
msgid "Application-Layer Protocol Negotiation Support"
@@ -2663,6 +2687,9 @@ msgid ""
2663
2687
" a non-blocking socket if the operation would block. Previously, it would "
2664
2688
"return ``0``. (Contributed by Nikolaus Rath in :issue:`20951`.)"
2665
2689
msgstr ""
2690
+ "现在当操作将要阻塞时 :meth:`SSLSocket.send() <ssl.SSLSocket.send>` 方法将在非阻塞的套接字上引发 "
2691
+ ":exc:`ssl.SSLWantReadError` 或 :exc:`ssl.SSLWantWriteError` 异常。 在之前版本中,它将返回 "
2692
+ "``0``。 (由 Nikolaus Rath 在 :issue:`20951` 中贡献。)"
2666
2693
2667
2694
#: ../../whatsnew/3.5.rst:1805
2668
2695
msgid ""
@@ -2671,6 +2698,8 @@ msgid ""
2671
2698
"value is always an :class:`int`. (Contributed by Akira Li in "
2672
2699
":issue:`19940`.)"
2673
2700
msgstr ""
2701
+ "根据 :rfc:`5280`,现在 :func:`~ssl.cert_time_to_seconds` 函数会将输入的时间解读为 UTC "
2702
+ "而不是本地时间。 此外,其返回值必定为 :class:`int`。 (由 Akira Li 在 :issue:`19940` 中贡献。)"
2674
2703
2675
2704
#: ../../whatsnew/3.5.rst:1809
2676
2705
msgid ""
@@ -3198,6 +3227,9 @@ msgid ""
3198
3227
"significantly faster for searching 1-character substrings. (Contributed by "
3199
3228
"Serhiy Storchaka in :issue:`23573`.)"
3200
3229
msgstr ""
3230
+ "现在字符串方法 :meth:`~str.find`, :meth:`~str.rfind`, :meth:`~str.split`, "
3231
+ ":meth:`~str.partition` 和 :keyword:`in` 字符串运算符在搜索 1 个字符的子字符串时将显著提速。 (由 Serhiy"
3232
+ " Storchaka 在 :issue:`23573` 中贡献。)"
3201
3233
3202
3234
#: ../../whatsnew/3.5.rst:2173
3203
3235
msgid "Build and C API Changes"
@@ -3245,6 +3277,8 @@ msgid ""
3245
3277
"encode error with ``\\ N{...}`` escapes. (Contributed by Serhiy Storchaka in "
3246
3278
":issue:`19676`.)"
3247
3279
msgstr ""
3280
+ "新增的 :c:func:`PyCodec_NameReplaceErrors` 函数可以将 unicode 编码错误替换为 ``\\ N{...}`` "
3281
+ "转义符号。 (由 Serhiy Storchaka 在 :issue:`19676` 中贡献。)"
3248
3282
3249
3283
#: ../../whatsnew/3.5.rst:2194
3250
3284
msgid ""
@@ -3258,6 +3292,7 @@ msgid ""
3258
3292
"A new :c:data:`PyExc_RecursionError` exception. (Contributed by Georg Brandl"
3259
3293
" in :issue:`19235`.)"
3260
3294
msgstr ""
3295
+ "新增 :c:data:`PyExc_RecursionError` 异常。 (由 Georg Brandl 在 :issue:`19235` 中贡献。)"
3261
3296
3262
3297
#: ../../whatsnew/3.5.rst:2201
3263
3298
msgid ""
0 commit comments