Commit Graph

8482 Commits

Author SHA1 Message Date
Ben Darnell 2ddbf901c9 2.7 stub updates (#149)
* Stubgen modules for 2.7

Cookie
email._parseaddr
email.utils
genericpath
linecache
mimetypes
multiprocessing
multiprocessing.process
multiprocessing.util
posixpath
quopri
runpy
weakref
wsgiref.validate

* 2.7/typing.py: add missing __contains__ definition

* 2.7/subprocess.py: make output argument to CalledProcessError optional

Commit f08160bd did the same for py3.

* 2.7/hmac.pyi: add compare_digest

This function was introduced to the 2.7 series in 2.7.7.

* Stubgen 2.7/ssl.pyi

This replaces a nearly-empty handwritten stub.

* Copy constants and other definitions from py3 to py2 ssl.pyi

* 2.7/__future__.pyi: add methods

* 2.7/_weakref.pyi: backport some definitions from 3.x version

* Stubgen 2.7/locale.pyi

Hand-edited to remove declarations that are redundant (and cause
conflicts with) the "from _locale import *" line.
2016-04-17 19:02:55 -07:00
Jukka Lehtosalo fcef262a9b Support keyword arguments for dict() (Python 2) (#148) 2016-04-17 13:07:54 +01: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
Jukka Lehtosalo 70c2274e94 Update dict(...) to accept keyword arguments (#147)
We can't describe the fact that a keyword argument results in a 'str'
dictionary key in a stub. This needs to be handled elsewhere.
2016-04-16 16:30:15 +01:00
Guido van Rossum 23ec1ff96a Break cycle between typing and collections. (Requires a fix in mypy.) 2016-04-15 21:31:49 -07:00
Drew Haven e8a477d69d Simple stub for tornado.testing (#145) 2016-04-13 13:09:12 -07:00
Matthias Kramm 9ff4bc1f60 Merge pull request #142 from smarkets/bz2-stub
Add a very basic bz2 stub
2016-04-13 07:51:20 -05:00
Jakub Stasiak 7535d41471 Add a very basic bz2 stub 2016-04-13 11:44:43 +02:00
David Fisher 761cbf3f59 Fix syntax error (#144) 2016-04-12 16:09:07 -07:00
Yasushi Saito 7389610937 Added type declaration for multiprocessing.pool.ThreadPool and AsyncResult. (#143) 2016-04-12 14:42:15 -07:00
Pas 68306484ae py3: traceback.pyi: added format_stack (#125) 2016-04-10 21:42:49 -07:00
Guido van Rossum c7cdcede71 Merge pull request #141 from bdarnell/updates
Various updates to stdlib modules
2016-04-10 21:40:30 -07:00
Ben Darnell 54e4f51e25 Stubgen _operator.
This is needed by hmac. Stubgen has a parse failure on the operator
module (without the underscore prefix).
2016-04-11 00:27:58 -04:00
Ben Darnell 21d082a4bc Stubgen curses (and _curses)
Manual tweak to remove reference to curses.has_key (which is a fallback
for when the C module doesn't have it)
2016-04-11 00:27:58 -04:00
Ben Darnell 9fa161fe51 Stubgen gzip (and _compression) 2016-04-11 00:27:58 -04:00
Ben Darnell e2dde66eb1 Stubgen assorted stdlib modules 2016-04-11 00:27:58 -04:00
Ben Darnell 57e25550bc concurrent.futures: stubgen
Imports had to be fixed up manually.
2016-04-11 00:27:58 -04:00
Ben Darnell a3498d9883 weakref: add WeakKeyDictionary 2016-04-11 00:27:58 -04:00
Ben Darnell 9d2f90d2dc collections: convert from module to package
Making room for collections.abc
2016-04-11 00:27:58 -04:00
Ben Darnell f489c54501 traceback: make first argument to format_exc optional 2016-04-11 00:27:58 -04:00
Ben Darnell f08160bd4c subprocess: make output argument to CalledProcessError optional 2016-04-11 00:27:58 -04:00
Ben Darnell 0248a5cbcf Add methods to __future__._Feature 2016-04-11 00:27:58 -04:00
Katherine Lai 8c59f8f58e Fix select stub for 2.7 (timeout should be optionally present and float) (#135) 2016-04-10 20:46:37 -07:00
Guido van Rossum 4f483dc314 Precision surgery to take out sqlalchemy test failures (#140)
* Comment out parts of the sqlalchemy stubs to make tests pass.

* Run all tests, one step per Python version.
2016-04-10 20:45:42 -07:00
Ivan Levkivskyi db3cc2e8da Enable typing.DefaultDict as an alias for collections.defaultdict (#139) 2016-04-09 09:32:20 -07:00
Matthias Kramm 5f76369093 Move warnings.pyi into 2and3/. 2016-04-08 14:43:43 -07:00
Matthias Kramm 28dbd6cc6a change ='' to :str=... in httplib 2016-04-08 11:59:34 -07:00
Matthias Kramm 68400b74ab Add 2.7/optparse.pyi 2016-04-08 11:49:14 -07:00
Matthias Kramm b817f83e11 Add missing return type for __init__() 2016-04-08 11:40:32 -07:00
Max Wittek a6f1075055 Added stubs for 2.7 Selenium WebElement
* Added stubs for 2.7 Selenium WebElement

* Removed silly autogenerated imports

* Added List import

* Added WebDriver as well

* Updated webdriver stubs for find*
2016-04-07 17:48:04 -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 5894f631ae Merge pull request #134 from tharvik/master
add `__dict__` attribute to class instance
2016-04-04 08:38:12 -07:00
tharvik 3c92450972 add __dict__ attribute to class instance 2016-04-04 08:46:04 +02:00
Guido van Rossum 5be96f78d8 Merge pull request #129 from isg/patch-2
Update dbapi2.pyi to allow `execute` without binding params
2016-03-23 13:30:57 -07:00
Isaac Goldberg f2c309b363 Also updates python3's sqlite execute() 2016-03-23 13:12:13 -07:00
Isaac Goldberg bc2716ff33 Update dbapi2.pyi to allow execute without binding params
According to https://docs.python.org/2/library/sqlite3.html this is totally allowed!
2016-03-23 11:47:52 -07:00
Guido van Rossum 7484499ce5 Merge pull request #121 from jukebox/fileinput
fileinput first version
2016-03-23 10:35:04 -07:00
Julien Hebert 6d68962ed7 with Guido fixes 2016-03-23 08:30:39 +01: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 53e2d43f37 Merge pull request #127 from mulkieran/master-reduce
Fix signature for reduce in some files.
2016-03-22 08:36:07 -07:00
mulhern f1d08cb420 Fix signature for reduce in some files.
I believe that the signature in stdlib/3/functools.pyi is the correct model
for all versions of reduce.
2016-03-22 10:24:44 -04:00
Julien Hebert 2eaf1933b8 files is optional 2016-03-22 08:38:08 +01:00
Julien Hebert 83e51ac3cb inherit 2016-03-22 06:33:31 +01:00
Julien Hebert a8d2158aaf missing import 2016-03-21 11:00:55 +01:00
Julien Hebert 871ebbf566 io anystr 2016-03-21 10:58:00 +01:00
Julien Hebert 6df6bc8f86 missing callable 2016-03-20 21:55:42 +01:00
Julien Hebert 5ae1c1beb7 wrong syntax 2016-03-20 14:20:24 +01:00
Julien Hebert 703b88b0c0 openhook is callable 2016-03-20 14:10:33 +01:00