bpo-35568: add 'raise_signal' function (GH-11335)

As in title, expose C `raise` function as `raise_function` in `signal` module. Also drop existing `raise_signal` in `_testcapi` module and replace all usages with new function.


https://bugs.python.org/issue35568
This commit is contained in:
Vladimir Matveev 2019-01-08 01:58:25 -08:00 committed by Miss Islington (bot)
parent e61cc481e0
commit c24c6c2c93
10 changed files with 122 additions and 47 deletions

View file

@ -26,9 +26,8 @@ ROOT_DIR = os.path.join(os.path.dirname(__file__), '..', '..')
ROOT_DIR = os.path.abspath(os.path.normpath(ROOT_DIR))
TEST_INTERRUPTED = textwrap.dedent("""
from signal import SIGINT
from signal import SIGINT, raise_signal
try:
from _testcapi import raise_signal
raise_signal(SIGINT)
except ImportError:
import os