Commit Graph
100 Commits
Author SHA1 Message Date
Stephen Morton 0a541ad47f add multi-byte encodings submodules (#13093) 2024-11-25 12:14:59 +01:00
Stephen Morton 37eba41407 Add a bunch of encodings submodules (#13087)
each file in this set is the exact same
2024-11-24 07:56:36 -08:00
Stephen Morton 4059f3edb9 add json.scanner module (#13084) 2024-11-24 07:54:45 -08:00
Stephen MortonandJelle Zijlstra f9475acbe0 clean up ipaddress allowlist entries (#13079)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-11-24 07:54:12 -08:00
Stephen Morton 8a485331c9 address some multiprocessing allowlist entries (#13080) 2024-11-23 16:37:22 -08:00
Stephen Morton 9614cc2d88 Fix some CAPI annotations (#13081) 2024-11-24 00:00:49 +00:00
Stephen Morton 7ab6620c0f fix argument for ctypes.string_at and ctypes.wstring_at (#13075) 2024-11-23 05:11:17 -08:00
Stephen Morton 982fb8358b __reversed__ on dict views (#13073)
KeysView doesn't have __reversed__, but dict_keys does. When this
was added to typeshed, we didn't have dict_keys as a separate type.
2024-11-23 05:09:37 -08:00
Stephen Morton ba9116c684 mark sys.UnraisableHookArgs as type_check_only (#13077)
mark sys.UnraisableHookArgs as type_check_only
2024-11-23 11:16:45 +00:00
Stephen Morton ff75709586 remove duplicate allowlist entry (#13076)
tkinter.Text.count is in both common.txt and py313.txt
2024-11-23 11:03:54 +00:00
Stephen Morton b5ce9c5069 remove duplicate allowlist entry (#13074)
asyncio.base_events.BaseEventLoop.subprocess_exec is in both
common.txt and py310.txt for some reason
2024-11-22 22:26:08 -08:00
Stephen Morton 05b969f975 add missing _ctypes functions (#13067) 2024-11-22 16:07:12 +01:00
Stephen Morton 1af850d2b0 remove _posixsubprocess.cloexec_pipe (#13066)
removed from cpython in 2013...

https://github.com/python/cpython/commit/daf455554bc21b6b5df0a016ab5fa639d36cc595
2024-11-21 19:53:37 -08:00
Stephen Morton bb0e1e2c16 _csv.Reader and _csv.Writer (#13057) 2024-11-21 11:13:53 +01:00
Stephen Morton d84476ca57 add os.__all__ (#13052) 2024-11-21 10:56:21 +01:00
Stephen Morton 32f48a5eae add several NamedTuple base classes (#12987) 2024-11-21 10:52:31 +01:00
Stephen Morton 0fb3a092c7 Miscellaneous type_check_only annotations (#13058) 2024-11-21 08:41:38 +00:00
Stephen Morton ae7f6ea59c clean up allowlist for gevent (#13056) 2024-11-20 19:43:11 -08:00
Stephen Morton fd6f10c8d1 cpython -> CPython (#13050) 2024-11-20 19:51:30 +01:00
Stephen Morton 308a09f056 Clean up/rework socket constants and add __all__ (#13044) 2024-11-20 14:05:11 +01:00
Stephen Morton be624e5124 add email.__all__ (#13047) 2024-11-20 13:57:41 +01:00
Stephen Morton 971f0c64c6 Add xml.__all__, remove import not existing at runtime (#13048) 2024-11-20 13:56:44 +01: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 MortonandAlex Waygood 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
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 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 MortonandAlex Waygood 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
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
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
Stephen Morton f314631fcb remove unused io-related allowlist entries (#12955)
fallout from https://github.com/python/typeshed/pull/12947

fixes https://github.com/python/typeshed/issues/12954
2024-11-04 17:22:08 -08: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
Stephen Morton 6029bf1819 inheritance for zipimporter (#12920) 2024-10-29 19:47:56 +01: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
Stephen Morton 494e832a74 fix up blake2b/blake2s classes (#12878) 2024-10-23 07:14:37 -07:00
Stephen Morton c64f9d065b unnecessary inheritance from ad-hoc protocol (#12882) 2024-10-23 07:11:51 -07:00
Stephen Morton d5fff13c9b add contextlib._GeneratorContextManagerBase (#12885)
Actually putting methods on it may be currently infeasible, but
I don't see why it shouldn't exist at all.
2024-10-23 07:11:06 -07:00
Stephen Morton 4c38695dfd fix inheritance for _interpreters.NotShareableError (#12880)
related to https://github.com/python/typeshed/issues/3968
2024-10-23 06:58:46 -07:00
Stephen Morton d7aa851552 correct inheritance of io.BufferedRandom (#12883) 2024-10-23 06:52:22 -07:00
Stephen Morton 0d95bad46a correct inheritance for io.StringIO (#12884) 2024-10-23 06:48:30 -07:00
Stephen Morton 7417c373ab Remove false inheritance from io.IncrementalNewlineDecoder (#12871) 2024-10-22 11:07:44 +02:00
Stephen Morton e74d9cf9c7 remove unneeded use of AbstractContextManager from multiprocessing.synchronize (#12872) 2024-10-22 10:20:15 +02:00
Stephen Morton e8c2e5bb20 remove redundant inheritance from Iterator for typing.IO (#12870) 2024-10-22 01:29:03 +01:00
Stephen Morton b62579b0d2 swap inheritance order for typing.Sequence (#12869)
This matches the order at runtime.
2024-10-21 22:37:02 +01:00
Stephen Morton 925b3a3713 Remove redundant inheritances from Iterator in builtins (#12851) 2024-10-21 14:40:07 +02:00
Stephen Morton 281dd351a2 Remove redundant inheritances from Iterator in itertools (#12816) 2024-10-18 12:24:01 +02:00
Stephen Morton 56078f574f csv.Dialect doesn't actually subclass _csv.Dialect (#12808)
It does a weird wrapping thing instead:
https://github.com/python/cpython/blob/2a5cdb251674ce8d9a824c102f7cd846d944cfa4/Lib/csv.py#L114
2024-10-16 22:12:47 -07:00
Stephen Morton 2412c7cea6 Remove unneeded Iterable base class from asyncio.Future (#12827) 2024-10-16 22:11:05 -07:00
Stephen Morton aedf65abe9 remove unneeded AsyncIterator base class from asyncio.StreamReader (#12815) 2024-10-15 11:25:40 -07:00
Stephen Morton 816b47c231 remove unneeded Interator base class from sqlite3.Cursor (#12813) 2024-10-15 11:25:21 -07:00
Stephen Morton 1fb6ebf62b Remove redundant inheritances from Iterator (#12814) 2024-10-15 19:17:34 +01:00
Stephen Morton f08d769f7c remove unneeded Iterable base class from CookieJar (#12812) 2024-10-15 19:47:56 +02:00
Stephen Morton a871efd90c remove unecessary Iterable base classes (#12810) 2024-10-15 00:53:35 +01:00
Stephen Morton e7e9c13c1c clean inheritance for OrderedDict related classes (#12809)
Reversible is protocol-like, plus it subclasses dict which is itself
Reversible on all supported python versions now.
2024-10-14 16:05:04 -07:00
Stephen Morton 7b794ef343 remove unneeded fake base classes from mmap.mmap (#12807) 2024-10-14 23:38:35 +01:00
Stephen Morton 16bab543a3 make os._wrap_close not inherit from TextIOWrapper (#12774) 2024-10-14 11:39:30 +02:00
Stephen Morton 03fe755ec1 move _operator classes to operator (#12745) 2024-10-11 14:16:47 +02:00
Stephen Morton f83b6fadbe add _asyncio (#12766)
improves naming and inheritance for asyncio.Future and asyncio.Task

related to https://github.com/python/typeshed/issues/3968
2024-10-09 20:55:28 -07:00
Stephen Morton 42ebc89d8c remove redundant methods from _io classes (#12761) 2024-10-09 20:32:54 -07:00
Stephen Morton 4b6869d572 remove SupportsInt from bases of ipaddress._BaseAddress (#12765)
added in 2017: https://github.com/python/typeshed/pull/1361

This use case no longer requires the protocol to be an actual base
class.
2024-10-09 20:32:06 -07:00
Stephen Morton 2b1c7d55b9 re-sort io classes into _io (#12755)
This version keeps it simple and clean: No changes to class bodies.
The only changes here are moving between files and updating the
naming and inheritance.

Related to #3968 and split from #12740.
2024-10-08 21:32:10 -07:00
Stephen Morton 3e29e05e4a Experiment: remove IntFlag from enum.auto (#12760)
comments in https://github.com/python/typeshed/issues/10384 suggest
that type checkers should special case enum.auto rather than
relying on the IntFlag hack. It's been a while since then, do we
still need it?
2024-10-08 21:24:31 -07:00
Stephen Morton dbd0d35217 add contextlib._BaseExitStack (#12750)
Improves the MRO of ExitStack and AsyncExitStack

related to https://github.com/python/typeshed/issues/3968
2024-10-06 19:08:27 -07:00
Stephen Morton f318894924 update _CursesWindow to the runtime name "window" (#12744)
Prior to 3.8 the underlying C class was not given a name in
python, so typeshed added _CursesWindow to use it as a type.
Now that it has a name in python, typeshed should use that name.

We can keep _CursesWindow as an alias, for anyone using that
already.
2024-10-06 19:04:55 -07:00
Stephen Morton dbc71c9951 re-sort decimal classes (#12743)
They call themselves "decimal.*" at runtime, so move them into
decimal.pyi so typshed's name matches.

related to #3968
2024-10-06 13:19:22 -07:00
Stephen Morton 1a0b507ae7 add unittest.mock.Base to MagicMixin and MagicProxy (#12747)
This matches the runtime.
2024-10-06 13:17:42 -07:00
Stephen Morton f30d367c7a move socket.error classes from _socket to socket (#12746)
They're implemented in C, but consider themselves to live in
socket.
2024-10-05 18:19:34 -07:00
Stephen Morton 77510ae6a4 resort _ast and ast modules (#11162)
The classes imported from the _ast module are defined in C,
but set their __module__ to ast. This arrangement ensures that
the type stubs have the same.

related to https://github.com/python/typeshed/issues/3968
and the discussion in https://github.com/python/typeshed/issues/11141
2024-10-04 17:33:45 -07:00
Stephen Morton 39650b43b5 add _sqlite3 module (#11174)
This aligns with the implementation while giving greater fidelity
to runtime naming and inheritance

Related to https://github.com/python/typeshed/issues/3968 and https://github.com/python/typeshed/issues/11141
2024-10-04 17:28:26 -07:00
Stephen Morton 719ddd1774 move re.error into re.pyi (#11188) 2024-10-02 11:26:44 +02:00
Stephen MortonandJelle Zijlstra 4f37d8fff8 add _ssl module (#11155)
Really all I needed for fixing the inheritance was _ssl._SSLContext.
But then I needed all the other stuff in _ssl, and if I was doing that
I wanted to do a thorough job of it.

Motivation was originally related to https://github.com/python/typeshed/issues/3968 ,
but we're well beyond that now, really.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-10-01 20:10:51 -07:00
Stephen MortonandJelle Zijlstra c43894568f resort weakref classes (#11165)
This improves fidelity of naming and inheritance on 3.11+

related to https://github.com/python/typeshed/issues/3968 and https://github.com/python/typeshed/issues/11141

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-10-01 19:50:10 -07:00
6bc1884577 follow implementation more closely in zoneinfo (#11189)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-10-01 19:49:01 -07:00
Stephen MortonandJelle Zijlstra ddb57608fd move pyexpat.ExpatError to xml.parsers.expat.ExpatError (#11168)
This matches the name reported by the cass at runtime.

related to https://github.com/python/typeshed/issues/11141

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-10-01 18:45:11 -07:00
764532356a add _lsprof module (#11159)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-02-16 08:38:49 -08:00
Stephen Morton 9877ed8092 Various ctypes improvements (#11186)
Mostly more attention paid to which classes are actually the same class
2024-01-30 22:18:00 -08:00
Stephen Morton ad51dde631 add unittest.case._AssertRaisesBaseContext class (#11158) 2023-12-18 23:07:47 +01:00
Stephen Morton f8e738621f add intermediate classes in selectors module (#11164) 2023-12-18 20:22:05 +01:00
Stephen Morton a53bfebb3f add zipfile._path (#11150) 2023-12-18 14:45:20 +01:00
Stephen Morton fd3228a2e2 threading.ThreadError and threading.local are aliases from _thread (#11167) 2023-12-18 14:13:08 +01:00
Stephen Morton 33df486ba2 Allow the use of local-only stubtest allowlists (#11173)
This makes it nicer to work on a local system with known
divergences from the CI environment
2023-12-16 18:43:33 -08:00
Stephen Morton b6740d0bf4 use _compression.BaseStream for lzma.LZMAFile (#11166)
related to https://github.com/python/typeshed/issues/3968
2023-12-15 00:02:05 +00:00
Stephen Morton 92928b5f60 add pyclbr._Object (#11151) 2023-12-12 21:24:27 +01:00
Stephen Morton 1600850258 fix inheritance for urllib.response.addbase (#11152) 2023-12-12 13:03:37 +01:00
Stephen Morton fd558f8acf importlib.abc.Loader moved to importlib._abc.Loader in 3.10 (#11142) 2023-12-11 14:48:58 +01:00
Stephen Morton 695d67cd7b Add deprecation classes in importlib.metadata (#11118) 2023-12-10 21:06:22 +01:00
Stephen Morton d373050dbb Fix importlib.abc.Finder base class, method availability (#11134) 2023-12-10 12:01:44 +01:00