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 Morton and Jelle 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 Morton and Jelle 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 Morton and Jelle 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
Stephen Morton
45b1db9f8e
use _LoopBoundMixin in asyncio when appropriate ( #11127 )
...
related to https://github.com/python/typeshed/issues/3968
2023-12-09 20:36:34 -08:00
Stephen Morton
6b9f82d2e1
make pointer types in ctypes.wintypes subclasses instead of aliases ( #11126 )
...
related to https://github.com/python/typeshed/issues/3968
2023-12-09 20:34:22 -08:00