Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyErr_SetInterrupt should have an equivalent that takes a signal number #87522

Closed
pitrou opened this issue Mar 1, 2021 · 2 comments
Closed

PyErr_SetInterrupt should have an equivalent that takes a signal number #87522

pitrou opened this issue Mar 1, 2021 · 2 comments
Labels
3.10 expert-C-API type-feature

Comments

@pitrou
Copy link
Member

@pitrou pitrou commented Mar 1, 2021

BPO 43356
Nosy @pitrou, @vstinner
PRs
  • #24755
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2021-03-11.22:36:13.335>
    created_at = <Date 2021-03-01.17:55:28.246>
    labels = ['expert-C-API', 'type-feature', '3.10']
    title = 'PyErr_SetInterrupt should have an equivalent that takes a signal number'
    updated_at = <Date 2021-03-11.22:36:13.335>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2021-03-11.22:36:13.335>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-03-11.22:36:13.335>
    closer = 'pitrou'
    components = ['C API']
    creation = <Date 2021-03-01.17:55:28.246>
    creator = 'pitrou'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43356
    keywords = ['patch']
    message_count = 2.0
    messages = ['387877', '388527']
    nosy_count = 3.0
    nosy_names = ['pitrou', 'vstinner', 'neologix']
    pr_nums = ['24755']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue43356'
    versions = ['Python 3.10']

    @pitrou
    Copy link
    Member Author

    @pitrou pitrou commented Mar 1, 2021

    PyErr_SetInterrupt() is useful if you want to simulate the effect of a SIGINT.
    It would be helpful to provide a similar primitive for other signal numbers, e.g. PyErr_SetInterruptEx(int signum).

    @pitrou pitrou added 3.10 expert-C-API type-feature labels Mar 1, 2021
    @pitrou
    Copy link
    Member Author

    @pitrou pitrou commented Mar 11, 2021

    New changeset ba251c2 by Antoine Pitrou in branch 'master':
    bpo-43356: Allow passing a signal number to interrupt_main() (GH-24755)
    ba251c2

    @pitrou pitrou closed this as completed Mar 11, 2021
    @pitrou pitrou closed this as completed Mar 11, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 expert-C-API type-feature
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant