This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients pitrou
Date 2021-03-04.21:32:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1614893534.34.0.740829782322.issue43406@roundup.psfhosted.org>
In-reply-to
Content
Here is a reproducer:
https://gist.github.com/pitrou/e5a566e644730516b51de71145c5ea06

If you execute it, it will fail after a few iterations:

sig 2
sig 2
sig 2
Traceback (most recent call last):
  File "/home/antoine/cpython/default/setinterrupt.py", line 30, in <module>
    main()
  File "/home/antoine/cpython/default/setinterrupt.py", line 27, in main
    cycle_handlers(signum)
  File "/home/antoine/cpython/default/setinterrupt.py", line 19, in cycle_handlers
    signal.signal(signum, handler)
  File "/home/antoine/cpython/default/Lib/signal.py", line 48, in signal
    return _int_to_enum(handler, Handlers)
  File "/home/antoine/cpython/default/Lib/signal.py", line 30, in _int_to_enum
    return enum_klass(value)
  File "/home/antoine/cpython/default/Lib/enum.py", line 606, in __call__
    return cls.__new__(cls, value)
  File "/home/antoine/cpython/default/Lib/enum.py", line 927, in __new__
    ve_exc = ValueError("%r is not a valid %s" % (value, cls.__qualname__))
TypeError: 'int' object is not callable
History
Date User Action Args
2021-03-04 21:32:14pitrousetrecipients: + pitrou
2021-03-04 21:32:14pitrousetmessageid: <1614893534.34.0.740829782322.issue43406@roundup.psfhosted.org>
2021-03-04 21:32:14pitroulinkissue43406 messages
2021-03-04 21:32:14pitroucreate