mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	GH-91079: Rename C_RECURSION_LIMIT to Py_C_RECURSION_LIMIT (#108507)
Symbols of the C API should be prefixed by "Py_" to avoid conflict with existing names in 3rd party C extensions on "#include <Python.h>". test.pythoninfo now logs Py_C_RECURSION_LIMIT constant and other _testcapi and _testinternalcapi constants.
This commit is contained in:
		
							parent
							
								
									15d4c9fabc
								
							
						
					
					
						commit
						b0edf3b98e
					
				
					 17 changed files with 67 additions and 39 deletions
				
			
		|  | @ -1,7 +1,7 @@ | |||
| import collections.abc | ||||
| import types | ||||
| import unittest | ||||
| from test.support import C_RECURSION_LIMIT | ||||
| from test.support import Py_C_RECURSION_LIMIT | ||||
| 
 | ||||
| class TestExceptionGroupTypeHierarchy(unittest.TestCase): | ||||
|     def test_exception_group_types(self): | ||||
|  | @ -460,7 +460,7 @@ def test_basics_split_by_predicate__match(self): | |||
| class DeepRecursionInSplitAndSubgroup(unittest.TestCase): | ||||
|     def make_deep_eg(self): | ||||
|         e = TypeError(1) | ||||
|         for i in range(C_RECURSION_LIMIT + 1): | ||||
|         for i in range(Py_C_RECURSION_LIMIT + 1): | ||||
|             e = ExceptionGroup('eg', [e]) | ||||
|         return e | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner