Guido van Rossum
39325bf159
Mypy now supports sys.platform and sys.version_info checks ( #410 )
2016-07-27 13:25:29 -07:00
Jakub Stasiak
b91b932d4f
Add BaseRequestHandler instance attributes ( #384 )
...
From the BaseRequestHandler documentation:
handle()
This function must do all the work required to service a request.
The default implementation does nothing. Several instance attributes
are available to it; the request is available as self.request; the
client address as self.client_address; and the server instance as
self.server, in case it needs access to per-server information.
The type of self.request is different for datagram or stream
services. For stream services, self.request is a socket object;
for datagram services, self.request is a pair of string and
socket.
2016-07-26 09:57:08 -07:00
Valérian Rousset
cd413c502c
Add hmac ( #402 )
2016-07-26 08:40:04 -07:00
Michael R. Crusoe
cc735b1176
expose xml.sax Exceptions ( #280 )
2016-07-26 07:45:27 -07:00
Jakub Stasiak
44b367c7fe
Add re fullmatch() information ( #381 )
2016-07-26 07:43:29 -07:00
Fabian Heredia Montiel
918eef43f7
Add some missing classes from queue in py3 ( #401 )
2016-07-26 07:41:56 -07:00
Michael Lee
9ecc1f2147
Add stubs for NewType helper function ( #398 )
...
(Note that this is not enough to support NewType(). However it's a prerequisite for the mypy implementation.)
2016-07-26 07:35:28 -07:00
jchien14
b8c08f25f7
Add traceback.print_stack to mypy python 3 ( #400 )
2016-07-25 16:40:01 -07:00
Michael Lee
368c703078
Add dict views to python 2 ( #376 )
2016-07-21 11:28:35 -07:00
Fabian Heredia Montiel
1d5df0bd7b
Add enumera ( #378 )
2016-07-20 10:53:34 -07:00
Guido van Rossum
df5c64e247
Add StopAsyncIteration; also add StopIteration.value.
2016-07-19 19:45:36 -07:00
Daniel F Moisset
ba349199d7
More general types for frozenset methods ( #277 )
...
Fixes #276 .
2016-07-18 17:17:57 -07:00
Valérian Rousset
d5938ee76c
Add cpython specific constants to ssl ( #291 )
...
* Revert "Revert "add types to ssl for py2 (#251 )""
This reverts commit 0b19fb471c (thus re-adding types to ssl).
* add some undocumented ssl constants
2016-07-17 19:27:29 -07:00
Valérian Rousset
cf655f6f02
add some types to importlib ( #340 )
2016-07-15 15:46:28 -07:00
Guido van Rossum
6aeea2a872
Add stub for cgi.parse_header(). ( #371 )
2016-07-15 15:42:51 -07:00
Valérian Rousset
8ef221c162
add zipfile for py2 ( #345 )
2016-07-15 05:55:20 -07:00
speezepearson
534837e1ee
add __{cause,context,traceback}__ to BaseException, per PEP 3134 ( #369 )
2016-07-13 15:26:55 -07:00
Jukka Lehtosalo
e05edb60f1
Mypy stub fixes for strict optional mode ( #366 )
2016-07-13 09:38:40 -07:00
Eklavya Sharma
bca4c81b70
builtins: Remove Exception.message. ( #363 )
...
It's not present in 3.4 either, so this looks good to me.
2016-07-13 16:11:51 +01:00
speezepearson
e815c803a6
add ChainMap class to collections module ( #361 )
...
* add ChainMap class to collections module
* ...and add it for Python 2 as well.
2016-07-13 06:16:37 -07:00
speezepearson
e436795124
add default arguments to traceback.format_exception ( #360 )
2016-07-13 06:14:16 -07:00
Matthias Kramm
e19e10c891
Merge pull request #348 from sharmaeklavya2/fix-subprocess-check-output
...
subprocess: Fix return type of check_output.
2016-07-12 17:12:33 -07:00
Guido van Rossum
1c4662d2f3
Two small changes to help the mypy test suite pass ( #355 )
...
* Condition arg for skip{If,Unless} should be object, not bool.
* Env arg to os.get_exec_path() is a Mapping, not a Dict.
2016-07-12 14:10:36 -07:00
Matthias Kramm
b48ddf7532
Merge pull request #352 from tharvik/improve_argparse
...
merge py2 and py3 argparse
2016-07-11 06:36:25 -07:00
tharvik
87235ad72b
merge py2 and py3 argparse
2016-07-11 15:23:51 +02:00
Matthias Kramm
90b9d4d77c
Merge pull request #339 from tharvik/improve_os
...
add some types to os
2016-07-11 06:18:38 -07:00
tharvik
1833e8e4b6
add some types to os
2016-07-11 15:09:52 +02:00
Michael Lee
adc6bf5f94
Update set methods to take multiple iterables ( #349 )
...
As of Python 2.7, you can pass in multiple iterables into some set
methods like union, intersection, difference, and update. So, for
example, `new_set = a.union(b, c)`.
2016-07-07 11:52:22 -07:00
Eklavya Sharma
a7754c3eff
subprocess: Fix return type of check_output.
...
check_output's return type can be str if universal_newlines=True.
2016-07-07 22:04:29 +05:30
Matthias Kramm
f75bbae18d
Merge pull request #344 from tharvik/improve_unittest
...
improve unittest
2016-07-07 06:36:06 -07:00
Matthias Kramm
7bef3added
Merge pull request #297 from alvarocaceres/subprocess
...
Fix signatures of call, check_call and check_output in subprocess
2016-07-06 10:54:01 -07:00
tharvik
e102c99f36
improve unittest
2016-07-06 11:33:48 +02:00
Guido van Rossum
8515cf5de8
Attempt to reduce cyclical dependencies between types and importlib. ( #335 )
...
- Move Loader and ModuleType into _importlib_modulespec.pyi.
- Add "import X as X" for these to types.pyi and importlib/abc.pyi.
The goal is to ensure mypy -i still works, to fix https://github.com/python/mypy/issues/1797 .
2016-07-05 10:23:24 -07:00
Elazar
8fb9f4a8f1
Add stubs for dis and opcode ( #331 )
2016-07-05 10:18:58 -07:00
Eklavya Sharma
c98c2afb58
os: Add buffering to fdopen. ( #337 )
2016-07-04 20:12:06 -07:00
Eklavya Sharma
df1a655858
email.header: Make decode_header also accept str. ( #333 )
...
decode_header accepts a parameter of type str or Header, but the
stub for decode_header types the parameter as Header. Change
that to Union[Header, str].
2016-07-04 18:11:49 -07:00
Eklavya Sharma
a424eeb1f8
Fix some stubs in urllib.parse ( #334 )
...
* urllib.parse: Make return type of unquote_from_bytes str.
* urllib.parse: Reject encoding when quote is passed bytes.
encoding and errors must not be supplied to quote_plus and
quote if the first parameter is a bytes, or a TypeError is raised.
So overload quote and do not put encoding and errors in the
version where bytes is the first parameter.
quote and quote_plus also allow string and safe to be of different
types. Also allow that in the stubs.
2016-07-04 13:53:46 -07:00
Guido van Rossum
37e42bfa96
ModuleType has a __file__ attribute.
2016-07-02 10:05:02 -07:00
Eklavya Sharma
15714bb0e8
Set a default value for output in CalledProcessError.__init__ ( #329 )
2016-07-02 07:40:09 -07:00
OrenLeaffer
998d787302
fix return type for traceback.format_exception ( #326 )
...
format_exception and format_exception_only both return lists of
strings, not strings.
2016-07-01 16:03:25 -07:00
Brett Cannon
ab08dbbf09
Add stubs for importlib.util ( #325 )
2016-07-01 10:32:23 -07:00
Brett Cannon
43c3406770
Add stubs for importlib.machinery ( #323 )
...
* Fix some misspelled method names that were also missing 'self'
* Initial stubs for importlib.machinery
* Use importlib.machinery.ModuleSpec everywhere
2016-06-30 17:07:49 -07:00
Brett Cannon
05e02c188f
Implement stubs for importlib.abc and update types.ModuleType ( #321 )
2016-06-30 15:02:42 -07:00
Guido van Rossum
3a01aeb562
Fix bad syntax in two stubs.
2016-06-30 09:00:13 -07:00
tewe
c84c138194
Annotate **kwargs with dictionary value type only ( #320 )
2016-06-29 08:43:13 -07:00
tewe
ab4734ff7f
Use actual base type ( #313 )
...
Avoids "Exception type must be derived from BaseException"
2016-06-28 18:26:54 +01:00
Brett Cannon
41b3fe2f60
Add stubs for importlib.__init__ ( #314 )
...
* Ignore VS Code
* Add stubs for importlib.__init__
Part of #189
2016-06-28 09:30:15 -07:00
Philip House
4a79dec6ba
adding type-specific assertEqual cases ( #315 )
...
Adding support for type-specific equality methods (see https://docs.python.org/2.7/library/unittest.html?highlight=assertlistequals#unittest.TestCase.addTypeEqualityFunc ) in the unittest stub for both 2.7/3. As requested by @gvanrossum in #308
2016-06-28 08:12:27 -07:00
Russ Allbery
0c26482488
difflib functions return Iterators, not Iterables ( #310 )
...
These functions all use yield. It's valid to call the next method
on the return value, which is not true of Iterables.
2016-06-23 17:35:25 -07:00
Philip House
d2db605008
fixes #131 ( #308 )
2016-06-21 08:16:24 -07:00