]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-104584: Clean up and fix uops tests and fix crash (#106492)
authorGuido van Rossum <guido@python.org>
Thu, 6 Jul 2023 22:45:56 +0000 (15:45 -0700)
committerGitHub <noreply@github.com>
Thu, 6 Jul 2023 22:45:56 +0000 (15:45 -0700)
commit76fac7bce55302a8e9a524d72f5384fd89e6dfde
tree6ecdbd5e8168c24ad71269961ce20469aa091107
parent67a798888dcde13bbb1e17cfcc3c742c94e67a07
gh-104584: Clean up and fix uops tests and fix crash (#106492)

The uops test wasn't testing anything by default,
and was failing when run with -Xuops.

Made the two executor-related context managers global,
so TestUops can use them (notably `with temporary_optimizer(opt)`).

Made clear_executor() a little more thorough.

Fixed a crash upon finalizing a uop optimizer,
by adding a `tp_dealloc` handler.
Lib/test/test_capi/test_misc.py
Python/optimizer.c