Sebastian Rittau and GitHub
a913af9523
flake8: Enable F811 ( #4158 )
2020-06-02 14:08:54 -07:00
17aa20cd95
Add st_file_attributes to stat_result for Windows ( #4156 )
...
This member is documented at https://docs.python.org/3/library/os.html#os.stat_result.st_file_attributes and https://docs.python.org/3/whatsnew/3.5.html#os
Co-authored-by: hauntsaninja <>
2020-06-01 23:53:11 -07:00
Rune Tynan and GitHub
342ce69f88
Add missing asyncio modules ( #4149 )
2020-06-01 02:05:16 +02:00
Jelle Zijlstra and GitHub
adeda24fce
open: introduce concrete return types ( #4146 )
...
* make io classes inherit from typing IO classes
This makes these classes usable if type annotations are given as "IO"
or "TextIO". In the future, we'll then be able to move open() to
return a concrete class instead (#3951 ).
* open: introduce concrete return types
Fixes #3951 .
We use the values of the "mode" and "buffering" arguments to figure out
the concrete type open() will return at runtime. (Compare the CPython
code in https://github.com/python/cpython/blob/master/Modules/_io/_iomodule.c#L231 .)
2020-06-01 00:48:12 +02:00
Rune Tynan and GitHub
d863210335
Improve TypeVar stub ( #4150 )
2020-05-30 20:27:59 -07:00
Jelle Zijlstra and GitHub
3058bec873
make io classes inherit from typing IO classes ( #4145 )
...
This makes these classes usable if type annotations are given as "IO"
or "TextIO". In the future, we'll then be able to move open() to
return a concrete class instead (#3951 ).
2020-05-30 06:50:49 -07:00
de2c2947fe
windows: fix splitunc param name ( #4143 )
...
Co-authored-by: hauntsaninja <>
2020-05-29 20:37:19 -04:00
Rune Tynan and GitHub
4381eba6f4
Add _sitebuiltins stubs ( #4139 )
2020-05-29 22:33:06 +02:00
Rune Tynan and GitHub
d035ce57e3
Add platform checks for various sys values ( #4137 )
...
* Add platform checks for various sys values
* Add windows-only constants
2020-05-28 19:00:31 -07:00
b58b8f3b43
Make BytesIO inherit from BufferedIOBase. ( #4082 )
...
Co-authored-by: Shantanu <hauntsaninja@users.noreply.github.com >
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2020-05-28 17:07:00 -07:00
62304eb02f
asyncio: update cancels for py39 ( #4135 )
...
Co-authored-by: hauntsaninja <>
2020-05-28 13:42:31 -07:00
da2aa297a2
pathlib: update for py39 ( #4134 )
...
Co-authored-by: hauntsaninja <>
2020-05-28 13:41:53 -07:00
Shantanu and GitHub
feb43f7237
asyncio: add asyncio.threads for py39 ( #4136 )
2020-05-28 13:37:46 -07:00
Jelle Zijlstra and GitHub
c80622fbb9
remove type ignores about python/mypy#5027 ( #4119 )
...
The mypy issue got fixed by the good people of mypy. I did have to add an
override for __enter__ similar to what we're doing in #4082 .
2020-05-28 09:51:54 -07:00
846d922df2
More precise return types for open(), Path.open(), bz2.open(), etc. ( #3371 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
2020-05-28 09:20:23 -07:00
313a835bea
Add missing definitions for urllib/response.pyi ( #4118 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2020-05-28 13:48:27 +02:00
Jelle Zijlstra and GitHub
ca553cd589
fix type for ipaddress._BaseNetwork.overlaps ( #4124 )
2020-05-28 13:22:50 +02:00
2f0e3dbed2
statistics: add zscore in py39 ( #4130 )
...
Co-authored-by: hauntsaninja <>
2020-05-27 22:09:46 -07:00
1c0403cf83
random: various fixes ( #4128 )
...
* random.sample: make counts keyword-only
* random: mark positional-only args
* random.triangular: fix type of mode
* random: add randbytes
Co-authored-by: hauntsaninja <>
2020-05-27 22:05:55 -07:00
Shantanu and GitHub
c3c6abc153
gettext: various fixes ( #4125 )
2020-05-27 21:26:58 -07:00
0041206765
Fix _winapi version availability ( #4120 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2020-05-27 20:47:15 -07:00
Shantanu and GitHub
e9531e0c18
_tracemalloc: precise types, deduplicate tracemalloc ( #4083 )
2020-05-27 20:36:21 -07:00
Rune Tynan and GitHub
712f6d3709
Fix winreg pos-only args and parameter names ( #4117 )
...
* Fix winreg pos-only args and parameter names
* Fix consistency check
2020-05-27 20:22:32 -07:00
5cf2fb703a
tempfile: fix TemporaryFile on Windows ( #4112 )
...
Co-authored-by: hauntsaninja <>
2020-05-27 20:22:01 -07:00
Ilya Konstantinov and GitHub
1dc585385a
lru_cache-wrapped function args must be Hashable ( #3944 )
2020-05-27 20:20:56 -07:00
2a13ba9415
compileall: update for py39 ( #3956 )
...
* compileall: add stripdir, prependdir and limit_sl_dest
* compileall: compile_dir's default value is now None
* compileall: update for current py39 (as of beta1)
Co-authored-by: hauntsaninja <>
2020-05-27 20:18:19 -07:00
Rune Tynan and GitHub
7ba59719b6
Fix asyncio IocpProactor version availability ( #4121 )
2020-05-27 20:14:00 -07:00
Shantanu and GitHub
fd203e663e
py39: add PEP 616 methods ( #4090 )
2020-05-27 19:24:25 -07:00
54c99ff75f
asyncio: add shutdown_default_executor ( #4115 )
...
There are a couple other py39 changes to be made in asyncio, but I'm
trying to avoid merge issues with whitelists / Windows for now.
Co-authored-by: hauntsaninja <>
2020-05-27 18:35:39 -07:00
Rune Tynan and GitHub
fcdfacf944
Fix stubtest failures for socketserver on windows ( #4103 )
2020-05-27 19:34:35 +02:00
Rune Tynan and GitHub
713a2729b4
Fix stubtest failures for asyncio on windows ( #4092 )
2020-05-27 19:08:19 +02:00
Rune Tynan and GitHub
ed4993bd50
Fix stubtest failures for os.__init__ on windows ( #4098 )
2020-05-27 17:25:30 +02:00
Rune Tynan and GitHub
e49c156d92
Add winreg stubs ( #3794 )
2020-05-27 17:15:08 +02:00
Ivan Levkivskyi and GitHub
e199c2e4bc
Fix concurrent.futures import for re-export ( #4105 )
...
Also update stubtest whitelist as a workaround.
2020-05-27 13:51:01 +01:00
Rune Tynan and GitHub
7ac284f641
Add _pydecimal and _decimal stubs ( #4003 )
2020-05-27 10:10:51 +02:00
Rune Tynan and GitHub
8c7bfab7bd
Fix stubtest failures for selectors on windows ( #4100 )
2020-05-27 09:55:27 +02:00
Rune Tynan and GitHub
a9375cf274
Fix stubtest failures for signal on windows ( #4101 )
2020-05-27 09:54:37 +02:00
Rune Tynan and GitHub
ab58c8148e
Fix stubtest failures on _winapi ( #4091 )
2020-05-27 09:50:00 +02:00
Rune Tynan and GitHub
5e80ca9e44
Fix stubtest failures for path files on windows ( #4096 )
2020-05-27 09:39:26 +02:00
3eb6fb8714
functools: add cache ( #4089 )
...
Co-authored-by: hauntsaninja <>
2020-05-26 17:36:01 -07:00
448c4e1fa7
asyncio.protocols: fix version availability ( #4081 )
...
Co-authored-by: hauntsaninja <>
2020-05-25 21:54:05 -07:00
Luciano Ramalho and GitHub
2f82c44af0
Hashable bounded typevar for mode, multimode ( #4084 )
...
Fixes #4057
2020-05-25 21:48:25 -07:00
3b02ce2128
Add _osx_support module ( #4002 )
...
* Add _osx_support module
* fix type
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2020-05-25 16:11:02 -07:00
18121d71c8
concurrent.futures: fix top level available objects, add InvalidStateError ( #4021 )
...
* concurrent.futures: add InvalidStateError
* concurrent.futures: fix package imports
* asyncio.futures: fix import
* concurrent.futures: fix version availability for BrokenExecutor
* concurrent.futures: make consistent
* concurrent.futures: update whitelist
Co-authored-by: hauntsaninja <>
2020-05-25 15:38:09 -07:00
4daf0df929
tracemalloc: a number of fixes ( #4078 )
...
* tracemalloc.Frame: add __init__
* tracemalloc.Snapshot: add __init__
* tracemalloc.Snapshot: fix a staticmethod
* tracemalloc.Statistic: add __init__
* tracemalloc.StatisticDiff: add __init__
* tracemalloc.Trace: add __init__
* tracemalloc.Traceback: add __init__
* tracemalloc: fix version availability, Trace __init__
* tracemalloc.Traceback: add total_nframe property
* tracemalloc.Trace: add properties
* tracemalloc.Traceback.format: add parameter
* tracemalloc.start: make positional-only
* tracemalloc.Filter: fix version availability
* update whitelists
Co-authored-by: hauntsaninja <>
2020-05-25 15:36:35 -07:00
4b007a50b4
signal: improve version availability ( #4079 )
...
Co-authored-by: hauntsaninja <>
2020-05-25 15:29:52 -07:00
8f6fd0e05a
functools: add TopologicalSorter for py39 ( #4068 )
...
* functools: add TopologicalSorter for py39
* fix flake8 error
Co-authored-by: hauntsaninja <>
2020-05-24 18:44:28 -07:00
9c53756f9c
random: update for py39 ( #4069 )
...
Co-authored-by: hauntsaninja <>
2020-05-24 17:51:53 -07:00
070be22f7e
venv: fix #4010 ( #4062 )
...
Co-authored-by: hauntsaninja <>
2020-05-24 17:51:43 -07:00
karl ding and GitHub
9c6e8fd240
Add undocumented unittest.TextTestResult attributes ( #4052 )
...
Add missing type hints for attributes in unittest.TextTestResult.
2020-05-21 12:11:59 +02:00