Shantanu
ba998cd5f9
multiprocessing.pool: fix __init__ methods ( #5833 )
...
Co-authored-by: hauntsaninja <>
2021-08-28 12:04:08 -07:00
Anton Grübel
ac2ef6e8c9
Use paramspec in no_type_check_decorator ( #5942 )
2021-08-26 22:46:27 +03:00
Jon Dufresne
ac39a73d38
Add type for undocumented copyreg.dispatch_table ( #5959 )
2021-08-26 00:59:23 +02:00
Anders Kaseorg
65a88ace0a
Add email.message.Message.__iter__ ( #5960 )
...
Signed-off-by: Anders Kaseorg <andersk@mit.edu >
2021-08-25 22:43:20 +02:00
Oleg Höfling
a74624d31b
Introduce generic logger type in loggeradapter ( #5954 )
2021-08-25 05:45:56 -07:00
Ruben Opdebeeck
e567af01e5
Fix collections.UserString __reversed__ and __iter__ ( #5958 )
2021-08-25 15:27:20 +03:00
Alex Nelson
d34d047002
Add DOOR, PORT, and WHT type signatures for stat module ( #5955 )
...
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov >
2021-08-24 21:22:24 +02:00
Anton Grübel
29c63e0d9c
add ParamSpec to importlib.util ( #5944 )
2021-08-21 08:24:25 -07:00
Anton Grübel
2f499c7e90
add ParamSpec to trace.runfunc ( #5940 )
2021-08-20 10:46:34 +02:00
Niklas Gustafsson
918c7d0b84
Add ZipInfo type hint to members argument of ZipFile.extractall ( #5936 )
2021-08-20 10:43:45 +02:00
Anton Grübel
c54909ab69
Use ParamSpec for unittest.signals.removeHandler() ( #5905 )
2021-08-19 18:32:24 +02:00
wouter bolsterlee
757d962237
Improve ssl module annotations ( #5934 )
...
This improves the type annotations for the ‘ssl’ module:
- Various APIs taking file names (e.g. keyfile=, certfile=, cafile=,
capath=, ...) were annotated as accepting only strings, while actually
they accept str, bytes, and os.PathLike (such as pathlib.Path).
CPython's _ssl.c module has always used PyUnicode_FSConverter to
handle (normalize) these. Change the annotations accordingly using the
internal _typeshed.StrOrBytesPath alias.
- Tighten the ‘purpose=’ argument in various functions to use the
already defined ‘Purpose’ enum instead of accepting ‘Any’.
2021-08-18 08:23:31 -07:00
Nathan Naze
34b3f0bf7c
Add missing attributes to IncompleteRead ( #5933 )
2021-08-17 21:27:09 -07:00
Jeremy Nation
0e62c8ab06
Add missing stub for _CursesWindow.noutrefresh ( #5928 )
2021-08-14 23:55:43 +02:00
Oleg Höfling
ff63953188
Switch to PEP-604 syntax in python2 stubs ( #5915 )
...
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com >
2021-08-14 11:12:30 +02:00
Rebecca Chen
431c4f7fc1
Improve a few types in xml.dom.minidom. ( #5923 )
...
* Changes the return type of getDOMImplementation from implicit Any to
DOMImplementation | None.
* DOMImplementation.createDocument() and createDocumentType() allow None for all arguments.
2021-08-13 23:28:47 +02:00
Rebecca Chen
774da45449
Add some missing properties to xml.dom.minidom.Node. ( #5919 )
2021-08-13 21:57:22 +02:00
jack1142
e415a7fad8
Make ChainMap's new_child() and parents return subclass ( #5922 )
2021-08-13 19:30:48 +02:00
Gabe Joseph
92aecadf6b
Memoryview.cast: shape= can be tuple of any number of ints (#5918 )
2021-08-13 00:04:35 +02:00
Anton Grübel
ae86a93f45
add ParamSpec to atexit ( #5896 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2021-08-11 20:49:30 -07:00
Oleg Höfling
64f481189f
drop ellipsis assignments from module vars, classvars and instance attrs ( #5914 )
...
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com >
2021-08-11 19:26:58 +02:00
Sténio Jacinto
32a6257de0
Add missing stdlib xml stubs ( #5895 )
2021-08-09 22:41:55 +02:00
Akuli
9af9cca7f3
lowercase list and dict in the rest of stdlib ( #5892 )
2021-08-09 00:13:08 +02:00
Bas van Beek
7edad1034e
Use a typevar in object.__new__ ( #5891 )
2021-08-08 20:45:22 +02:00
Hasan Ramezani
8b9d771b67
Add filters to stdlib/warnings.pyi ( #5889 )
2021-08-08 21:18:47 +03:00
Akuli
24780a3e03
imaplib, nntplib, plistlib, poplib: use lower-case list and dict ( #5890 )
2021-08-08 18:46:23 +02:00
Akuli
ce11072dbe
Big diff: use lower-case list and dict ( #5888 )
2021-08-08 09:26:35 -07:00
Akuli
b1d1551bbc
tkinter.Canvas: types for addtag_foo() and find_foo() methods ( #5886 )
2021-08-08 17:14:45 +03:00
Kyle Altendorf
4b77d454bd
dataclasses: Allow Any keys for the metadata field ( #5823 )
2021-08-08 15:50:52 +02:00
Akuli
1409f6e892
change ast files to use new union syntax ( #5880 )
2021-08-08 15:47:33 +02:00
Akuli
c12c93ebe4
use new union syntax in stdlib/types.pyi ( #5882 )
2021-08-08 15:46:09 +02:00
Akuli
1395318faa
use new union syntax in ctypes/__init__.pyi ( #5883 )
2021-08-08 15:45:28 +02:00
Akuli
df6a211855
Use new union syntax in rest of stdlib ( #5884 )
2021-08-08 15:44:30 +02:00
Akuli
ebacd320a3
support passing coordinate tuples to tkinter.Canvas.create_foobar() ( #5885 )
2021-08-08 15:43:28 +02:00
Matt Vollrath
753cb4caba
Override argument type of DatagramProtocol.connection_made() ( #5873 )
2021-08-08 11:16:26 +02:00
Akuli
ef5b4b6820
setattr: Any --> object ( #5877 )
2021-08-08 11:12:23 +02:00
Akuli
ee487304d7
Big diff: Use new "|" union syntax ( #5872 )
2021-08-08 11:05:21 +02:00
Ron Frederick
309e7bda32
Update builtins.pyi ( #5874 )
...
Change getattr/hasattr first argument from Any to object
Fixes #5848
2021-08-07 20:46:03 -07:00
Akuli
e3f662b648
switch to lower-case "# undocumented" comments ( #5871 )
2021-08-07 08:00:41 -07:00
Anton Grübel
39ede0242c
add missing type hints for __class_getitem__ ( #5869 )
2021-08-07 16:12:53 +02:00
Akuli
1cd719ba8d
Add types to some untyped tkinter.Canvas methods ( #5868 )
...
* coords
* gettags
* itemconfigure, itemconfig
* tag_raise, tag_lower, their aliases
* dtag
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
2021-08-07 17:01:56 +03:00
Akuli
9301131976
fix tkinter.Canvas tags option ( #5866 )
2021-08-07 15:53:46 +02:00
Anton Grübel
25e9733389
add missing type hints in trace ( #5865 )
...
* Parameter func in Trace.runfunc() became positional only in Python 3.9
* Add is_ignored_filename()
2021-08-07 15:53:26 +02:00
Akuli
36799fd63c
tkinter.Canvas: fix dash ( #5867 )
2021-08-07 15:38:05 +02:00
Henry Schreiner
ae51d5264b
fix: standalone logger functions do not accept arbitrary keywords ( #5862 )
2021-08-06 23:58:24 +02:00
Henry Schreiner
4965e95f84
fix: arbitrary keyword arguments are not accepted in logging functions ( #5849 )
...
While the implementation uses `**kwargs`, this is just forwarded to `_log()`, which accepts a fixed set of arguments.
2021-08-06 10:59:43 +02:00
Maarten ter Huurne
9bba8a4b83
Correct annotation of headers parameter of HTTP event handlers ( #5854 )
...
* Use HTTPMessage for the headers parameter of HTTP event handlers
While the documentation of `BaseHandler.http_error_default()` describes
the `hdrs` (`headers` in most other handlers) as "a mapping object with
the headers of the error", the implementation that is located in
`URLopener._open_generic_http()` will pass `response.msg` instead,
which is of type `http.client.HTTPMessage`.
* Use Message for the headers parameter of HTTPError
When the standard library constructs `HTTPError`, it will
pass an `http.client.HTTPMessage`, which is a subclass of
`email.message.Message`. Picking the superclass for the
annotations gives users the flexibility to for example
the result of the `email.message_from_X()` functions.
The only thing unique to `HTTPMessage` is the undocumented
`getallmatchingheaders()` method, which is only called by
`http.server.CGIHTTPRequestHandler.run_cgi()`. That class
gets its headers from `http.client.parse_headers()` and not
from `HTTPError`, so I think it's safe to use `Message`
as the annotation.
2021-08-06 10:55:49 +02:00
an onion
f30d6f6fd0
Add stubs for posix_spawn and posix_spawnp ( #5846 )
2021-08-05 18:55:26 -07:00
Anton Grübel
34d94d780c
add ssl.get_ciphers ( #5838 )
2021-08-04 15:39:46 -07:00
Sebastian Rittau
840df19501
Switch to Python 3.10.0-rc.1 in CI ( #5845 )
...
* Switch to Python 3.10.0-rc.1 in CI
* Add module argument to ForwardRef.__init__()
2021-08-04 07:14:38 -07:00