Commit Graph

91 Commits

Author SHA1 Message Date
Matthias Kramm
335ef31893 Merge pull request #85 from ddfisher/master
Remove invalid Python 3 syntax
2016-02-23 20:14:15 -06:00
Sidharth Kapur
2904b80369 Update type for reduce in stdlib/2.7/functools 2016-02-22 17:27:46 -06:00
David Fisher
f7349d46e9 Add comment about True/False omission in 2.7 builtins 2016-02-20 22:47:38 -08:00
David Fisher
48b3b260d1 Remove invalid Python 3 syntax 2016-02-18 16:25:30 -08:00
Tim Abbott
a648f5eee1 Fix incorrect sys.exit() type. 2016-02-05 11:28:16 -08:00
Guido van Rossum
b6e1964881 Add missing definition of compile() for 2.7. 2016-02-03 21:32:41 -08:00
Robert T. McGibbon
8739c4a188 Improvements to builtins min/max 2016-02-03 15:16:52 -08:00
Tim Abbott
e8dc3cdd7b Fix urlunparse stubs for 2.7 to correctly support a list/iterator argument. 2016-02-02 11:47:46 -08:00
Tim Abbott
0632f2e530 Add missing exec*, EX_* stubs for python 2 and fix py3 types. 2016-01-29 17:54:24 -08:00
Tim Abbott
9ad37b5701 Add urllib.request.proxy_bypass stubs. 2016-01-27 22:12:16 -08:00
Tim Abbott
0cb13efa28 Add python 2 urllib2 stubs. 2016-01-27 22:08:23 -08:00
Tim Abbott
fcb63d2028 Add stubs for UserList, UserString, UserDict. 2016-01-27 21:36:47 -08:00
Guido van Rossum
c48b931d92 Merge pull request #69 from timabbott/tabbott-html
Add html module stubs.
2016-01-27 21:21:57 -08:00
Tim Abbott
9db84e7ffe Add stubs for HTMLParser, html.parser, and six.moves.html_parser. 2016-01-27 21:09:30 -08:00
Guido van Rossum
b9ad64a038 Merge pull request #68 from timabbott/tabbott-stubs
Expand stubs for simplejson, unittest, email
2016-01-27 19:49:53 -08:00
Matthias Kramm
9b9c232f75 Fix ast.parse(). The 2nd and 3rd arg are optional. 2016-01-27 19:26:57 -08:00
Tim Abbott
8af7ece855 Port unittest stub from python 3 to python 2.7.
I did this by taking the python 3 stub, and then reading a diff of
unittest.py between python 2 and python 3 and correcting the
differences.
2016-01-27 16:35:39 -08:00
Tim Abbott
f6a0b8de0c Expand stub for simplejson module to include decoders/encoders. 2016-01-27 16:35:39 -08:00
Tim Abbott
b30ca8e42b Add python 2 email.message_from_* stubs (and add types for py3). 2016-01-27 15:46:00 -08:00
Guido van Rossum
9cc81d4eeb Add 2.7 stubs for dict.fromkeys(). Fixes mypy #1176. 2016-01-27 15:20:46 -08:00
Howard Lee
f8f0551a9e Copy frozenset stubs from 3/builtins.pyi into 2.7/__builtin__.pyi. 2016-01-27 14:32:45 -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
Tim Abbott
f036fd05f3 Add stubs for urllib.robotparser. 2016-01-26 20:25:30 -08:00
Guido van Rossum
bf1dde5636 Fix tokenize.pyi; fix cp command. 2016-01-26 20:01:34 -08:00
Tim Abbott
920def0b1e Fix datetime.timedelta() argument types to be floats. 2016-01-26 16:30:15 -08:00
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