Commit Graph

116 Commits

Author SHA1 Message Date
Guido van Rossum
33f13dec18 Merge pull request #108 from jstasiak/python27-inspect
Improve Python 2.7 inspect stub
2016-03-09 13:07:37 -08:00
Guido van Rossum
49446569e1 Merge pull request #98 from ismail-s/feature/type_check_xml
Type check xml.etree module
2016-03-09 12:48:56 -08:00
Guido van Rossum
54ba6d9b73 Fix typos: termina[ta]te(). 2016-03-09 09:21:15 -08:00
Ismail
8d893cfae8 Make forward references strings 2016-03-09 11:58:24 +00:00
Ismail
28bc685573 Remove KeysView & ItemsView from py2 type hints 2016-03-09 11:09:34 +00:00
Ismail
69f1810462 Add pyi files for Py2.7 2016-03-09 11:09:33 +00:00
Jakub Stasiak
630f718376 Improve Python 2.7 inspect stub
This patch consists of:

* Splitting and reordering the content into sections corresponding
  to the module's documentation sections
* Implementing some missing functions
* Adding TODOs for missing stuff (I may've missed something)

The signature of isgenerator() (was: Any argument, is: argument of type
object) is changed for consistency with other is* functions I added
here, after some considerations I couldn't decide whether it should be
object or Any - if object is not advised please let me know.
2016-03-09 02:45:43 +01: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
96bb21f023 Stubs for pdb (only the most useful functions). 2016-03-07 12:17:41 -08:00
Guido van Rossum
01e817b17c Merge pull request #104 from ymyzk/update-gc
Update stub for gc
2016-03-05 21:03:43 -08:00
Yusuke Miyazaki
3193c317df Update stub for zlib 2016-03-06 10:03:55 +09:00
Yusuke Miyazaki
7c6e946386 Update stub for gc 2016-03-06 09:25:49 +09:00
Filip Hron
e7e50b6997 attempt to get rid of TODOS, should i edit tests too? 2016-03-03 16:55:33 +01:00
Filip Hron
5b92f7cbc5 putting @overload decorator back to getsockopt method 2016-03-03 10:15:56 +01:00
Filip Hron
fee8196459 overload fix 2016-03-03 10:10:45 +01:00
Filip Hron
0a11b5e898 putting @overload decorator back to getsockopt method 2016-03-03 10:07:57 +01:00
Filip Hron
d5cf02390f refractoring py2 socket by removing override decorator 2016-03-02 23:09:27 +01:00
Hong Minhee
9f1ea9c412 Specify attribute types of SyntaxError 2016-02-29 13:35:30 +09:00
Max Wittek
00758f39dd Fixed 2.7 stubs for traceback 2016-02-26 18:03:24 -08:00
Alessio Bogon
00779c9564 stub for decimal, 2.7 only 2016-02-26 20:49:50 +01:00
Lorenzo Bolla
e088d13f2f Issue #87 Stub for shelve
Py3's `shelve` is more restrictive, requiring keys to be `str`, whereas
Py2 allows any hashable type.

E.g.:

    s = Shelf({})
    s[1] = 'one'  # raises AttributeError in py3, but it's OK in Py2
2016-02-25 09:41:32 +00:00
Lorenzo Bolla
fb4910ed6d Remove Year/Month/Day/Week type aliases 2016-02-24 22:38:32 +00:00
Lorenzo Bolla
12d348fe67 Remove mention to internal variables 2016-02-24 22:19:25 +00:00
Lorenzo Bolla
ce938b367b Remove True/False/None optional arguments.
Use Optional[...] when appropriate.
Adhere to PEP-484 styling.
2016-02-24 21:01:41 +00:00
Lorenzo Bolla
d872968e32 Issue 88: Stub for calendar module 2016-02-24 12:43:27 +00:00
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