mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +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
|
@ -2,7 +2,7 @@
|
|||
import unittest
|
||||
import collections
|
||||
import sys
|
||||
from test.support import C_RECURSION_LIMIT
|
||||
from test.support import Py_C_RECURSION_LIMIT
|
||||
|
||||
|
||||
class BasicTestMappingProtocol(unittest.TestCase):
|
||||
|
@ -625,7 +625,7 @@ class TestHashMappingProtocol(TestMappingProtocol):
|
|||
|
||||
def test_repr_deep(self):
|
||||
d = self._empty_mapping()
|
||||
for i in range(C_RECURSION_LIMIT + 1):
|
||||
for i in range(Py_C_RECURSION_LIMIT + 1):
|
||||
d0 = d
|
||||
d = self._empty_mapping()
|
||||
d[1] = d0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue