@@ -3471,6 +3471,9 @@ msgid ""
3471
3471
"positional-only in Python 3.15. (Contributed by Erlend E. Aasland in "
3472
3472
":gh:`108278`.)"
3473
3473
msgstr ""
3474
+ "弃用将名称、参数数量和可调用对象作为 :meth:`.Connection.create_function` 和 "
3475
+ ":meth:`.Connection.create_aggregate` 的关键字参数传入的做法。 这些形参在 Python 3.15 "
3476
+ "中将成为仅限位置形参。 (由 Erlend E. Aasland 在 :gh:`108278` 中贡献。)"
3474
3477
3475
3478
#: ../../whatsnew/3.13.rst:1945
3476
3479
msgid ""
@@ -3481,6 +3484,11 @@ msgid ""
3481
3484
"methods. The callback callables will become positional-only in Python 3.15. "
3482
3485
"(Contributed by Erlend E. Aasland in :gh:`108278`.)"
3483
3486
msgstr ""
3487
+ "弃用将 callback 可调用对象作为 :meth:`~sqlite3.Connection.set_authorizer`, "
3488
+ ":meth:`~sqlite3.Connection.set_progress_handler` 和 "
3489
+ ":meth:`~sqlite3.Connection.set_trace_callback` 等 "
3490
+ ":class:`~sqlite3.Connection` 方法的关键字参数传入的做法。 callback 可调用对象在 Python 3.15 "
3491
+ "中将成为仅限位置参数。 (由 Erlend E. Aasland 在 :gh:`108278` 中贡献。)"
3484
3492
3485
3493
#: ../../whatsnew/3.13.rst:1953
3486
3494
#: ../../deprecations/pending-removal-in-3.16.rst:47
@@ -3582,6 +3590,10 @@ msgid ""
3582
3590
"and :class:`~wave.Wave_write` classes, to be removed in Python 3.15. "
3583
3591
"(Contributed by Victor Stinner in :gh:`105096`.)"
3584
3592
msgstr ""
3593
+ "弃用 :class:`~wave.Wave_read` 和 :class:`~wave.Wave_write` 类的 "
3594
+ ":meth:`~wave.Wave_read.getmark`, :meth:`!setmark` 和 "
3595
+ ":meth:`~wave.Wave_read.getmarkers` 方法,将在 Python 3.15 中移除。 (由 Victor Stinner "
3596
+ "在 :gh:`105096` 中贡献。)"
3585
3597
3586
3598
#: ../../deprecations/c-api-pending-removal-in-3.14.rst:2
3587
3599
#: ../../deprecations/pending-removal-in-3.14.rst:2
@@ -4849,6 +4861,9 @@ msgid ""
4849
4861
"``0`` otherwise. These functions do not raise exceptions. (Contributed by "
4850
4862
"Serhiy Storchaka in :gh:`110289`.)"
4851
4863
msgstr ""
4864
+ "添加了 :c:func:`PyUnicode_EqualToUTF8AndSize` 和 :c:func:`PyUnicode_EqualToUTF8`"
4865
+ " 函数以将 Unicode 对象与 :c:expr:`const char*` UTF-8 编码的字符串进行比较并在它们相等时返回 ``1`` 否则返回"
4866
+ " ``0``。 这些函数不会引发异常。 (由 Serhiy Storchaka 在 :gh:`110289` 中贡献。)"
4852
4867
4853
4868
#: ../../whatsnew/3.13.rst:2240
4854
4869
msgid ""
@@ -5094,12 +5109,21 @@ msgid ""
5094
5109
"// You may need to cast buf as `(const char*)view.buf`.\n"
5095
5110
"PyBuffer_Release(&view);"
5096
5111
msgstr ""
5112
+ "Py_buffer view;\n"
5113
+ "if (PyObject_GetBuffer(obj, &view, PyBUF_SIMPLE) < 0) {\n"
5114
+ " return NULL;\n"
5115
+ "}\n"
5116
+ "// 使用 `view.buf` 和 `view.len` 从缓冲区读取。\n"
5117
+ "// 你可能需要将 buf 转换为 `(const char*)view.buf`。\n"
5118
+ "PyBuffer_Release(&view);"
5097
5119
5098
5120
#: ../../whatsnew/3.13.rst:2372
5099
5121
msgid ""
5100
5122
":c:func:`!PyObject_AsWriteBuffer`: Use :c:func:`PyObject_GetBuffer` and "
5101
5123
":c:func:`PyBuffer_Release` instead:"
5102
5124
msgstr ""
5125
+ ":c:func:`!PyObject_AsWriteBuffer`: 改用 :c:func:`PyObject_GetBuffer` 和 "
5126
+ ":c:func:`PyBuffer_Release`:"
5103
5127
5104
5128
#: ../../whatsnew/3.13.rst:2375
5105
5129
msgid ""
@@ -5110,6 +5134,12 @@ msgid ""
5110
5134
"// Use `view.buf` and `view.len` to write to the buffer.\n"
5111
5135
"PyBuffer_Release(&view);"
5112
5136
msgstr ""
5137
+ "Py_buffer view;\n"
5138
+ "if (PyObject_GetBuffer(obj, &view, PyBUF_WRITABLE) < 0) {\n"
5139
+ " return NULL;\n"
5140
+ "}\n"
5141
+ "// 使用 `view.buf` 和 `view.len` 向缓冲区写入。\n"
5142
+ "PyBuffer_Release(&view);"
5113
5143
5114
5144
#: ../../whatsnew/3.13.rst:2384
5115
5145
msgid "(Contributed by Inada Naoki in :gh:`85275`.)"
@@ -5283,12 +5313,16 @@ msgid ""
5283
5313
"Remove the ``cpython/pytime.h`` header file, which only contained private "
5284
5314
"functions. (Contributed by Victor Stinner in :gh:`106316`.)"
5285
5315
msgstr ""
5316
+ "移除了 ``cpython/pytime.h`` 头文件,它仅包含私有函数。 (由 Victor Stinner 在 :gh:`106316` "
5317
+ "中贡献。)"
5286
5318
5287
5319
#: ../../whatsnew/3.13.rst:2471
5288
5320
msgid ""
5289
5321
"Remove the undocumented ``PY_TIMEOUT_MAX`` constant from the limited C API. "
5290
5322
"(Contributed by Victor Stinner in :gh:`110014`.)"
5291
5323
msgstr ""
5324
+ "从受限 C API 移除了未写入文档的 ``PY_TIMEOUT_MAX`` 常量。 (由 Victor Stinner 在 :gh:`110014` "
5325
+ "中贡献。)"
5292
5326
5293
5327
#: ../../whatsnew/3.13.rst:2474
5294
5328
msgid ""
@@ -5297,6 +5331,9 @@ msgid ""
5297
5331
"``Py_TRASHCAN_BEGIN`` and ``Py_TRASHCAN_END``. (Contributed by Irit Katriel "
5298
5332
"in :gh:`105111`.)"
5299
5333
msgstr ""
5334
+ "移除了旧的 trashcan 宏 ``Py_TRASHCAN_SAFE_BEGIN`` 和 ``Py_TRASHCAN_SAFE_END``。 "
5335
+ "将两者替换为新的宏 ``Py_TRASHCAN_BEGIN`` 和 ``Py_TRASHCAN_END``。 (由 Irit Katriel 在 "
5336
+ ":gh:`105111` 中贡献。)"
5300
5337
5301
5338
#: ../../whatsnew/3.13.rst:2481
5302
5339
msgid "Deprecated C APIs"
@@ -5862,6 +5899,8 @@ msgid ""
5862
5899
"flags. For example, the free-threaded build generates ``python-3.13t.pc`` "
5863
5900
"and the debug build generates ``python-3.13d.pc``."
5864
5901
msgstr ""
5902
+ "在 POSIX 系统上,pkg-config (``.pc``) 文件名现在会包括 ABI 旗标。 例如,自由线程构建版将生成 "
5903
+ "``python-3.13t.pc`` 而调试构建版将生成 ``python-3.13d.pc``。"
5865
5904
5866
5905
#: ../../whatsnew/3.13.rst:2596
5867
5906
msgid ""
@@ -6062,7 +6101,7 @@ msgstr ""
6062
6101
6063
6102
#: ../../whatsnew/3.13.rst:2709
6064
6103
msgid "A ``tp_dealloc`` function that has the old macros, such as::"
6065
- msgstr ""
6104
+ msgstr "带有旧版宏的 ``tp_dealloc`` 函数,例如:: "
6066
6105
6067
6106
#: ../../whatsnew/3.13.rst:2711
6068
6107
msgid ""
@@ -6268,7 +6307,7 @@ msgstr "``_Py_IsFinalizing()``::c:func:`Py_IsFinalizing`。"
6268
6307
msgid ""
6269
6308
"The `pythoncapi-compat project`_ can be used to get most of these new "
6270
6309
"functions on Python 3.12 and older."
6271
- msgstr ""
6310
+ msgstr "在 Python 3.12 和更旧的版本中可以使用 `pythoncapi-compat project`_ 来充分利用这些新函数。 "
6272
6311
6273
6312
#: ../../whatsnew/3.13.rst:2798
6274
6313
msgid "Regression Test Changes"
@@ -6296,3 +6335,5 @@ msgid ""
6296
6335
"only exists in specialized builds of Python, may now return objects from "
6297
6336
"other interpreters than the one it's called in."
6298
6337
msgstr ""
6338
+ "之前未写入文档的特殊函数 :func:`sys.getobjects`,它仅存在于某些专用的 Python "
6339
+ "构建版,现在可以从其他解释器而非调用它的解释器返回对象。"
0 commit comments