Stephen Morton
971f0c64c6
Add xml.__all__, remove import not existing at runtime ( #13048 )
2024-11-20 13:56:44 +01:00
Rebecca Chen
921c65304e
Annotate TypedDict as _SpecialForm rather than object. ( #12985 )
...
* Annotate TypedDict as _SpecialForm rather than object.
Let's see if this works...
* Get typing_extensions.TypedDict as well, try to fix tests.
* Import typing_extensions.TypedDict, delete _SpecialForm.__getitem__.
* Back out deletion of _SpecialForm.__getitem__.
2024-11-19 22:50:42 -08:00
Avasam
4addb8dd0b
setuptools & distutils: more accurate spawn method ( #13036 )
2024-11-19 03:50:38 -08:00
Stephen Morton
3c869a3165
add zipfile._path.__all__ ( #13040 )
2024-11-19 03:49:17 -08:00
Stephen Morton
5903805b91
add email._policybase.__all__ ( #13041 )
...
add email._policybase.__all__
2024-11-19 03:48:55 -08:00
Stephen Morton
9eb54bc710
add importlib.resources.abc.__all__ ( #13039 )
2024-11-19 05:53:43 +01:00
Stephen Morton
6647ae9bc7
improvements for hidden types in the sys module ( #13031 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2024-11-18 22:55:03 +00:00
Stephen Morton
5d859ca366
Add _hashlib module ( #13030 )
2024-11-18 13:08:46 +01:00
Joren Hammudoglu
480b1ac2e6
Only accept type[Self] in the object.__class__ setter ( #13021 )
2024-11-18 12:34:36 +01:00
Stephen Morton
b2c964fdea
Make inheritance and metaclass of ctypes better match reality ( #12982 )
2024-11-18 12:32:20 +01:00
Stephen Morton
780626ee36
Fix webbrowser.MacOSX.__init__ ( #13035 )
2024-11-18 11:10:35 +00:00
Stephen Morton
631c9924cf
improve unexposed zlib types ( #13032 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2024-11-18 07:40:30 +00:00
Stephen Morton
2419d7520b
Improve datetime._IsoCalendarDate ( #13029 )
2024-11-17 18:02:29 +00:00
Stephen Morton
68d05208d4
add _curses_panel module ( #13028 )
2024-11-17 17:52:17 +00:00
Stephen Morton
0231342048
Improve stubs for decimal.DecimalContext ( #13025 )
2024-11-17 00:33:07 +00:00
Stephen Morton
73a55e76be
updates for _dbm._dbm ( #13024 )
2024-11-17 00:26:59 +00:00
Stephen Morton
405b1bdb2f
curses._ncurses_version updates (#13023 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2024-11-16 23:16:34 +00:00
Stephen Morton
2a1a2229cb
mark _codecs.EncodingMap as final ( #13022 )
2024-11-16 23:03:03 +00:00
Stephen Morton
f554f54673
The four protocol-like ABCs outside of collections.abc inherit from ABC directly ( #13005 )
2024-11-16 19:00:39 +01:00
Stephen Morton
7c7629d909
add typing._Final ( #13015 )
...
This is the subset of typing module internal base classes
that are stable over all supported versions of python.
2024-11-16 16:55:38 +01:00
Alex Waygood
6d21e34d78
Improve the definition of os._ScandirIterator ( #13013 )
2024-11-15 21:33:32 +00:00
InSync
986e9e3830
Fraction.__new__ now accepts anything with .as_integer_ratio() (#12994 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2024-11-12 12:57:54 +00:00
Stephen Morton
074cef02a5
add multiprocessing.managers._BaseDictProxy ( #12951 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2024-11-12 12:47:02 +00:00
傅立业(Chris Fu)
94f458f2df
Add trackfd onto mmap.mmap constructor ( #13000 )
2024-11-11 18:32:00 -08:00
Rebecca Chen
ea368c7269
Type __call__ on builtins._NotImplementedType as None. ( #12984 )
...
Currently, this is intentionally incorrectly typed in order to produce a
better mypy error message. But pyright (and presumably other type checkers)
end up just treating instances of _NotImplementedType as callable.
With this change, the mypy error message gets a little worse, but other type
checkers can understand that instances of _NotImplementedType aren't
callable, which I think is an improvement.
2024-11-08 13:05:56 -08:00
Stephen Morton
76537eb81b
BZ2Compressor and BZ2Decompressor live in the _bz2 module ( #12976 )
2024-11-08 17:47:00 +01:00
Stephen Morton
65af6e48b5
LZMADecompressor, LZMACompressor, and LZMAError live in _lzma ( #12977 )
2024-11-08 17:46:29 +01:00
Stephen Morton
460c09d122
add _contextvars for proper naming ( #12981 )
...
On 3.9 and lower, the contextvars types call themselves builtins.*
which we can't and won't match. This improves naming fidelity for
3.10 and newer.
2024-11-08 17:45:59 +01:00
Blaze
30c9af5aaa
Add listener attribute to QueueHandler ( #12986 )
2024-11-08 05:55:03 -08:00
Stephen Morton
27286c6821
Struct class lives in _struct ( #12980 )
...
This one is an improvement on 3.9+. On 3.8, the Struct class
calls itself `builtins.Struct` instead, which we can't and won't
match. `struct.error` is defined in `_struct.c`, but always called
itself `struct.error`.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2024-11-07 20:10:50 -08:00
Stephen Morton
a0165ae31a
add _dbm and _gdbm to align naming of error types with runtime ( #12978 )
2024-11-07 17:21:46 -08:00
Stephen Morton
1c78402e8a
SimpleQueue and Empty live in _queue ( #12979 )
2024-11-07 16:45:54 -08:00
Brian Schubert
951c0b82e8
Update logging.config.fileConfig to accept any Mapping for defaults ( #12973 )
2024-11-07 13:12:24 -08:00
Brian Schubert
dafd67c2cc
Mark OSError.strerror as sometimes None ( #12974 )
2024-11-07 08:08:28 -08:00
Agriya Khetarpal
3d853d5fa8
Improve path-related type hints for setuptools.Extension() and distutils.CCompiler() ( #12958 )
...
Co-authored-by: Avasam <samuel.06@hotmail.com >
2024-11-06 17:51:48 -05:00
Colin Watson
1ae7e615c0
Loosen type of fileobj argument to TarFile.addfile ( #12961 )
...
It only seems to need something it can read bytes from, rather than a
full-fledged `IO[bytes]`.
2024-11-06 06:10:25 -08:00
Stephen Morton
7b68c81f50
move various cases of 'stub does not have *args argument' to "don't fix" ( #12956 )
2024-11-05 07:57:45 +01:00
Brian Schubert
1a1970d950
Update getopt to accept any iterable for longopts ( #12950 )
2024-11-04 22:38:17 +01:00
Stephen Morton
84dfa4a8fc
Fix FileLoader.get_resource_reader signature ( #12946 )
...
Move stubtest allowlist entries to "can't be fixed" section
2024-11-04 16:16:14 +01:00
Stephen Morton
1a4631f0d2
Remove fake base class ipaddress._BaseInterface ( #12949 )
...
Also make hostmask a property to improve stubtest
2024-11-04 15:59:21 +01:00
Stephen Morton
9c8bc640a3
a couple stubtest fixes in multiprocessing ( #12948 )
2024-11-04 06:42:11 -08:00
Stephen Morton
e37ac25928
clean up io methods ( #12947 )
...
fixes for stubtest and default values
2024-11-04 06:39:25 -08:00
Brian Schubert
d262beb075
Fix callback parameter type in ssl.SSLContext.set_psk_server_callback ( #12932 )
2024-10-31 08:04:55 -07:00
Stephen Morton
6029bf1819
inheritance for zipimporter ( #12920 )
2024-10-29 19:47:56 +01:00
Alex Waygood
01e7e80bc7
Add types.ModuleType.__doc__ ( #12918 )
2024-10-29 07:09:47 -07:00
Stephen Morton
0301510114
Naming and inheritance for importlib ( #12775 )
...
This MR breaks out _frozen_importlib_external (which is the same
thing as importlib._bootstrap_external) and _frozen_importlib
(which is the same thing as importlib._bootstrap).
2024-10-29 11:09:00 +01:00
Sam Bull
601ce5a4b0
OSError.errno can be None ( #12910 )
2024-10-27 20:51:23 +00:00
Ekin Dursun
61ba4de28f
Change return type of as_completed in Python 3.13 ( #12912 )
2024-10-27 16:33:35 +00:00
Brian Schubert
efccd7455a
hashlib: fix sha3 and shake hash constructors, remove hash object __init__s ( #12906 )
2024-10-25 07:14:40 -07:00
Tamir Duberstein
fc8bff1b26
Add os.process_cpu_count() for 3.13 ( #12905 )
2024-10-25 06:51:38 -07:00