Commit Graph

4729 Commits

Author SHA1 Message Date
Alex Waygood 9fb9a197b5 Add asyncio.base_events.__all__ (#7264) 2022-02-18 17:36:41 -08:00
Alex Waygood ee4ee8bb0f Add asyncio.coroutines.__all__ (#7265) 2022-02-18 17:36:29 -08:00
Alex Waygood ad6982e4b8 Add argparse.__all__ (#7263) 2022-02-18 17:35:27 -08:00
Jukka Lehtosalo 04100b9cec Improve signature of overlaps in ipaddress (#7260)
The `overlaps` method returns False if the version is different:

```
import ipaddress as i
v4=i.IPv4Network('10.0.0.0/8')
v6=i.IPv6Network('2001:db8::2000/124')
print(v6.overlaps(v4))  # False
```
2022-02-18 07:36:07 -08:00
Nikita Sobolev 2ada15c4e4 Use Literal type in msvcrt (#7257) 2022-02-18 01:27:28 -08:00
Guido van Rossum 644d5540bc Tweaks to the TaskGroup API (#7255)
* Remove TaskGroup name arg and get_name() method

(We removed those from the implementation.)

* Add optional name arg to create_task()

See https://github.com/python/cpython/pull/31398
2022-02-17 21:32:37 -08:00
Nikita Sobolev 90bdda8fd9 Remove _NNTPBase from nntplib (#7251) 2022-02-18 00:52:38 +02:00
Alex Waygood 1f6c691322 Add missing dunder overrides in array, tracemalloc and unittest.mock (#7248) 2022-02-17 13:22:33 +01:00
Spencer Brown 5c309e5fe4 Add missing tagOrId parameter to tkinter.Canvas.coords() (#6920) (#7246) 2022-02-17 11:45:31 +02:00
Rogdham 63c20e3ce7 xml: use SupportsRead/SupportsWrite instead of IO (#7241) 2022-02-16 19:02:30 -08:00
Alex Waygood 1091521f60 stdlib: Add several missing __(deep)copy__ methods (#7242) 2022-02-16 18:57:41 -08:00
Alex Waygood d869f2e5a3 Improve ipaddress dunders (#7244) 2022-02-16 18:55:39 -08:00
Guido van Rossum 35bddd289f Add asyncio.taskgroups and new Task methods (#7240)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-02-17 00:32:20 +02:00
Alex Waygood 5a8b9dafb3 Fix various py310 stubtest errors (#7239) 2022-02-16 11:47:49 -08:00
Alex Waygood fef3a71459 poplib.POP3_SSL.stls unconditionally raises an exception (#7191)
Source code here: https://github.com/python/cpython/blob/0ae40191793da1877a12d512f0116d99301b2c51/Lib/poplib.py#L460

We have to keep the method in the stub, as it's overriding a method in the superclass that doesn't unconditionally raise.
2022-02-16 07:02:00 -08:00
Alex Waygood a599af5c74 Make pydoc.Doc an abstract class (#7200) 2022-02-16 07:01:48 -08:00
Alex Waygood 28a760cd2c Improve pyclbr.pyi (#7229) 2022-02-16 07:01:27 -08:00
Alex Waygood fbc279e3f5 stdlib: Add many missing dunder overrides (#7231) 2022-02-16 06:25:47 -08:00
Mateusz Nowak 409beea616 tkinter.simpledialog.ask* functions can return None (#7219) 2022-02-16 12:48:04 +02:00
Nikita Sobolev 1903038adb Backport ossaudiodev availability to @python2 (#7236) 2022-02-16 11:22:51 +01:00
Alex Waygood 3567aaa93f Fix positional-only differences in sqlite3 (#7222) 2022-02-15 13:01:26 -08:00
Alex Waygood 5e8a2a9364 Fix various pos-only stubtest complaints previously allowlisted (#7228) 2022-02-15 17:51:34 +01: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 4ab5033e5b Make mailbox.MailDir abstract (#7201) 2022-02-15 06:47:17 -08:00
Alex Waygood 96b06adf2c Add missing descriptor methods in dataclasses and functools (#7203) 2022-02-15 06:45:49 -08:00
Shantanu feb20fc20a urllib.request: loosen data type (#7211)
Fixes #7208

This is what urllib.request claims to support over here:
https://github.com/python/cpython/blob/ad4e8d2b871c4f5bce27520627bbb2e0e544bc24/Lib/urllib/request.py#L1276

There is additional validation logic (e.g. strs don't work), but a lot
of what determines what works is over here:
https://github.com/python/cpython/blob/ad4e8d2b871c4f5bce27520627bbb2e0e544bc24/Lib/http/client.py#L1039
2022-02-15 06:44:28 -08:00
Alex Waygood e976ee1988 Improve traceback.FrameSummary (#7210) 2022-02-15 06:43:11 -08:00
Alex Waygood 5e7909d9b3 Fix positional-only differences in types (#7220) 2022-02-15 06:27:09 -08:00
Alex Waygood 7595e2e79b Fix positional-only differences in xml (#7225) 2022-02-15 06:22:31 -08:00
Alex Waygood 24cfd431a8 Fix positional-only differences in ctypes (#7223) 2022-02-15 06:22:14 -08:00
Alex Waygood 2f0fac0cd9 Fix positional-only differences in _tkinter (#7224) 2022-02-15 06:21:50 -08:00
Alex Waygood f4967618dd Fix positional-only differences in many stdlib modules (#7226) 2022-02-15 15:14:06 +01:00
Alex Waygood 32e9a0fbc1 Fix positional-only differences in sys (#7221) 2022-02-15 15:12:58 +01:00
Alex Waygood 690975b55d types: Add several missing __(qual)name__ attributes (#7216) 2022-02-15 08:07:39 +01:00
Shantanu a6d9b83263 Add @final to several more stdlib classes (#7215)
Co-authored-by: hauntsaninja <>
2022-02-14 15:12:40 -08:00
Alex Waygood a67c316d08 Add a few missing dunders in builtins (#7214) 2022-02-14 15:07:38 -08:00
Alex Waygood 2878050ffc Add @final to several stdlib classes that cannot be subclassed at runtime (#7213) 2022-02-14 14:46:30 -08:00
Nikita Sobolev 4293ad0483 optparse.check_choice returns value type (#7209) 2022-02-14 14:14:03 -08:00
Alex Waygood a8141e14ae Add itertools.repeat.__length_hint__ method (#7212) 2022-02-14 14:13:13 -08:00
Alex Waygood 11efe034bb collections: Add missing reflected BinOp methods (#7207)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-02-14 13:03:40 -08:00
Alex Waygood 5972da2e2d Add EnumMeta.__bool__ (#7206)
Most Python objects evaluate as falsey if they have length 0, but an enum class is truthy even if it has length 0.

Source code: https://github.com/python/cpython/blob/841c77d802e9ee8845fa3152700474021efe03fd/Lib/enum.py#L353
2022-02-14 13:03:17 -08:00
Nikita Sobolev f03d385012 ossaudiodev is not available on windows and darwin (#7204) 2022-02-14 22:02:38 +01:00
Alex Waygood dea12b2c47 Add missing __isabstractmethods__ attributes in abc and `functools1 (#7205) 2022-02-14 11:20:07 -08:00
Alex Waygood 66a229b709 stdlib: Add several missing comparison methods (#7202) 2022-02-14 11:09:52 -08:00
Alex Waygood f3ad0179f8 Fix return types in codecs (#7199) 2022-02-14 14:03:58 +01:00
Alex Waygood 7682ae957a cmd.Cmd.default returns None, not bool (#7193) 2022-02-14 09:24:29 +01:00
Jelle Zijlstra 319d23a16e Add PEP 646 and 675 to typing-extensions (#7198) 2022-02-14 08:59:11 +01:00
Alex Waygood b0f2bd68b0 Improve tempfile.SpooledTemporaryFile (#7196) 2022-02-13 17:41:54 -08:00
Alex Waygood 65002d2e69 threading: Semaphore.__exit__ & _RLock.__exit__ always return None (#7195)
`_RLock.__exit__`: https://github.com/python/cpython/blob/1d6ce67c29aa2166ef326952cb605b908fb4f987/Lib/threading.py#L199
`Semaphore.__exit__`: https://github.com/python/cpython/blob/1d6ce67c29aa2166ef326952cb605b908fb4f987/Lib/threading.py#L487
2022-02-13 17:41:17 -08:00
Alex Waygood cabfaabd76 optparse.HelpFormatter: format_heading and format_usage are abstract methods (#7194)
The [docstrings state](https://github.com/python/cpython/blob/0ae40191793da1877a12d512f0116d99301b2c51/Lib/optparse.py#L255-L259) "Subclasses must implement", and the [docs for optparse](https://docs.python.org/3/library/optparse.html) explicitly state that `TitledHelpFormatter` and `IndentedHelpFormatter` are provided as "concrete implementations" of `optparse.HelpFormatter`.
2022-02-13 17:41:00 -08:00