bpo-39947: Move get_recursion_depth() to _testinternalcapi (GH-18974)

Move get_recursion_depth() function from _testcapi to
_testinternalcapi to avoid accessing PyThreadState attributes
directly in _testcapi.
This commit is contained in:
Victor Stinner 2020-03-13 13:07:31 +01:00 committed by GitHub
parent 224481a8c9
commit 3f2f4fefca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 16 deletions

View file

@ -994,7 +994,7 @@ class ExceptionTests(unittest.TestCase):
# finalization of these locals.
code = """if 1:
import sys
from _testcapi import get_recursion_depth
from _testinternalcapi import get_recursion_depth
class MyException(Exception): pass