Shantanu and Sebastian Rittau
b732342333
subprocess: add endtime for py36 and below ( #3641 )
2020-01-23 15:11:54 +01:00
Shantanu and Sebastian Rittau
cae73edebf
http.cookies: add LegalChars for py36 and below ( #3639 )
2020-01-23 15:05:49 +01:00
Shantanu and Sebastian Rittau
7e6dbc4393
asyncio: fix various version availability ( #3638 )
2020-01-23 15:04:04 +01:00
Shantanu and Sebastian Rittau
8b241b5243
asyncio: fix SendfileNotAvailableError availability ( #3631 )
2020-01-22 17:27:58 +01:00
Shantanu and Sebastian Rittau
e3dfaa6608
hashlib: fix arguments ( #3626 )
...
* hashlib: fix argument names
* hashlib: add default values to scrypt, make args Optional
2020-01-22 10:20:40 +01:00
Shantanu and Jelle Zijlstra
e048dd2b3b
heapq: fix arguments ( #3645 )
...
* heapq: mark positional-only args
* heapq: fix types for args with default value None
2020-01-21 17:52:38 -08:00
Shantanu and Sebastian Rittau
b374154705
operator: mark positional-only args ( #3628 )
2020-01-20 09:01:02 +01:00
Shantanu and Sebastian Rittau
ba8b2585c6
ast: some fixes for py38 ( #3625 )
...
* ast: make parse args keyword-only
* ast: get_source_segment is py38 on
2020-01-20 08:50:59 +01:00
Andrew Svetlov and Sebastian Rittau
dfe289e43b
Fix local_addr type ( #3622 )
2020-01-19 19:32:20 +01:00
Shantanu and Sebastian Rittau
cc58bb0cb1
platform: update for py38 ( #3619 )
2020-01-16 19:13:00 +01:00
Alan Du and Sebastian Rittau
42d68dd765
Use overloads for more precise get_context type ( #3605 )
2020-01-15 18:43:46 +01:00
Erick and Sebastian Rittau
394ee4a9ae
added f_fsid: int to os.statvfs_result for >= 3.7 ( #3608 )
2020-01-13 20:08:59 +01:00
Anthony Sottile and Sebastian Rittau
910cfe4b83
Add msvcrt.locking() and associated constants ( #3607 )
2020-01-11 17:23:41 +01:00
Shantanu and Sebastian Rittau
b8299bd58a
http: update for py38 ( #3606 )
...
* http: add UNAVAILABLE_FOR_LEGAL_REASONS
* http.cookiejar: filename parameter now supports path-like
2020-01-11 17:20:46 +01:00
Rebecca Chen and Sebastian Rittau
3b3fc6a57f
Make os.statvfs_result inherit from typing.NamedTuple. ( #3603 )
2020-01-10 22:42:29 +01:00
Shantanu and Jelle Zijlstra
b25454a76c
signal: update for py38 ( #3602 )
2020-01-10 12:12:08 -08:00
Benjamin Peterson and Sebastian Rittau
fe236ed8b2
Add unittest.result.failfast. ( #3596 )
2020-01-09 20:39:10 +01:00
Daniel Farley and Rebecca Chen
955e9c7da4
Unify file descriptor definitions ( #3584 )
...
The _types module can house any common type defintions used throughout
the rest of typeshed to keep defintions in sync.
First candidate is file descriptors where anything with `fileno()`
method is accepted. There were several different implementations in
various files that can be unified.
2020-01-08 17:25:36 -08:00
Vury Leo and Sebastian Rittau
e7430508b0
Fix argument name of os.link/symlink ( #3590 )
2020-01-08 13:16:02 +01:00
hauntsaninja and Jelle Zijlstra
0505c100e1
inspect: update _ParameterKind for py38 ( #3587 )
2020-01-07 23:19:04 -08:00
Jens Hedegaard Nielsen and Sebastian Rittau
2cff4e615e
BaseHTTPRequestHandler is a subclass of StreamRequestHandler ( #3579 )
2020-01-06 15:00:31 +01:00
hauntsaninja and Sebastian Rittau
45688b936e
urllib: update for py38 ( #3574 )
...
* urllib.robotparser: add site_maps
* urllib.parse: add max_num_fields parameter
2020-01-05 16:17:23 +01:00
Daniel Farley and Sebastian Rittau
4fb4c80af7
Fix HTTPConnection timeout type ( #3565 )
...
`HTTPConnection` only passes timeout down to `socket.settimeout()` which is of type `Optional[float]` and has a specific action for `None`. `HTTPConnection` should support the same behavior
2020-01-05 16:11:22 +01:00
Mickaël Schoentgen and Sebastian Rittau
b4d1da03aa
Add missing Path.is_mount() introduced in Python 3.7 ( #3566 )
2020-01-05 16:04:52 +01:00
Faidon Liambotis and Jelle Zijlstra
d87a4ffe0b
socketserver.BaseRequestHandler: add missing hint ( #3524 )
...
Add hint for __init__().
Fixes #3523 .
2020-01-03 08:48:49 -08:00
Jeppe Fihl-Pearson and Jelle Zijlstra
fed3472e7c
Reflect Python 3.8 updates to the pathlib stdlib module ( #3568 )
2020-01-03 08:47:50 -08:00
Alex Grönholm and Sebastian Rittau
f5a1925e76
Corrected type for "data" in two methods ( #3562 )
...
The documentation states:
* datagram_received: "data is a bytes object containing the incoming data."
* pipe_data_received: "data is a non-empty bytes object containing the received data."
2019-12-29 16:03:53 +01:00
Batuhan Taşkaya and Sebastian Rittau
387ea1512a
Add ast.unparse ( #3557 )
2019-12-26 16:06:10 +01:00
Maarten ter Huurne and Jelle Zijlstra
703b01dd5e
Add __init__ to MappingView and its subclasses ( #3528 )
...
While these implementations don't matter for the 'typing' module
itself, these are also imported to serve as the implementations
for the 'collection.abc' module.
Fixes #3029
2019-12-21 14:45:17 -08:00
François Freitag and Sebastian Rittau
462f71a212
Remove unused type _HTTPResponse ( #3531 )
...
Unused since 8e7c32846f .
2019-12-21 21:48:17 +01:00
dave-shawley and Jelle Zijlstra
c44a556fb0
Add typestubs for the warnings module ( #3543 )
2019-12-21 12:29:34 -08:00
Rune Tynan and Jelle Zijlstra
0c563130fd
Add dbm stubs ( #3508 )
2019-12-21 12:25:37 -08:00
Jelle Zijlstra and GitHub
5021b30711
functools: remove first type param of cached_property ( #3553 )
...
Fixes #3547
This removes some type safety in exceptional cases, like code that interacts
directly with cached_property objects, but that seems like a price worth
paying.
2019-12-21 10:42:43 -08:00
layday and Jelle Zijlstra
e404e1592d
Preserve original type in total_ordering annotation ( #3552 )
...
See https://github.com/microsoft/pyright/issues/443
for reference.
2019-12-20 17:18:05 -08:00
Jan Verbeek and Sebastian Rittau
a705d59479
Add undocumented methods and make types more specific in 2/unittest ( #3550 )
2019-12-19 18:17:14 +01:00
Alois Klink and Sebastian Rittau
4766ca0846
Use Literal to improve SpooledTemporaryFile ( #3526 )
...
* Run black code formatter on tempfile.pyi
* Use Literal to improve SpooledTemporaryFile
Previously, SpooledTemporaryFile was always an AnyStr.
Now, we load a SpooledTemporaryFile[bytes] if we open in bytes mode,
and we load a SpooledTemporaryFile[str] if we open in str mode.
2019-12-05 08:04:53 +01:00
cshesse and Sebastian Rittau
9a32f0d26a
add raw property to BufferedIOBase ( #3483 )
2019-12-04 08:20:07 +01:00
Jelle Zijlstra and Sebastian Rittau
d215f502c6
Improve warnings stubs ( #3501 )
...
* merge 2and3 for _warnings
* move warn and warn_explicit into _warnings
2019-12-03 14:33:37 +01:00
Eugene Ha and Jelle Zijlstra
92716c6821
Optional initial-value parameter for itertools.accumulate() ( #3503 )
2019-11-29 11:08:26 -08:00
Rune Tynan and Jelle Zijlstra
359817bde9
In python versions 3.7 and above, re-export Pattern and Match ( #3510 )
2019-11-29 06:03:45 -08:00
Denis Eliseev and Jelle Zijlstra
74ac70bd28
Fix the signature of unittest.TestCase.assertLogs #3513 ( #3514 )
2019-11-29 06:00:16 -08:00
Jason Fried and Jelle Zijlstra
615fa41c25
asyncio/future.pyi - wrap_future loop keyword arg ( #3507 )
...
https://docs.python.org/3.8/library/asyncio-future.html?highlight=wrap_future#asyncio.wrap_future but it doesn't look like the signature has changed going back to 3.5
2019-11-26 16:03:54 -08:00
Sebastian Rittau and Jelle Zijlstra
595d02363a
Change return type of Message.get_payload() to Any ( #3504 )
...
If, for example, is_multipart() is called before calling get_payload(),
it is guaranteed that a List[Message] is returned.
2019-11-26 08:03:15 -08:00
Benjamin Peterson and Jelle Zijlstra
23c531df5a
Type socketserver's RequestHandlerClass as a callable. ( #3422 )
...
It's not uncommon to pass functions rather than actual types into the servers.
2019-11-25 20:18:17 -08:00
Ryan Hileman and Jelle Zijlstra
693678b4c3
add no_type_check_decorator stub for #2884 ( #3460 )
2019-11-25 19:46:57 -08:00
Mohammed El-Afifi and Jelle Zijlstra
c76a298ffa
Fix type hints in Template class ( #3491 )
...
Nothing in the standard library documentation for the string module suggests that the value associated with any key in the mapping parameter(or kwds) to Template.substitute and Template.safe_substitute should be a string. In fact any object can be used, for example
Template("$number is a number.").substitute({"number": 1})
The above code sample currently causes an error message like this:
error: Dict entry 0 has incompatible type "str": "int"; expected "str": "str"
which obviously shouldn't be emitted. Also a similar logic is already in place for methods in the Formatter class. However as I saw the notice about loose types above the Formatter class, I opted to use `object` instead of `Any` as the implementation inside the affected functions just uses the built-in str function on values inside mappings.
2019-11-24 18:16:48 -08:00
Jelle Zijlstra and Sebastian Rittau
1f0dc6ee05
timeout argument to urllib.request.urlopen is Optional ( #3487 )
...
The docs (https://docs.python.org/3/library/urllib.request.html#urllib.request.urlopen ) aren't very precise about this, but passing `None` seems to work in practice.
2019-11-24 12:51:33 +01:00
cshesse and Sebastian Rittau
91f445ef11
fix incorrect param name in FileIO ( #3484 )
2019-11-24 00:08:53 +01:00
Sebastian Rittau and GitHub
c0d46a2035
Mostly undo #3372 ( #3481 )
...
readline callback must return str, not bytes.
2019-11-23 20:17:14 +01:00
Steven Kalt and Jelle Zijlstra
1871e50936
Py37 compileall add invalidation mode ( #3476 )
2019-11-23 07:20:54 -08:00