@@ -2548,7 +2548,7 @@ msgstr "socket"
2548
2548
msgid ""
2549
2549
"Functions with timeouts now use a monotonic clock, instead of a system "
2550
2550
"clock. (Contributed by Victor Stinner in :issue:`22043`.)"
2551
- msgstr ""
2551
+ msgstr "现在函数的超时设置将使用单调时钟,而不是系统时钟。 (由 Victor Stinner 在 :issue:`22043` 中贡献。) "
2552
2552
2553
2553
#: ../../whatsnew/3.5.rst:1728
2554
2554
msgid ""
@@ -2558,6 +2558,9 @@ msgid ""
2558
2558
" times faster than when using plain :meth:`socket.send() "
2559
2559
"<socket.socket.send>`. (Contributed by Giampaolo Rodola' in :issue:`17552`.)"
2560
2560
msgstr ""
2561
+ "新增的 :meth:`socket.sendfile() <socket.socket.sendfile>` 方法允许在 UNIX 上使用高性能的 "
2562
+ ":func:`os.sendfile` 函数通过套接字发送文件,使得上传速度比使用简单的 :meth:`socket.send() "
2563
+ "<socket.socket.send>` 快 2 至 3 倍。 (由 Giampaolo Rodola' 在 :issue:`17552` 中贡献。)"
2561
2564
2562
2565
#: ../../whatsnew/3.5.rst:1734
2563
2566
msgid ""
@@ -2566,6 +2569,8 @@ msgid ""
2566
2569
"timeout is now the maximum total duration to send all data. (Contributed by "
2567
2570
"Victor Stinner in :issue:`23853`.)"
2568
2571
msgstr ""
2572
+ ":meth:`socket.sendall() <socket.socket.sendall>` 方法每次接受或发送字节数据时将不再重置套接字超时。 "
2573
+ "现在套接字超时将为发送所有数据最大总计持续时间。 (由 Victor Stinner 在 :issue:`23853` 中贡献。)"
2569
2574
2570
2575
#: ../../whatsnew/3.5.rst:1739
2571
2576
msgid ""
@@ -2574,6 +2579,9 @@ msgid ""
2574
2579
"<socket.SOMAXCONN>` or to ``128``, whichever is less. (Contributed by "
2575
2580
"Charles-François Natali in :issue:`21455`.)"
2576
2581
msgstr ""
2582
+ "现在 :meth:`socket.listen() <socket.socket.listen>` 方法的 *backlog* 参数将是可选的。 "
2583
+ "在默认情况下它会被设为 :data:`SOMAXCONN <socket.SOMAXCONN>` 或 ``128``,取其中的较小值。 (由 "
2584
+ "Charles-François Natali 在 :issue:`21455` 中贡献。)"
2577
2585
2578
2586
#: ../../whatsnew/3.5.rst:1746
2579
2587
msgid "ssl"
@@ -2597,19 +2605,27 @@ msgid ""
2597
2605
":class:`~ssl.MemoryBIO` class can be used to pass data between Python and an"
2598
2606
" SSL protocol instance."
2599
2607
msgstr ""
2608
+ "新增了 :class:`~ssl.SSLObject` 类以针对 :class:`~ssl.SSLSocket` 的网络 I/O "
2609
+ "能力是非必要或未优化的情况提供 SSL 协议支持。 ``SSLObject`` 代表一个 SSL 协议实例,但不实现任何网络 I/O "
2610
+ "方法,而是提供一个内存缓冲区接口。 新增的 :class:`~ssl.MemoryBIO` 类可被用于在 Python 和 SSL "
2611
+ "协议实例之间传递数据。"
2600
2612
2601
2613
#: ../../whatsnew/3.5.rst:1762
2602
2614
msgid ""
2603
2615
"The memory BIO SSL support is primarily intended to be used in frameworks "
2604
2616
"implementing asynchronous I/O for which :class:`~ssl.SSLSocket`'s readiness "
2605
2617
"model (\" select/poll\" ) is inefficient."
2606
2618
msgstr ""
2619
+ "内存 BIO SSL 支持主要被用来为对 :class:`~ssl.SSLSocket` 的就绪模型(\" 选择/轮询\" )来说效率较低的框架实现异步 "
2620
+ "I/O。"
2607
2621
2608
2622
#: ../../whatsnew/3.5.rst:1766
2609
2623
msgid ""
2610
2624
"A new :meth:`SSLContext.wrap_bio() <ssl.SSLContext.wrap_bio>` method can be "
2611
2625
"used to create a new ``SSLObject`` instance."
2612
2626
msgstr ""
2627
+ "新增的 :meth:`SSLContext.wrap_bio() <ssl.SSLContext.wrap_bio>` 方法可被用于创建新的 "
2628
+ "``SSLObject`` 实例。"
2613
2629
2614
2630
#: ../../whatsnew/3.5.rst:1771
2615
2631
msgid "Application-Layer Protocol Negotiation Support"
@@ -2672,6 +2688,9 @@ msgid ""
2672
2688
" a non-blocking socket if the operation would block. Previously, it would "
2673
2689
"return ``0``. (Contributed by Nikolaus Rath in :issue:`20951`.)"
2674
2690
msgstr ""
2691
+ "现在当操作将要阻塞时 :meth:`SSLSocket.send() <ssl.SSLSocket.send>` 方法将在非阻塞的套接字上引发 "
2692
+ ":exc:`ssl.SSLWantReadError` 或 :exc:`ssl.SSLWantWriteError` 异常。 在之前版本中,它将返回 "
2693
+ "``0``。 (由 Nikolaus Rath 在 :issue:`20951` 中贡献。)"
2675
2694
2676
2695
#: ../../whatsnew/3.5.rst:1805
2677
2696
msgid ""
@@ -2680,6 +2699,8 @@ msgid ""
2680
2699
"value is always an :class:`int`. (Contributed by Akira Li in "
2681
2700
":issue:`19940`.)"
2682
2701
msgstr ""
2702
+ "根据 :rfc:`5280`,现在 :func:`~ssl.cert_time_to_seconds` 函数会将输入的时间解读为 UTC "
2703
+ "而不是本地时间。 此外,其返回值必定为 :class:`int`。 (由 Akira Li 在 :issue:`19940` 中贡献。)"
2683
2704
2684
2705
#: ../../whatsnew/3.5.rst:1809
2685
2706
msgid ""
@@ -3207,6 +3228,9 @@ msgid ""
3207
3228
"significantly faster for searching 1-character substrings. (Contributed by "
3208
3229
"Serhiy Storchaka in :issue:`23573`.)"
3209
3230
msgstr ""
3231
+ "现在字符串方法 :meth:`~str.find`, :meth:`~str.rfind`, :meth:`~str.split`, "
3232
+ ":meth:`~str.partition` 和 :keyword:`in` 字符串运算符在搜索 1 个字符的子字符串时将显著提速。 (由 Serhiy"
3233
+ " Storchaka 在 :issue:`23573` 中贡献。)"
3210
3234
3211
3235
#: ../../whatsnew/3.5.rst:2173
3212
3236
msgid "Build and C API Changes"
0 commit comments