Commit Graph

14 Commits

Author SHA1 Message Date
Changsheng
d1923d153a Mark the return type of signal._HANDLER Any instead of None (#4518)
Closes #4517
2020-09-09 09:45:39 -07:00
Omar Sandoval
7b29927c4b Add missing warn_on_full_buffer argument to signal.set_wakeup_fd() (#4377)
According to
https://docs.python.org/3/library/signal.html#signal.set_wakeup_fd, this
was added in Python 3.7.
2020-07-30 20:52:17 +02:00
Jelle Zijlstra
5d553c9584 apply black and isort (#4287)
* apply black and isort

* move some type ignores
2020-06-28 13:31:00 -07:00
Rune Tynan
a9375cf274 Fix stubtest failures for signal on windows (#4101) 2020-05-27 09:54:37 +02:00
Shantanu
4b007a50b4 signal: improve version availability (#4079)
Co-authored-by: hauntsaninja <>
2020-05-25 15:29:52 -07:00
Shantanu
8aa7f92008 signal: mark positional-only args (#3718) 2020-02-05 16:19:20 +01:00
Shantanu
b25454a76c signal: update for py38 (#3602) 2020-01-10 12:12:08 -08:00
Sebastian Rittau
de26a3d109 Remove raise statements from function bodies (#3355)
While it may eventually be useful to mark the exceptions that can be
raised from a function or method, the semantics are currently undefined
and unclear.
2019-10-13 21:51:43 +02:00
Jelle Zijlstra
d05a9d3d83 Improve enums (#3168)
I realized while working on srittau/type-stub-pep#64 that a
few things we do in existing enum definitions in typeshed are
problematic:

- Using "= ..." doesn't allow type checkers to correctly type the
  result of Enum.MEMBER.value. In fact, mypy at least infers
  .value to be "Ellipsis" if you do this.
- Properties on the enum values themselves, like HTTPStatus.phrase,
  should not be specified directly as attributes, because it makes
  type checkers think that the properties themselves are enum
  members.

I ended up doing a bit more cleanup to the signal module:
- Remove unnecessary ... initializers.
- Remove unnecessary _SIG = Signals alias.
- I don't have Windows to test, but the C code for _signal suggests
  that CTRL_C_EVENT and CTRL_BREAK events are not Signals, but just ints:
  1dbd084f1f/Modules/signalmodule.c (L1575)
2019-08-05 08:08:57 -07:00
Sebastian Rittau
9ccf9356bf Remove Python 3.4 support (#3147)
Closes #3123
2019-07-27 10:58:21 +02:00
Sushain Cherivirala
dc0fcdcaa0 Add missing signals to Py2/3; missing events to Py2; PEP 526 refactoring (fixes #1576) (#2168) 2018-05-27 22:50:10 -07:00
Lukasz Langa
fe0e3744cc Fixing flake8 E261 errors 2016-12-19 22:09:35 -08:00
Samuel Colvin
5161341240 add signal.Signals for python3.5 (#555) 2016-09-22 12:50:27 -07:00
Guido van Rossum
8c2118bace Move contents of builtins/* to stdlib/*. This simplifies finding stubs. 2016-01-12 12:53:18 -08:00