Guido van Rossum
df5c64e247
Add StopAsyncIteration; also add StopIteration.value.
2016-07-19 19:45:36 -07:00
Guido van Rossum
5088131e5a
Correct type of formatter_class arg to ArgParse().
2016-07-06 11:42:57 -07:00
Guido van Rossum
37e42bfa96
ModuleType has a __file__ attribute.
2016-07-02 10:05:02 -07:00
Guido van Rossum
3a01aeb562
Fix bad syntax in two stubs.
2016-06-30 09:00:13 -07:00
Guido van Rossum
89dfe15008
Add TYPE_CHECKING = True
2016-06-10 17:27:12 -07:00
Guido van Rossum
0b19fb471c
Revert "add types to ssl for py2 ( #251 )"
...
This reverts commit 4039a1a686 .
Reason: several constants (e.g. SSL_ERROR_EOF, SSL_ERROR_SSL, SSL_ERROR_WANT_READ and a few others) are missing.
2016-06-10 17:26:36 -07:00
Guido van Rossum
8ee3123e02
Fix log() signatures; change msg: str to msg: Text.
2016-06-05 17:25:56 -07:00
Guido van Rossum
d75e2ab224
Add logging.WARN; TextIO -> IO[str].
2016-06-05 17:10:15 -07:00
Guido van Rossum
25a45d6daf
Revert "WIP: Mapping.{get,pop} can return default type ( #223 )"
...
This reverts commit d43adbe97e .
Here's a simple example of code that breaks with this PR:
from typing import Mapping, Dict, Tuple
a = {('0', '0'): 42} # type: Mapping[Tuple[str, str], int]
b = a.get(('1', '1'), 0)
This gives an error on the last line:
error: No overload variant of "get" of "dict" matches argument types [Tuple[builtins.str, builtins.str], builtins.int]
2016-05-30 11:55:30 -07:00
Guido van Rossum
355143851a
Use __delete__, not __del__, in class property. See comments on #199 .
2016-05-17 11:26:14 -07:00
Guido van Rossum
5c881a6b86
Add apply() and coerce() to 2.7 builtins.
2016-05-12 15:50:41 -07:00
Guido van Rossum
78e6e9b740
Add Text to typing.pyi; it's an alias for unicode in 2.7, for str in 3.
2016-04-16 13:42:17 -07:00
Guido van Rossum
23ec1ff96a
Break cycle between typing and collections. (Requires a fix in mypy.)
2016-04-15 21:31:49 -07:00
Guido van Rossum
dca8eeb1fe
Ouch. The itertools.chain situation is slightly more complicated.
2016-04-07 15:34:45 -07:00
Guido van Rossum
17e74036f5
Implement itertools.chain.from_iterable().
2016-04-07 14:48:38 -07:00
Guido van Rossum
56abd1e54b
Add note about obtaining consent of package owner for third-party stubs.
2016-04-06 12:47:26 -07:00
Guido van Rossum
bf501353a0
Hopeful fix for fcntl stubs -- change return values back to Any.
2016-03-22 12:21:17 -07:00
Guido van Rossum
1c03574ac4
Use IO[bytes] instead of BytesIO in the pickle stub.
...
Reason: open() returns IO[Any], which is acceptable as IO[bytes] but not as BytesIO.
2016-03-17 12:57:42 -07:00
Guido van Rossum
540a9e18f7
Bandaid for sqlalchemy. Lots of stuff here seems bogus. :-(
2016-03-14 10:50:44 -07:00
Guido van Rossum
35c3917c29
The tornado tests now pass.
2016-03-10 10:23:11 -08:00
Guido van Rossum
ddf43e3bdb
Make tests version-aware. Now only tornado and sqlalchemy stubs fail.
2016-03-09 12:38:51 -08:00
Guido van Rossum
54ba6d9b73
Fix typos: termina[ta]te().
2016-03-09 09:21:15 -08:00
Guido van Rossum
5e0c61f8e0
Fix traceback.pyi right. (Sorry!)
2016-03-08 11:00:23 -08:00
Guido van Rossum
6a496215e7
Revert "Merge pull request #95 from youtux/feature/decimal-2.7"
...
This broke our build.
This reverts commit 0a496917e3 , reversing
changes made to c8630a238d .
2016-03-08 10:38:45 -08:00
Guido van Rossum
f901fff70e
Add missing import of List from typing.
2016-03-07 15:47:39 -08:00
Guido van Rossum
96bb21f023
Stubs for pdb (only the most useful functions).
2016-03-07 12:17:41 -08:00
Guido van Rossum
4297e82bc8
Hack for mypy issue #1254 .
2016-03-03 09:58:44 -08:00
Guido van Rossum
a7221265cc
Install from python/mypy instead of JukkaL/mypy.
2016-02-28 18:59:47 -08:00
Guido van Rossum
b6e1964881
Add missing definition of compile() for 2.7.
2016-02-03 21:32:41 -08:00
Guido van Rossum
bc26b28d78
Try using "pip install -U ..." to install mypy; does this make the test failure disappear?
2016-02-03 17:21:08 -08:00
Guido van Rossum
913495886d
Wrote a runtests.py script. It has some flaws, hence the -x args in .travis.yml.
2016-01-28 13:22:45 -08:00
Guido van Rossum
f6f3d4d9ca
Sigh. Need to write a local test script.
2016-01-28 11:36:52 -08:00
Guido van Rossum
f77e9dc9a0
Better approach to testing. Fixes #7 .
2016-01-28 11:17:26 -08:00
Guido van Rossum
390b566a31
Comment out references to modules without stubs introduced by accident.
2016-01-27 21:16:40 -08:00
Guido van Rossum
9cc81d4eeb
Add 2.7 stubs for dict.fromkeys(). Fixes mypy #1176 .
2016-01-27 15:20:46 -08:00
Guido van Rossum
4f4c6ff786
Fix constructor signatures to 2.7/cPickle.{Pickler,Unpickler}.
2016-01-27 11:43:45 -08:00
Guido van Rossum
14ffe2c13a
Fix signature for 2.7/binascii.crc32().
2016-01-27 11:42:47 -08:00
Guido van Rossum
e40c3eb8c9
Revert "Fix min()/max() overloading with key= parameter. Fixes #1150."
...
It has other problems, e.g. complains about max(x, 10) when the type of x is Any.
This reverts commit 6a47ac7116 .
2016-01-27 11:10:40 -08:00
Guido van Rossum
b3666b52cf
Test 2and3, 3.3, 3.4.
2016-01-26 20:10:24 -08:00
Guido van Rossum
bf1dde5636
Fix tokenize.pyi; fix cp command.
2016-01-26 20:01:34 -08:00
Guido van Rossum
9e15a1db0a
Add stdlib/2.7 to Travis CI tests.
2016-01-26 17:30:54 -08:00
Guido van Rossum
ba4d782f70
Fix bug in traceback.pyi (hey, tests are useful!).
2016-01-26 16:57:45 -08:00
Guido van Rossum
b091a7311c
Use the correct pip install incantation.
2016-01-26 16:54:18 -08:00
Guido van Rossum
c6f15133cf
Add a Travis CI configuration.
2016-01-26 16:50:47 -08:00
Guido van Rossum
6a47ac7116
Fix min()/max() overloading with key= parameter. Fixes #1150 .
2016-01-26 11:13:14 -08:00
Guido van Rossum
a1fe083133
Fix class file so it can be used as "with file(...) as f: f.read() # etc."
2016-01-25 17:01:34 -08:00
Guido van Rossum
17d8f20fd5
Add message attribute to class BaseException.
2016-01-25 16:32:47 -08:00
Guido van Rossum
cf82278301
Use plain bytes instead of ByteString in 3/builtins.pyi.
2016-01-25 08:12:46 -08:00
Guido van Rossum
a080d6cee5
Make Future stub resemble reality better.
2016-01-19 14:23:09 -08:00
Guido van Rossum
740568ed25
Use NamedTuple for inspect.ArgSpec and .FullArgSpec.
2016-01-18 16:51:23 -08:00
Guido van Rossum
f1beef02e7
Replace some unicode argument defaults with ... (the type checker does not care about the value).
2016-01-18 16:44:44 -08:00
Guido van Rossum
2d82816e14
Add Iterable base class to csv.DictReader. Fixes #47 .
2016-01-18 16:39:08 -08:00
Guido van Rossum
5463335be2
Make deque inherit from MutableMapping (with difficulty). Fixes #43 .
2016-01-14 09:14:38 -08:00
Guido van Rossum
71d15d6943
Remove outdated things from README.
2016-01-14 09:11:38 -08:00
Guido van Rossum
8c2118bace
Move contents of builtins/* to stdlib/*. This simplifies finding stubs.
2016-01-12 12:53:18 -08:00
Guido van Rossum
0938e8f5de
Add flush keyword arg to print() (even though 3.2 does not support it).
2016-01-12 11:18:20 -08:00
Guido van Rossum
8539624f05
Fix Reversible.__reversed__() return type. (I should do more testing.)
2016-01-11 16:04:44 -08:00
Guido van Rossum
1c02f14dc1
Make Reversible covariant. Fixes #19 . (Though it does not seem to be *necessary*.)
2016-01-11 15:32:43 -08:00
Guido van Rossum
0673b7bab9
Add Generator to 2.7/typing.pyi. Fixes #29 .
2016-01-11 15:26:22 -08:00
Guido van Rossum
e463890df7
2.7 does not have lru_cache().
2016-01-11 08:14:11 -08:00
Guido van Rossum
87bc00eb2a
Unify 2.7 and 3 stubs for functools.
2016-01-08 10:10:50 -08:00
Guido van Rossum
5cf2fa45b8
Add cStringIO, cPickle to six.moves. Add six.moves for PY3.
2016-01-06 16:41:22 -08:00
Guido van Rossum
0f21b59a30
Some updates now typing.Container is defined.
2016-01-06 16:38:14 -08:00
Guido van Rossum
9aabb149e3
Simplify PY3 len() spec, no Union with tuple needed.
2016-01-06 16:35:02 -08:00
Guido van Rossum
0eac99679c
Add object.__setattr__ for 2.7.
2016-01-06 16:34:26 -08:00
Guido van Rossum
017f4efa0f
Simplify SystemRandom now it subclasses Random, for 2.7 and 3.
2016-01-06 16:29:04 -08:00
Guido van Rossum
cb40959116
Improve 2.7 stub for tempfile.
2016-01-06 16:21:35 -08:00
Guido van Rossum
ee8e8fcb69
Swap max() and min() overloads so max(x, y) and min(x, y) work as expected.
2016-01-06 16:15:56 -08:00
Guido van Rossum
71b8a9f9ec
Update 2.7 built-in set to be the same as PY3 set. AbstractSet does not have a union() method.
2016-01-06 16:06:58 -08:00
Guido van Rossum
76b746ba3f
Add object.__new__ so it can be called.
2016-01-06 15:55:27 -08:00
Guido van Rossum
f37bd69266
Add abstractproperty.__new__ so it can be used.
2016-01-06 15:48:47 -08:00
Guido van Rossum
a4c268c4e4
The typing stub should not import asyncio. Fixes https://github.com/JukkaL/mypy/issues/1050 .
2015-12-05 14:22:45 -08:00
Guido van Rossum
107104dfe5
Fix type annotation syntax used in asyncio/futures.pyi.
2015-12-04 11:43:45 -08:00
Guido van Rossum
0687239f53
Inaugurate six.moves with zip (copied from builtins).
2015-12-04 09:09:01 -08:00
Guido van Rossum
30af935dc7
Make partial a generic type (the parameter being the return type).
2015-11-30 15:12:42 -08:00
Guido van Rossum
cea5060892
Add sqlite3 stubs.
2015-11-30 15:12:42 -08:00
Guido van Rossum
e7f731e74b
Revert "Improve typing of 2.7/contextlib::contextmanager."
...
This reverts commit 76c3a5bab0 .
2015-11-26 21:02:23 -08:00
Guido van Rossum
76c3a5bab0
Improve typing of 2.7/contextlib::contextmanager.
2015-11-25 16:59:50 -08:00
Guido van Rossum
00f8e62751
Add __getattr__(), __setattr__(), __delattr__() to 2.7 threading.local().
2015-11-25 16:57:52 -08:00
Guido van Rossum
bbbccf61dc
Add 'closing' to 2.7 contextlib stubs (same as for 3).
2015-11-24 21:08:02 -08:00
Guido van Rossum
a0deb69be9
Updated stub for 2.7 httplib; new stubs for 2.7 mimetools, rfc822.
2015-11-23 10:29:38 -08:00
Guido van Rossum
7b75dec702
Make last two slice() args optional in 2.7.
2015-11-22 21:08:38 -08:00
Guido van Rossum
1f7b00e451
Add more constants to 2.7 os stub, copied from 3.x os stub.
2015-11-22 17:02:41 -08:00
Guido van Rossum
9ae0c0b337
Fix argparse.Namespace better.
2015-11-22 16:28:54 -08:00
Guido van Rossum
830dc1f95b
Add discard() method to 2.7 set().
2015-11-22 16:20:19 -08:00
Guido van Rossum
dc5a1e34a3
Fix 2.7 signature of fnmatch.translate().
2015-11-22 16:18:29 -08:00
Guido van Rossum
ea35d5c8e6
Add __getattr__ to argparse.Namespace.
2015-11-20 14:38:23 -08:00
Guido van Rossum
32cce184cf
Backport enum for 2.7.
2015-11-20 14:34:33 -08:00