@@ -4888,6 +4888,11 @@ msgid ""
4888
4888
"can be used to use these functions with Python 3.11 and 3.12. (Contributed "
4889
4889
"by Victor Stinner in :gh:`107073`.)"
4890
4890
msgstr ""
4891
+ "增加了 :c:func:`PyObject_VisitManagedDict` 和 "
4892
+ ":c:func:`PyObject_ClearManagedDict` 函数。 它们必须由一个使用 "
4893
+ ":c:macro:`Py_TPFLAGS_MANAGED_DICT` 旗标的类型的遍历和清理函数来调用。 `pythoncapi-compat "
4894
+ "project`_ 可被用于在 Python 3.11 和 3.12 中使用这些函数。 (由 Victor Stinner 在 :gh:`107073`"
4895
+ " 中贡献。)"
4891
4896
4892
4897
#: ../../whatsnew/3.13.rst:2205
4893
4898
msgid ""
@@ -4896,13 +4901,18 @@ msgid ""
4896
4901
" way that the :mod:`tracemalloc` module does. (Contributed by Pablo Galindo "
4897
4902
"in :gh:`93502`.)"
4898
4903
msgstr ""
4904
+ "增加了 :c:func:`PyRefTracer_SetTracer` 和 :c:func:`PyRefTracer_GetTracer` "
4905
+ "函数,它们会以与 :mod:`tracemalloc` 模块相同的方式启用对象创建和销毁的追踪。 (由 Pablo Galindo 在 "
4906
+ ":gh:`93502` 中贡献。)"
4899
4907
4900
4908
#: ../../whatsnew/3.13.rst:2211
4901
4909
msgid ""
4902
4910
"Add the :c:func:`PySys_AuditTuple` function as an alternative to "
4903
4911
":c:func:`PySys_Audit` that takes event arguments as a Python :class:`tuple` "
4904
4912
"object. (Contributed by Victor Stinner in :gh:`85283`.)"
4905
4913
msgstr ""
4914
+ "增加 :c:func:`PySys_AuditTuple` 函数作为 :c:func:`PySys_Audit` 的替代,它将接受一个 Python "
4915
+ ":class:`tuple` 对象作为事件参数。 (由 Victor Stinner 在 :gh:`85283` 中贡献。)"
4906
4916
4907
4917
#: ../../whatsnew/3.13.rst:2216
4908
4918
msgid ""
@@ -4911,6 +4921,9 @@ msgid ""
4911
4921
"error if it is ``NULL``. The caller is responsible for checking if the "
4912
4922
"result is ``NULL``. (Contributed by Victor Stinner in :gh:`108867`.)"
4913
4923
msgstr ""
4924
+ "增加 :c:func:`PyThreadState_GetUnchecked()` 函数作为 :c:func:`PyThreadState_Get()`"
4925
+ " 的替代,它在结果为 ``NULL`` 时不会杀死进程并报告致命错误。 调用方要负责检查结果是否为 ``NULL``。 (由 Victor "
4926
+ "Stinner 在 :gh:`108867` 中贡献。).)"
4914
4927
4915
4928
#: ../../whatsnew/3.13.rst:2222
4916
4929
msgid ""
@@ -4920,6 +4933,9 @@ msgid ""
4920
4933
"``'builtins'`` or ``'__main__'``. (Contributed by Victor Stinner in "
4921
4934
":gh:`111696`.)"
4922
4935
msgstr ""
4936
+ "增加 :c:func:`PyType_GetFullyQualifiedName` 函数用来获取类型的完整限定名称。 如果 "
4937
+ ":attr:`type.__module__` 是一个字符串且不等于 ``'builtins'`` 或 ``'__main__'`` "
4938
+ "则会在开头添加模块名称。 (由 Victor Stinner 在 :gh:`111696` 中贡献。)"
4923
4939
4924
4940
#: ../../whatsnew/3.13.rst:2228
4925
4941
msgid ""
@@ -5010,19 +5026,31 @@ msgid ""
5010
5026
":c:macro:`PY_CXX_CONST` macro. (Contributed by Serhiy Storchaka in "
5011
5027
":gh:`65210`.)"
5012
5028
msgstr ""
5029
+ "现在 :c:func:`PyArg_ParseTupleAndKeywords` 和 "
5030
+ ":c:func:`PyArg_VaParseTupleAndKeywords` 的 *keywords* 形参类型在 C 中为 "
5031
+ ":c:expr:`char * const *` 而在 C++ 中为 :c:expr:`const char * const *`,而不是 "
5032
+ ":c:expr:`char **`。 在 C++ 中,这将使这些函数与类型为 :c:expr:`const char * const *`, "
5033
+ ":c:expr:`const char **` 或 :c:expr:`char * const *` 的参数保持兼容而不必使用显式的类型转换。 在 C "
5034
+ "中,这些函数仅支持类型为 :c:expr:`char * const *` 的参数。 这可以通过 :c:macro:`PY_CXX_CONST` "
5035
+ "宏来覆盖。 (由 Serhiy Storchaka 在 :gh:`65210` 中贡献。).)"
5013
5036
5014
5037
#: ../../whatsnew/3.13.rst:2276
5015
5038
msgid ""
5016
5039
":c:func:`PyArg_ParseTupleAndKeywords` now supports non-ASCII keyword "
5017
5040
"parameter names. (Contributed by Serhiy Storchaka in :gh:`110815`.)"
5018
5041
msgstr ""
5042
+ "现在 :c:func:`PyArg_ParseTupleAndKeywords` 支持非 ASCII 关键字形参名称。 (由 Serhiy "
5043
+ "Storchaka 在 :gh:`110815` 中贡献。)"
5019
5044
5020
5045
#: ../../whatsnew/3.13.rst:2280
5021
5046
msgid ""
5022
5047
"The :c:func:`!PyCode_GetFirstFree` function is now unstable API and is now "
5023
5048
"named :c:func:`PyUnstable_Code_GetFirstFree`. (Contributed by Bogdan "
5024
5049
"Romanyuk in :gh:`115781`.)"
5025
5050
msgstr ""
5051
+ "现在 :c:func:`!PyCode_GetFirstFree` 函数属于非稳定 API 并被命名为 "
5052
+ ":c:func:`PyUnstable_Code_GetFirstFree`。 (由 Bogdan Romanyuk 在 :gh:`115781` "
5053
+ "中贡献。)"
5026
5054
5027
5055
#: ../../whatsnew/3.13.rst:2284
5028
5056
msgid ""
@@ -5035,6 +5063,12 @@ msgid ""
5035
5063
"recommended in the documentation. (Contributed by Serhiy Storchaka in "
5036
5064
":gh:`106672`.)"
5037
5065
msgstr ""
5066
+ "现在当调用 :c:func:`PyDict_GetItem`, :c:func:`PyDict_GetItemString`, "
5067
+ ":c:func:`PyMapping_HasKey`, :c:func:`PyMapping_HasKeyString`, "
5068
+ ":c:func:`PyObject_HasAttr`, :c:func:`PyObject_HasAttrString` 和 "
5069
+ ":c:func:`PySys_GetObject` 等函数时如果使用 :func:`sys.unraisablehook` "
5070
+ "报告这些错误它们将清空所有已发生的错误。 你可以用本文档中推荐的其他函数来替换它们。 (由 Serhiy Storchaka 在 "
5071
+ ":gh:`106672` 中贡献。)"
5038
5072
5039
5073
#: ../../whatsnew/3.13.rst:2293
5040
5074
msgid ""
@@ -5153,6 +5187,9 @@ msgid ""
5153
5187
"to request a public C API and add ``cc: @vstinner`` to the issue to notify "
5154
5188
"Victor Stinner. (Contributed by Victor Stinner in :gh:`106320`.)"
5155
5189
msgstr ""
5190
+ "移除了一些名称带有 ``_Py`` 或 ``_PY`` 前缀(即被视为私有)的函数、宏和变量。 如果你的项目受到了此项修改的影响并且你认为这些被移除的 "
5191
+ "API 应当保持可用,请 :ref:`发起一个新事项 <using-the-tracker>` 以请求提供公有 C API 并向该事项添加 ``cc: "
5192
+ "@vstinner`` 来通知 Victor Stinner。 (由 Victor Stinner 在 :gh:`106320` 中贡献。)"
5156
5193
5157
5194
#: ../../whatsnew/3.13.rst:2348
5158
5195
msgid ""
@@ -6159,6 +6196,9 @@ msgid ""
6159
6196
"also the ``HAVE_IEEEFP_H`` macro. (Contributed by Victor Stinner in "
6160
6197
":gh:`108765`.)"
6161
6198
msgstr ""
6199
+ "``Python.h`` 不再包括 ``<ieeefp.h>`` 标准头文件。 它曾经为了 :c:func:`!finite` "
6200
+ "函数被包括,该函数现在是由 ``<math.h>`` 头文件提供的。 现在如有必要应当显式地包括它。 此外还移除了 ``HAVE_IEEEFP_H`` "
6201
+ "宏。 (由 Victor Stinner 在 :gh:`108765` 中贡献。)"
6162
6202
6163
6203
#: ../../whatsnew/3.13.rst:2685
6164
6204
msgid ""
0 commit comments