Commit Graph

64 Commits

Author SHA1 Message Date
Tim Abbott
c2555b3119 Port stub for os.walk from python 3 to 2 and cleanup comment. 2016-01-26 16:30:15 -08:00
Tim Abbott
c17d0120a9 Add stubs for traceback.format_exception. 2016-01-26 16:30:15 -08:00
Tim Abbott
55830ec190 Fix type for py2 traceback.format_exc and add to python 3. 2016-01-26 16:30:15 -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
958a8e5f45 Merge pull request #57 from timabbott/tabbott-stubs
Fix several python 2 library stub errors.
2016-01-25 16:39:08 -08:00
Tim Abbott
ddc33a3c7c Add missing stub for os.exit on python 2. 2016-01-25 16:33:35 -08:00
Tim Abbott
b180914208 Fix os.wait and os.waitpid annotations on python 2. 2016-01-25 16:33:35 -08:00
Guido van Rossum
17d8f20fd5 Add message attribute to class BaseException. 2016-01-25 16:32:47 -08:00
Tim Abbott
21c90d52b9 Fix re module constant stubs for 2.7.
ASCII doesn't exist in 2.7, but UNICODE and TEMPLATE do.
2016-01-25 12:32:31 -08:00
Guido van Rossum
2c4549fb36 Merge pull request #51 from DanielShaulov/threading
Some fixes to threading
2016-01-23 09:10:24 -08:00
Daniel Shaulov
e2c9ec5cb0 Merge branch 'master' into threading
Conflicts:
	stdlib/3/threading.pyi
2016-01-23 10:34:30 +00:00
Matthias Kramm
c957fc9f17 Merge pull request #53 from timabbott/mutable
Fix os.environ improperly classified as not mutable for python 2.
2016-01-22 21:33:01 -08:00
Tim Abbott
c0d0f7fe14 Fix os.environ improperly classified as not mutable for python 2.
In Python, you can change the environment by writing to os.environ.

This seems to already be handled correctly in the python 3 type data,
so we just need to fix it for 2.7.
2016-01-22 17:47:53 -08:00
Matthias Kramm
25a3fac0fd Fix default parameter syntax.
Use 'x:bool = ...' instead of 'x:bool = True' or 'x:bool = False'.
2016-01-22 16:39:15 -08:00
Daniel Shaulov
14ffe7ea17 Inherit from Any in threading.local and SimpleNamespace 2016-01-22 12:24:36 +02: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
Ben Darnell
b7b7da1a85 Stubgen some more stdlib modules.
Copy doctest.pyi from 3 to 2.7.
2016-01-16 16:54:47 -05:00
Ben Darnell
3a674645a5 Assorted fixes to stubs 2016-01-16 16:52:01 -05:00
Daniel Shaulov
01d96e4ac4 Fix signatures of __init__ for Thread and Timer 2016-01-16 00:21:24 +02: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
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
605c189f29 Merge pull request #39 from rmcgibbo/json
Add keyword args to stdlib's json.pyi
2016-01-11 13:49:24 -08:00
Robert T. McGibbon
dfd7ceecd8 Add type annotations for json.load(s) 2016-01-11 13:23:59 -08:00
Guido van Rossum
e463890df7 2.7 does not have lru_cache(). 2016-01-11 08:14:11 -08:00
Robert T. McGibbon
0735ec0251 Add keyword args to stdlib's json.pyi 2016-01-10 23:37:17 -08:00
Guido van Rossum
87bc00eb2a Unify 2.7 and 3 stubs for functools. 2016-01-08 10:10:50 -08:00
Matthias Kramm
42da4e56f9 Have ast.pyi re-export symbols from _ast.pyi. 2016-01-08 10:03:06 -08:00
Guido van Rossum
0f21b59a30 Some updates now typing.Container is defined. 2016-01-06 16:38:14 -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
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
f37bd69266 Add abstractproperty.__new__ so it can be used. 2016-01-06 15:48:47 -08:00
Matthias Kramm
4a1674a148 Improve Python 2 stub for abc; _weakrefset stub. 2015-12-22 15:38:28 -08:00
Matthias Kramm
2bb0d98b6d add Python 2 stubs for ast, tokenize 2015-12-22 12:01:02 -08:00
Greg Price
f3b499fd99 typing: update 2 to match 3 on Sequence and Container 2015-12-21 18:11:14 -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
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
dc5a1e34a3 Fix 2.7 signature of fnmatch.translate(). 2015-11-22 16:18:29 -08:00