File tree Expand file tree Collapse file tree 4 files changed +11
-6
lines changed Expand file tree Collapse file tree 4 files changed +11
-6
lines changed Original file line number Diff line number Diff 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"); 
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 `
Original file line number Diff line number Diff line change 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 `.
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments