Commit Graph
3292 Commits
Author SHA1 Message Date
ShantanuandSebastian Rittau b732342333 subprocess: add endtime for py36 and below (#3641) 2020-01-23 15:11:54 +01:00
ShantanuandSebastian Rittau 295c20211d ssl: fix arguments for py36 and below (#3640) 2020-01-23 15:10:36 +01:00
ShantanuandSebastian Rittau cae73edebf http.cookies: add LegalChars for py36 and below (#3639) 2020-01-23 15:05:49 +01:00
ShantanuandSebastian Rittau 7e6dbc4393 asyncio: fix various version availability (#3638) 2020-01-23 15:04:04 +01:00
ShantanuandSebastian Rittau 324d18b956 decimal: remove non-existent args from py3, mark positional-only args (#3633) 2020-01-23 15:00:48 +01:00
ShantanuandJelle Zijlstra b4da2b694b csv: re-export Dialect from _csv (#3613)
Resolves #3611

Tested with mypy on:
```
f = open("asdf.csv", "w")

csv.writer(f)
csv.writer(f, dialect=csv.excel)
csv.writer(f, dialect=csv.excel())

csv.DictReader(f)
csv.DictReader(f, dialect=csv.excel)
csv.DictReader(f, dialect=csv.excel())

class CustomDialect(csv.Dialect):
    delimiter = "%"

csv.writer(f, dialect=CustomDialect)
csv.writer(f, dialect=CustomDialect())
```
2020-01-22 17:11:52 -08:00
ShantanuandSebastian Rittau 8b241b5243 asyncio: fix SendfileNotAvailableError availability (#3631) 2020-01-22 17:27:58 +01:00
ShantanuandSebastian 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
ShantanuandJelle 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
ShantanuandSebastian Rittau d889de033a argparse: various fixes (#3630)
- add_subparsers uses keyword-only args
- required parameter is new in py37
2020-01-21 19:38:58 +01:00
ShantanuandSebastian Rittau d2da7d17c2 difflib: various fixes (#3629)
- add undocumented parameters to IS_LINE_JUNK and IS_CHARACTER_JUNK
- add kw-only charset to make_file
2020-01-21 19:30:05 +01:00
ShantanuandSebastian Rittau 39d72bb61e distutils: various fixes (#3634)
- fix parameter name in `move_file`
- make `setup` keyword-only args keyword-only
- add undocumented (positional!) `swig_opts` parameter to `Extension`
2020-01-21 07:08:48 +01:00
ShantanuandSebastian Rittau 666ecc7cca pprint: fix argument names (#3627)
This matters for passing in arguments by keyword
2020-01-20 09:02:23 +01:00
ShantanuandSebastian Rittau b374154705 operator: mark positional-only args (#3628) 2020-01-20 09:01:02 +01:00
ShantanuandSebastian 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
ShantanuandSebastian Rittau 32959dfe6e math: correct argument kinds (#3624)
* math: make positional-only args positional-only

* math: make keyword-only args keyword-only
2020-01-19 21:04:43 +01:00
ShantanuandSebastian Rittau f077918918 zlib: mark positional only args (#3623)
Found using new stub checking script
2020-01-19 21:02:13 +01:00
Andrew SvetlovandSebastian Rittau dfe289e43b Fix local_addr type (#3622) 2020-01-19 19:32:20 +01:00
ShantanuandSebastian Rittau 995e83ba2a zipfile: fix various stubs (#3621)
Found using new stub checking script
2020-01-19 11:52:08 +01:00
Rune TynanandJelle Zijlstra 85afac3bd5 Add (_)dummy_threading module, identical to threading (#3554)
* Add (_)dummy_threading module, identical to threading

* Remove unnecessary comment, add consistency check
2020-01-18 07:42:32 -08:00
Jan VerbeekandJelle Zijlstra 475d1f75fe Add missing stubs to pdb and fix related issues in cmd and bdb (#3600) 2020-01-18 07:39:35 -08:00
ShantanuandSebastian Rittau b6b9df3836 sqlite3: add deterministic parameter to create_function (#3620) 2020-01-16 19:13:08 +01:00
ShantanuandSebastian Rittau cc58bb0cb1 platform: update for py38 (#3619) 2020-01-16 19:13:00 +01:00
ShantanuandSebastian Rittau 137ff45282 opcode, dis: add jump parameter to stack_effect (#3618) 2020-01-16 19:08:18 +01:00
Ian GoodandSebastian Rittau 160b093eb3 MaildirMessage.set_date accepts a float argument (#3617) 2020-01-16 19:06:13 +01:00
ShantanuandSebastian Rittau 375e8c1127 zipfile: fix ZipExtFile parameter (#3616)
This was changed in bpo-38334 and backported to Python 3.7.6 and 3.8.1.
2020-01-16 09:03:39 +01:00
Alan DuandSebastian Rittau 42d68dd765 Use overloads for more precise get_context type (#3605) 2020-01-15 18:43:46 +01:00
ShantanuandSebastian Rittau 1b5c2dfa1f logging: update for py38 (#3595)
* logging: add stacklevel parameter everywhere

* logging: add force to basicConfig

* logging: add validate to Formatter
2020-01-14 19:45:38 +01:00
ErickandSebastian Rittau 394ee4a9ae added f_fsid: int to os.statvfs_result for >= 3.7 (#3608) 2020-01-13 20:08:59 +01:00
Anthony SottileandSebastian Rittau 910cfe4b83 Add msvcrt.locking() and associated constants (#3607) 2020-01-11 17:23:41 +01:00
ShantanuandSebastian Rittau d5f1e58457 binascii: add new parameters to hexlify (#3601) 2020-01-11 17:22:06 +01:00
ShantanuandSebastian 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
ShantanuandJelle Zijlstra 055a907e75 csv: add a return type for things that return (#3604)
Technically, these return whatever the write object of the underlying
file object return. I'm not sure it's worth making everything generic
over this probably rarely used return type, but happy to do it (or drop
this change) if that seems better.
2020-01-10 14:14:44 -08:00
Rebecca ChenandSebastian Rittau 3b3fc6a57f Make os.statvfs_result inherit from typing.NamedTuple. (#3603) 2020-01-10 22:42:29 +01:00
ShantanuandJelle Zijlstra b25454a76c signal: update for py38 (#3602) 2020-01-10 12:12:08 -08:00
ShantanuandSebastian Rittau 4c6ae26a0e codecs: add literal overloads for bytes to bytes, str to str codecs (#3599)
Closes: #300
2020-01-10 16:38:23 +01:00
ShantanuandJelle Zijlstra 61600d6877 memoryview: add cast, obj attribute (#3598)
Fixes #3594
2020-01-09 15:57:17 -08:00
Rebecca ChenandJelle Zijlstra e0151e724a Make unittest.FunctionTestCase inherit from TestCase in Python 2. (#3597)
This makes the pyi file match the implementation:
https://github.com/python/cpython/blob/249706c1fbce04125d81bd9993e6c010ae30f8e4/Lib/unittest/case.py#L1019.

I also removed a now-redundant `run` method from FunctionTestCase
because the mypy test complained about it having a different signature
from TestCase.run().

Context:
https://github.com/python/typeshed/pull/3550#issuecomment-572702513.
2020-01-09 13:04:08 -08:00
Benjamin PetersonandSebastian Rittau fe236ed8b2 Add unittest.result.failfast. (#3596) 2020-01-09 20:39:10 +01:00
Daniel FarleyandRebecca 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 LeoandSebastian Rittau e7430508b0 Fix argument name of os.link/symlink (#3590) 2020-01-08 13:16:02 +01:00
hauntsaninjaandJelle Zijlstra 0505c100e1 inspect: update _ParameterKind for py38 (#3587) 2020-01-07 23:19:04 -08:00
hauntsaninjaandJelle Zijlstra da9b7dd7c8 token: add TYPE_COMMENT, remove AWAIT, ASYNC for py37 (#3588)
flake8 is a little picky about how we do checks against
sys.version_info
2020-01-07 23:18:53 -08:00
hauntsaninjaandJelle Zijlstra 4aa6dfccdb pprint: update for py38, fix kwarg-only parameters (#3585) 2020-01-07 21:51:54 -08:00
hauntsaninjaandJelle Zijlstra 485b85e6b8 csv: update DictReader for py38 (#3586) 2020-01-07 21:40:19 -08:00
hauntsaninjaandJelle Zijlstra b7a611e211 csv: more precise types, remove TODO (#3581) 2020-01-06 20:59:07 -08:00
hauntsaninjaandJelle Zijlstra 1efc1baaf7 stdtypes: update for py38 (#3580) 2020-01-06 20:57:34 -08:00
hauntsaninjaandSebastian Rittau e10b9c70b2 zipfile: update for py38 (#3572)
* zipfile: add Path, new in py38
* zipfile: use str over Text for py3 branches
* zipfile: add force_zip64 kwarg to open methods
2020-01-06 20:52:46 +01:00
Jens Hedegaard NielsenandSebastian Rittau 2cff4e615e BaseHTTPRequestHandler is a subclass of StreamRequestHandler (#3579) 2020-01-06 15:00:31 +01:00
laydayandSebastian Rittau 2bd06a0a3d Restrict shutil.move src argument to str (#3559)
See https://bugs.python.org/issue32689.
This bug only affects `src`s which are directory
Paths in Python 3.5 to 3.8 inclusive.
Comes at the cost of restricting
`src` to str even where a Path would work but
this might be preferable to exposing the bug.
2020-01-05 16:38:16 +01:00