Max Muoto
f698bb67fa
Fix threading.pyi issues ( #12304 )
2024-07-09 22:44:55 -07:00
Shantanu
ac38fce019
threading: add new lock methods ( #11964 )
2024-05-18 16:55:42 -04: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
Stephen Morton
fd3228a2e2
threading.ThreadError and threading.local are aliases from _thread ( #11167 )
2023-12-18 14:13:08 +01:00
Nikita Sobolev
185faf00cd
Update threading for py312 ( #10241 )
...
Add `setprofile_all_threads` and `settrace_all_threads`
2023-06-02 16:27:54 +01:00
Alex Waygood
dd2818a41d
Stdlib: add container default values ( #9909 )
2023-03-21 09:12:34 +01:00
Nikita Sobolev
1387a9efa9
Mark threading.(R)Lock as final ( #9753 )
...
These are actually factory functions: 128379b8cd/Lib/threading.py (L108)
The pure-Python version of `RLock` is, strictly-speaking, subclassable. But you're not *meant* to subclass `RLock`, even if you *can* with the pure-Python version: https://discuss.python.org/t/make-threading-lock-rlock-factory-functions-subclassable/24008/2
2023-02-19 12:21:55 +00:00
Jelle Zijlstra
ddfaca3200
stdlib: add argument default values ( #9501 )
2023-01-18 09:37:34 +01:00
Nikita Sobolev
380022c650
Remove empty __init__ methods ( #8816 )
2022-09-30 13:08:41 +01:00
Alex Waygood
e2ce7c6344
stdlib: audit more callback annotations ( #8209 )
2022-07-19 07:07:25 -07:00
Jelle Zijlstra
55562b83a1
threading: __exit__ only returns None ( #8298 )
...
Fixes #8297
`threading.Lock.__exit__` is implemented in C and can only return None: 6cbb57f62d/Modules/_threadmodule.c (L200)
`threading.Condition.__exit__` returns whatever its lock's `__exit__` returns, but our type annotations indicate that the lock is always a `Lock` or an `_RLock`, and neither returns anything other than None.
2022-07-14 20:00:08 -07:00
Alex Waygood
8b3b6bf7cd
stdlib: Audit Callable[<parameters>, None] annotations ( #8187 )
2022-06-27 08:08:28 +02:00
Oleg Höfling
8bb18aa541
add undocumented attributes for threading.Timer ( #8059 )
2022-06-12 20:34:56 +03:00
Alex Waygood
591593c85f
Simplify __all__ for modules beginning with 'm' to 't' ( #8028 )
2022-06-07 20:14:15 +01:00
Shantanu
c8f9abf41d
threading.Semaphore: add _value ( #7952 )
...
I've had occasion to use this multiple times. We already have _value for
asyncio.locks.Semaphore See also
https://github.com/python/cpython/issues/93213
Co-authored-by: hauntsaninja <>
2022-05-25 14:24:09 -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
3ab250eec8
Use PEP 604 syntax wherever possible ( #7493 )
2022-03-16 16:01:33 +01:00
Alex Waygood
f4ae363b56
stdlib: correct many pos-or-kw arg names in dunder methods ( #7451 )
2022-03-07 16:40:03 +01:00
eggplants
342e384fb1
Add threading._profile_hook ( #7427 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-03-02 23:47:02 +02:00
Alex Waygood
a0b41959ec
stdlib: fix many attributes which are read-only at runtime but read-write in the stub ( #7395 )
2022-02-27 16:23:09 -08:00
Alex Waygood
1317fa7af9
Fix positional-only differences in threading.local ( #7227 )
...
Last one of these, I think.
2022-02-15 07:16:20 -08:00
Alex Waygood
65002d2e69
threading: Semaphore.__exit__ & _RLock.__exit__ always return None (#7195 )
...
`_RLock.__exit__`: 1d6ce67c29/Lib/threading.py (L199)
`Semaphore.__exit__`: 1d6ce67c29/Lib/threading.py (L487)
2022-02-13 17:41:17 -08:00
Alex Waygood
348c38a0dd
Improve __all__ definitions for threading and _dummy_threading modules ( #7135 )
2022-02-05 08:07:02 -08:00
Shantanu
b88a6f19cd
Upgrade black version ( #7089 )
2022-01-30 16:27:06 -08:00
Alex Waygood
a40d79a4e6
Use lowercase type everywhere ( #6853 )
2022-01-08 16:09:29 +01:00
Alex Waygood
505ea72641
Never explicitly inherit from object in Python 3-only stubs ( #6777 )
2022-01-02 07:24:48 +01:00
Alex Waygood
a69ef8f1ad
Clean up threading.pyi ( #6525 )
...
- Adds comments to aliases in the `threading` module to indicate that they're deprecated.
- Adds two missing aliases, for consistency.
- Closes #6494
2021-12-06 16:21:27 -08:00
Shantanu
0bad0691be
threading: fixes for _DummyThread and _RLock ( #6437 )
...
Co-authored-by: hauntsaninja <>
2021-11-28 20:11:54 -08:00
Alex Waygood
9d57201d8b
threading: add gettrace and getprofile functions ( #6407 )
...
Added in https://bugs.python.org/issue42251
2021-11-27 21:13:44 -08:00
Akuli
ce11072dbe
Big diff: use lower-case list and dict ( #5888 )
2021-08-08 09:26:35 -07:00
Akuli
ee487304d7
Big diff: Use new "|" union syntax ( #5872 )
2021-08-08 11:05:21 +02:00
Sebastian Rittau
6a9c89e928
Replace 'Text' with 'str' in py3 stdlib ( #5466 )
2021-05-16 07:10:48 -07:00
Akuli
17dcea4a68
Akuli and srittau: Remove Python 2 branches from Python 3 stubs ( #5461 )
...
* run script and do some manual changes (Akuli)
* do the whole thing manually (srittau)
* merge changes (Akuli)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
2021-05-15 15:33:39 +03:00
hatal175
c9d996fe55
Various stubtest exceptions ( #5227 )
2021-04-17 07:03:28 -07: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