mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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
|
@ -6,7 +6,7 @@ import sys
|
|||
from functools import cmp_to_key
|
||||
|
||||
from test import seq_tests
|
||||
from test.support import ALWAYS_EQ, NEVER_EQ, C_RECURSION_LIMIT
|
||||
from test.support import ALWAYS_EQ, NEVER_EQ, Py_C_RECURSION_LIMIT
|
||||
|
||||
|
||||
class CommonTest(seq_tests.CommonTest):
|
||||
|
@ -61,7 +61,7 @@ class CommonTest(seq_tests.CommonTest):
|
|||
|
||||
def test_repr_deep(self):
|
||||
a = self.type2test([])
|
||||
for i in range(C_RECURSION_LIMIT + 1):
|
||||
for i in range(Py_C_RECURSION_LIMIT + 1):
|
||||
a = self.type2test([a])
|
||||
self.assertRaises(RecursionError, repr, a)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue