Skip to content

Commit cf75fc3

Browse files
Update the documentation.
1 parent 104dcc2 commit cf75fc3

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

Doc/c-api/init_config.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2098,7 +2098,7 @@ initialization::
20982098
20992099
/* Specify sys.path explicitly */
21002100
/* If you want to modify the default set of paths, finish
2101-
initialization first and then use PySys_GetAttr("path") */
2101+
initialization first and then use PySys_GetAttrString("path") */
21022102
config.module_search_paths_set = 1;
21032103
status = PyWideStringList_Append(&config.module_search_paths,
21042104
L"/path/to/stdlib");

Doc/c-api/sys.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ accessible to C code. They all work with the current interpreter thread's
266266
If the non-existing object should not be treated as a failure, you can use
267267
:c:func:`PySys_GetOptionalAttr` instead.
268268
269-
.. versionadded:: 3.13
269+
.. versionadded:: next
270270
271271
.. c:function:: PyObject *PySys_GetAttrString(const char *name)
272272
@@ -277,7 +277,7 @@ accessible to C code. They all work with the current interpreter thread's
277277
If the non-existing object should not be treated as a failure, you can use
278278
:c:func:`PySys_GetOptionalAttrString` instead.
279279
280-
.. versionadded:: 3.13
280+
.. versionadded:: next
281281
282282
.. c:function:: int PySys_GetOptionalAttr(PyObject *name, PyObject **result);
283283
@@ -291,15 +291,15 @@ accessible to C code. They all work with the current interpreter thread's
291291
If other error occurred, set an exception, set *\*result* to ``NULL`` and
292292
return ``-1``.
293293
294-
.. versionadded:: 3.13
294+
.. versionadded:: next
295295
296296
.. c:function:: int PySys_GetOptionalAttrString(const char *name, PyObject **result);
297297
298298
This is the same as :c:func:`PySys_GetOptionalAttr`, but *name* is
299299
specified as a :c:expr:`const char*` UTF-8 encoded bytes string,
300300
rather than a :c:expr:`PyObject*`.
301301
302-
.. versionadded:: 3.13
302+
.. versionadded:: next
303303
304304
.. c:function:: PyObject *PySys_GetObject(const char *name)
305305

Doc/whatsnew/3.14.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,11 @@ New features
12891289

12901290
(Contributed by Sergey B Kirpichev and Victor Stinner in :gh:`102471`.)
12911291

1292+
* Add :c:func:`PySys_GetAttr`, :c:func:`PySys_GetAttrString`,
1293+
:c:func:`PySys_GetOptionalAttr`, and :c:func:`PySys_GetOptionalAttrString`
1294+
functions as replacements for :c:func:`Pysys_GetObject`.
1295+
(Contributed by Serhiy Storchaka in :gh:`108512`.)
1296+
12921297
* Add :c:func:`PyType_GetBaseByToken` and :c:data:`Py_tp_token` slot for easier
12931298
superclass identification, which attempts to resolve the `type checking issue
12941299
<https://peps.python.org/pep-0630/#type-checking>`__ mentioned in :pep:`630`
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Add private functions :c:func:`PySys_GetAttr`, :c:func:`PySys_GetAttrString`,
1+
Add functions :c:func:`PySys_GetAttr`, :c:func:`PySys_GetAttrString`,
22
:c:func:`PySys_GetOptionalAttr` and :c:func:`PySys_GetOptionalAttrString`.

0 commit comments

Comments
 (0)