Commit Graph

4628 Commits

Author SHA1 Message Date
Squirrel 5d328a0c3f update stub for pycurl module (#3530) 2020-01-18 08:03:35 -08:00
Rune Tynan 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
Anthony Sottile d0f57d7d38 Fill out more attributes in six (#3589) 2020-01-18 07:41:51 -08:00
Jan Verbeek 475d1f75fe Add missing stubs to pdb and fix related issues in cmd and bdb (#3600) 2020-01-18 07:39:35 -08:00
Shantanu b6b9df3836 sqlite3: add deterministic parameter to create_function (#3620) 2020-01-16 19:13:08 +01:00
Shantanu cc58bb0cb1 platform: update for py38 (#3619) 2020-01-16 19:13:00 +01:00
Shantanu 137ff45282 opcode, dis: add jump parameter to stack_effect (#3618) 2020-01-16 19:08:18 +01:00
Ian Good 160b093eb3 MaildirMessage.set_date accepts a float argument (#3617) 2020-01-16 19:06:13 +01:00
Shantanu 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 Du 42d68dd765 Use overloads for more precise get_context type (#3605) 2020-01-15 18:43:46 +01:00
Daniel Däschle 91d000e434 fix: add samesite parameter to set_cookie (#3614)
* Fixes #3609
* Implements samesite parameter of the set_cookie method in the werkzeug module (https://werkzeug.palletsprojects.com/en/0.15.x/wrappers/#werkzeug.wrappers.BaseResponse.set_cookie)
2020-01-15 12:04:11 +01:00
Shantanu 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
Daniël van Eeden c4bdd90d86 Allow requests to have timeout: Tuple[float, None] (#3612) 2020-01-14 15:28:22 +01:00
Cal Paterson 1421fb1074 Change Response.headers from MutableMapping to CaseInsensitiveDict (#3610)
This fixes a type error when doing `response.headers.lower_items()`, a method
present on CaseInsensitiveDict
2020-01-14 12:41:30 +01:00
Erick 394ee4a9ae added f_fsid: int to os.statvfs_result for >= 3.7 (#3608) 2020-01-13 20:08:59 +01:00
Anthony Sottile 910cfe4b83 Add msvcrt.locking() and associated constants (#3607) 2020-01-11 17:23:41 +01:00
Shantanu d5f1e58457 binascii: add new parameters to hexlify (#3601) 2020-01-11 17:22:06 +01:00
Shantanu 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
Shantanu 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 Chen 3b3fc6a57f Make os.statvfs_result inherit from typing.NamedTuple. (#3603) 2020-01-10 22:42:29 +01:00
Shantanu b25454a76c signal: update for py38 (#3602) 2020-01-10 12:12:08 -08:00
Shantanu 4c6ae26a0e codecs: add literal overloads for bytes to bytes, str to str codecs (#3599)
Closes: #300
2020-01-10 16:38:23 +01:00
Shantanu 61600d6877 memoryview: add cast, obj attribute (#3598)
Fixes #3594
2020-01-09 15:57:17 -08:00
Rebecca Chen 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 Peterson fe236ed8b2 Add unittest.result.failfast. (#3596) 2020-01-09 20:39:10 +01:00
Daniel Farley 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
Rebecca Chen 1651348a08 Require a newer version of pytype that supports @type_check_only. (#3593) 2020-01-08 17:15:25 -08:00
Sebastian Rittau fdeae5d00e Enable --disallow-subclassing-any (#3591)
Closes: #1446
2020-01-08 11:51:44 -08:00
Sebastian Rittau 885c2fd65e Fix example code (#3592) 2020-01-08 09:52:23 -08:00
Vury Leo e7430508b0 Fix argument name of os.link/symlink (#3590) 2020-01-08 13:16:02 +01:00
hauntsaninja 0505c100e1 inspect: update _ParameterKind for py38 (#3587) 2020-01-07 23:19:04 -08:00
hauntsaninja 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
hauntsaninja 4aa6dfccdb pprint: update for py38, fix kwarg-only parameters (#3585) 2020-01-07 21:51:54 -08:00
hauntsaninja 485b85e6b8 csv: update DictReader for py38 (#3586) 2020-01-07 21:40:19 -08:00
rikhilraithatha caca02b096 redis: add ping to PubSub (#3583) 2020-01-07 17:20:43 +01:00
hauntsaninja b7a611e211 csv: more precise types, remove TODO (#3581) 2020-01-06 20:59:07 -08:00
hauntsaninja 1efc1baaf7 stdtypes: update for py38 (#3580) 2020-01-06 20:57:34 -08:00
hauntsaninja 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 Nielsen 2cff4e615e BaseHTTPRequestHandler is a subclass of StreamRequestHandler (#3579) 2020-01-06 15:00:31 +01:00
Daniel Hahler 89c598f7c9 jinja2: add Template.{name,filename} (#3578)
Ref::
  - https://jinja.palletsprojects.com/en/2.10.x/api/#jinja2.Template.name
  - https://jinja.palletsprojects.com/en/2.10.x/api/#jinja2.Template.filename
2020-01-05 17:58:56 -08:00
Christopher Dignam bd14fcaaa6 requests: type responses for PreparedRequest (#3577) 2020-01-06 00:27:21 +01:00
layday 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
hauntsaninja ac2e59af81 shutil: update which for py38 (#3575) 2020-01-05 16:19:03 +01:00
hauntsaninja 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
Alex Grönholm 7b5e9dca48 Added explicit SSLSocket.accept() definition (#3564) 2020-01-05 16:14:42 +01:00
hauntsaninja 64252bfef4 zipfile: fix typo in parameter for PyZipFile (#3573) 2020-01-05 16:12:44 +01:00
Daniel Farley 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
Pavel Savchenko 616b6d0f3b Add missing definitions to requests.utils (#3567)
Added:
+ DEFAULT_PORTS
+ extract_zipped_paths
+ select_proxy
+ rewind_body
2020-01-05 16:07:36 +01:00
Mickaël Schoentgen b4d1da03aa Add missing Path.is_mount() introduced in Python 3.7 (#3566) 2020-01-05 16:04:52 +01:00
Jason a1331accbe Update int.from_bytes to allow more than sequences (#3571)
`int.from_bytes` supports both iterables of ints and objects that define
__bytes__'.  As an example `int.from_bytes(iter([1, 0]), 'little'))`
returns 1.
2020-01-05 16:02:10 +01:00