Skip to content

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Aug 25, 2018

These singletons are no longer integers.
They are now copyable and pickleable and have docstrings.

https://bugs.python.org/issue23325

These singletons are no longer integers.
They are now copyable and pickleable and have docstrings.
@pppery
Copy link

pppery commented Aug 31, 2018

Why should SIG_IGN raise an error when called instead of doing nothing, which is what happens when SIG_IGN is actually supplied as a signal handler?

@serhiy-storchaka
Copy link
Member Author

Why should SIG_IGN raise an error when called instead of doing nothing, which is what happens when SIG_IGN is actually supplied as a signal handler?

Because currently calling SIG_IGN() raises a TypeError. But I agree, we can make it callable.

@pitrou
Copy link
Member

pitrou commented Mar 4, 2021

Hmm, the problem is this will break code such as:

handler = signal.getsignal(signum)
if callable(handler):
   # Do something, e.g. call the handler

Copy link
Member

@iritkatriel iritkatriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has merge conflicts now.

@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@encukou
Copy link
Member

encukou commented Mar 25, 2024

Victor closed the issue, so I'll close the PR too.
They can be reopened together.

@encukou encukou closed this Mar 25, 2024
@serhiy-storchaka serhiy-storchaka deleted the signal-std-handlers branch March 26, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting changes type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants