bpo-45256: Don't track the exact depth of each InterpreterFrame (GH-30372)

This commit is contained in:
Brandt Bucher 2022-01-05 03:30:26 -08:00 committed by GitHub
parent cae55542d2
commit 332e6b9725
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 17 deletions

View file

@ -1323,7 +1323,7 @@ class SizeofTest(unittest.TestCase):
def func():
return sys._getframe()
x = func()
check(x, size('3Pi3c8P2iciP'))
check(x, size('3Pi3c8P2ic?P'))
# function
def func(): pass
check(func, size('14Pi'))
@ -1340,7 +1340,7 @@ class SizeofTest(unittest.TestCase):
check(bar, size('PP'))
# generator
def get_gen(): yield 1
check(get_gen(), size('P2P4P4c8P2iciP'))
check(get_gen(), size('P2P4P4c8P2ic?P'))
# iterator
check(iter('abc'), size('lP'))
# callable-iterator