Eli Skeggs
9965725935
signal: mark sigtimedwait params as positional-only on all versions ( #11658 )
...
At least on Python 3.8.10 and 3.9.18 do not allow keyword arguments.
2024-03-25 22:03:36 -07:00
Shantanu
470a13ab09
Use PEP 570 syntax in stdlib ( #11250 )
2024-03-09 14:50:16 -08:00
Alex Waygood
c49c84f319
A new shade of Black ( #11362 )
2024-02-04 16:38:55 -08:00
Sebastian Rittau
53a8193d64
Update typing_extensions imports in stdlib ( #11244 )
...
Co-authored-by: AlexWaygood <alex.waygood@gmail.com >
2024-01-05 08:15:19 -08:00
Sebastian Rittau
23604858a6
Remove Python 3.7 branches ( #11238 )
2024-01-05 11:39:39 +01:00
Alex Waygood
e4edcf23e0
Fix platform availability of some Unix constants ( #10857 )
2023-10-07 15:05:20 -07:00
Alex Waygood
205cfcfca6
Fix availability of some constants for Windows ( #10818 )
2023-10-01 16:27:55 -07:00
Nikita Sobolev
7cf1fed75d
Fix sigtimedwait and sigwaitinfo signature ( #10803 )
2023-09-29 12:38:14 -07:00
Anton Grübel
53e1b534c7
add signal.SIGSTKFLT on py311+ ( #9870 )
2023-03-12 14:18:23 +00:00
Alex Waygood
53747b264e
Stdlib: add 'obvious' default values ( #9688 )
2023-02-07 13:00:40 +01:00
Alex Waygood
0ef9c3f8e8
Enable flake8-pyi's Y037 ( #9686 )
2023-02-06 19:01:02 -08:00
Nikita Sobolev
f7cb7f33b2
Use OSError instead of IOError ( #9683 )
2023-02-06 18:56:32 +00:00
Jelle Zijlstra
0fc3a567fc
stdlib: add defaults for modules accessible on MacOS ( #9659 )
...
Ran stubdefaulter with standard options on a Mac.
2023-02-01 22:46:55 +00:00
Alex Waygood
edc0ecd857
Remove Python 3.6 branches from typeshed ( #8269 )
2022-07-11 10:55:17 +02:00
Kevin Kirsche
ccdb558af9
fix: Return Never rather than None from signal.default_int_handler ( #8249 )
2022-07-06 11:05:38 -07:00
Alex Waygood
97a74bc1aa
Import from collections.abc wherever possible ( #7635 )
2022-04-18 12:50:37 +02:00
Alex Waygood
740193a8fc
Use TypeAlias where possible for type aliases ( #7630 )
2022-04-15 18:01:00 -07:00
Alex Waygood
414f324083
Add missing __match_args__ attributes to several unix-only structseq classes ( #7587 )
2022-04-04 21:33:49 +01:00
Alex Waygood
3ab250eec8
Use PEP 604 syntax wherever possible ( #7493 )
2022-03-16 16:01:33 +01:00
Martin Fischer
0978ef5c60
stdlib: Add signal.pidfd_send_signal(pidfd, sig)
2022-03-06 15:57:52 -08:00
Alex Waygood
5a8b9dafb3
Fix various py310 stubtest errors ( #7239 )
2022-02-16 11:47:49 -08:00
Sebastian Rittau
92685d18f7
Update to Python 3.9.10 and 3.10.2 ( #6977 )
2022-02-11 17:37:31 -08:00
Shantanu
b88a6f19cd
Upgrade black version ( #7089 )
2022-01-30 16:27:06 -08:00
Alex Waygood
8d5d2520ac
Use PEP 585 syntax wherever possible ( #6717 )
2021-12-28 11:31:43 +01:00
Alex Waygood
0b75d71303
Add a structseq class to _typeshed ( #6560 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-12-17 13:42:09 -08:00
Jens Hedegaard Nielsen
d7263a6dbf
Allow frame to be None in default_int_handler ( #6599 )
2021-12-16 13:40:24 +02:00
Alex Waygood
8a7c23624e
Clean up signal.pyi ( #6504 )
...
This PR proposes purely cosmetic changes to make `signal.pyi` a bit neater.
2021-12-06 09:24:01 +01:00
Alex Waygood
3f316b0ffb
Correct signal.CTRL_C_EVENT and signal.CTRL_BREAK_EVENT ( #6503 )
2021-12-06 00:01:09 +02:00
Alex Waygood
5c8e68f0eb
Use lowercase set, frozenset and deque where possible ( #6346 )
2021-11-19 15:05:45 -08:00
Akuli
994b69ef8f
Use lowercase tuple where possible ( #6170 )
2021-10-14 17:18:19 -07:00
Akuli
ee487304d7
Big diff: Use new "|" union syntax ( #5872 )
2021-08-08 11:05:21 +02:00
Rebecca Turner
72f4057d81
Signal handler callables take int, not Signals ( #5622 )
...
The documentation for [`signal.signal`][1] points out that the current
annotation for signal handlers might be wrong (emphasis my own):
> The handler is called with two arguments: the signal **number** and the
> current stack frame (**`None` or** a frame object; for a description of frame
> objects, see the description in the type hierarchy or see the attribute
> descriptions in the `inspect` module).
And when we use them, we can see that the signal number is passed as an `int`,
not a `signal.Signals` member:
import signal
def handler(signal_number, frame):
print("In signal handler!")
print("Signal number:", signal_number, type(signal_number))
print("Stack frame: ", frame, type(frame))
# Set signal handler:
signal.signal(signal.SIGHUP, handler)
# Use it:
signal.raise_signal(signal.SIGHUP)
Which prints:
In signal handler!
Signal number: 1 <class 'int'>
Stack frame: <frame at 0x7f804402abe0, file '<stdin>', line 12, code <module>> <class 'frame'>
[1]: https://docs.python.org/3/library/signal.html#signal.signal
2021-06-11 20:28:20 +03:00
hatal175
244fc622e6
Add workflow stubtests for macos ( #5384 )
...
* Add macos to stubtest
* Add general darwin stubtest exception file
* Adding exceptions and platform ifs
2021-05-09 23:24:00 +03:00
Ivan Levkivskyi
16ae4c6120
Re-organize directory structure ( #4971 )
...
See discussion in #2491
Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com >
2021-01-27 12:00:39 +00:00