Commit Graph

93 Commits

Author SHA1 Message Date
Jelle Zijlstra
918dab66d0 pstats: add stub (#727)
partially addresses #531
2016-12-13 14:51:57 -08:00
Thomas Aynaud
0d7a5374c5 Add missing stubs for bz2 2016-12-12 14:06:10 -08:00
Matthias Kramm
7e6000949e it's threading.Lock, not threading.LockType 2016-12-12 12:02:01 -08:00
Matthias Kramm
ac97b22365 add missing Ellipsis 2016-12-12 12:02:01 -08:00
Matthias Kramm
8a5447be05 add 'Handler' and 'Filterer' classes to logging 2016-12-12 12:02:01 -08:00
Philip House
090dafb9b0 fixes #559 (#750) 2016-12-07 13:28:37 -08:00
Jelle Zijlstra
392eb4aa5a add stubs for Python 2 profile and cProfile (#699)
* add stubs for Python 2 profile and cProfile

Partially fixes #531. Contrary to the Python 2.7 docs at
https://docs.python.org/2/library/profile.html#module-cProfile,
these modules do not have exactly the same interface. For
example, profile.Profile() does not have an enable() method.

* profile stubs: move to 2and3, add __init__, use private names for typevars
2016-12-01 11:51:41 +00:00
Lukasz Langa
d1081b94ee [logging] Fix forward references 2016-11-30 10:48:10 -08:00
Łukasz Langa
85807ed72a logging.Formatter attributes fixed (#721)
Fixes #720.

Related changes: used a NamedTuple for time.struct_time on Python 3, used
sys.version selectors for proper typing of #716, added missing *Style classes
to logging on Python 3.
2016-11-30 09:09:05 -08:00
Peter Amstutz
d0f6a05793 Fix logging.Logger.isEnabledFor() to return bool instead of None. 2016-11-28 13:46:40 -08:00
Naomi Seyfer
c134fe7638 handlers should be an optional argument of logging.basicConfig() (#704) 2016-11-24 09:21:10 +00:00
Anders Kaseorg
e13f2c739d Add Iterable base class to tarfile.TarFile (#693)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-23 11:49:44 +00:00
David Percy
9fa6c994a3 Fix zipfile getinfo return type (#678) 2016-11-10 11:08:57 -08:00
Guido van Rossum
970b6d5eb0 The distutils.Extension class does take positional args, and name+sources do not have defaults (#670) 2016-11-07 17:50:55 -08:00
TrueBrain
3452ff5bbd GenericBrowser has two parameters swapped around (#664) 2016-11-05 11:20:14 -07:00
Gerhard Hagerer
96123f8474 Added Lock.locked() method stub (#633)
https://docs.python.org/3/library/asyncio-sync.html#asyncio.Lock.locked
2016-10-26 07:17:59 -07:00
Jordan Pittier
83802c6724 stdlib/2and3/pkgutil: Arg 1 to "iter_modules" should be List[str] (#625)
According to https://docs.python.org/2.7/library/pkgutil.html#pkgutil.iter_modules and https://docs.python.org/3/library/pkgutil.html#pkgutil.iter_modules: "path should be either None or a list of paths to look for modules in."
2016-10-21 16:56:34 -07:00
Matthias Kramm
7d80824092 Better definition for xml/sax/__init__.pyi. (#621)
Also, merge 2.7/xml/sax and 3/xml/sax into 2and3/xml/sax.
2016-10-19 15:30:25 -07:00
Matthias Kramm
b0eae4bf46 allow to use RLock in type annotations (#595) 2016-10-10 16:52:47 -07:00
Alvaro Caceres
92b600540e Add private members to stdlib threading (#590)
* Add threading._DummyThread

* Make threading.RLock a factory function, not a class

Will break code that currently uses a threading.RLock type annotation
2016-10-07 13:11:47 -07:00
Alvaro Caceres
674fe2b59f Add threading.Condition.notifyAll (#587)
Documented in py2, undocumented in py3
2016-10-06 14:14:08 -07:00
Matthias Kramm
ccd1dc1fac fix 2.7 version of Logger.debug (#578) 2016-09-29 12:02:12 -07:00
Robin Alazard
1002950322 Add missing method add_mutually_exclusive_group(...) to argparse group (#573) 2016-09-26 12:07:47 -07:00
Guido van Rossum
ed97067f6d Different fix for locale/str/__builtin__ issue (#570) 2016-09-23 10:18:04 -07:00
Gustavo J. A. M. Carneiro
bda2b54dfc itemgetter parameters can be any type that the container accepts, not just int (#564) 2016-09-23 05:40:16 -07:00
Matthias Kramm
76c0850eb2 Use the correct __builtin__/builtins module in Python 2/3. (#569) 2016-09-23 05:38:35 -07:00
Guido van Rossum
c9dbb96f1d Change mmap to use bytes. 2016-09-19 15:17:09 -07:00
Michael Lee
ec2b9ce97e Add partial stubs for fractions (#544)
This commit adds some incomplete stubs for the fractions module. In
particular, this commit does not add type signatures for the more
complex functions (such as `__add__`), and just leaves their types as
effectively `Any`.
2016-09-14 16:40:17 -07:00
Michael Lee
f29a996501 Refine stubs for numbers.pyi (#543)
* Partially refine numbers.pyi

This commit refines numbers.pyi. More specifically, it...

- Adds in explicit type annotations where it's obvious how to do
  so (leaving more non-obvious type signatures alone).
- Adds in missing '@abstractmethod' decorators
- Combines together the Python 2 and Python 3 versions of numbers.pyi.

* Merges Python 2 and Python 3 numbers.pyi

This commit removes the old `stdlib/2.7/numbers.pyi` file and moves the
previously-committed `stdlib/3/numbers.pyi` to the shared `2and3`
directory.

* Modify comment at top of numbers.pyi

Since the stubs are no longer identical to what stubgen creates, the
comment should also probably be changed.
2016-09-14 08:12:36 -07:00
Guido van Rossum
08d1069d6b Since 2.6, the plistlib module is not Mac-specific. 2016-09-13 13:34:40 -07:00
Alvaro Caceres
0321b2179b Declare logging.root -- undocumented but used. (#534) 2016-09-12 10:21:16 -07:00
Matthias Kramm
e70be5fbe2 trim pytype testing blacklist (#527) 2016-09-09 06:30:36 -07:00
Valérian Rousset
1d5b35b2a5 Merge tarfile (#467) 2016-09-03 08:40:45 -07:00
Elazar
f1047ec005 Stub: asyncore.pyi (#498)
* Stub: asyncore.pyi

I can't really test this stub since I don't use this module. I believe it's not far from the real thing.

It's based on the source code and not on the documentation.

https://hg.python.org/cpython/file/default/Lib/asyncore.py

* Option ->Optional

* add hint to count, remove addr

* make read/write explicit functions

* add synchat.pyi, move to 2and3

* change sys.version_info test

* try reversing the syntax
2016-08-26 13:34:42 -07:00
Guido van Rossum
73bdb705bf Delete ctypes. It is not yet ready for prime time, alas.
See https://github.com/python/typeshed/issues/475
2016-08-24 10:56:23 -07:00
Valérian Rousset
9f1e90b33f Merge bisect (#468)
* merge bisect

* comment while mypy#2035
2016-08-24 06:07:40 -07:00
David Euresti
ff86b1bd26 Remove empty wintypes module which just causes imports to break (#490) 2016-08-22 08:48:33 -07:00
Tom Manderson
9fd0fd97c6 Make FileType valid for ArgumentParser 'type' arg (#473) 2016-08-15 11:42:48 -07:00
Tyler O'Meara
1bb090d6f8 Adds logging PlaceHolder class and Logger attributes (#472)
Adds several attributes which were missing from the Logger types,
including "name", "level", and "parent". Because the type of "parent"
is a union of Logger and PlaceHolder, we also define types for
PlaceHolder and all of it's methods.
2016-08-15 11:42:02 -07:00
Valérian Rousset
17f7d3db20 Add ctypes (#454)
* util done

* __init__, 16.16.2.2 done

* 16.16.2.3 done

* 16.16.2.4

* fix *FUNCTYPE, fix generic

* remove part of generic

* temporarly broad some type

* 16.16.2.5

* 16.16.2.6

* 16.16.2.7

* 16.16.2.8

* 16.16.2.9 and cleanup

* no documentation on wintypes

* move from _SimpleCData to _CData

* base on some example

* py2 done, cleanup

* make pytype happy
2016-08-15 11:39:23 -07:00
Valérian Rousset
2824cd1197 Improve locale (#462) 2016-08-10 13:52:29 -07:00
Valérian Rousset
59d06de83e add rlcompleter (#455) 2016-08-10 13:39:38 -07:00
Valérian Rousset
ebdf9d68b2 add termios (#456) 2016-08-10 12:09:54 -07:00
Valérian Rousset
4e55f0561f Improve traceback (#465) 2016-08-10 11:18:35 -07:00
David Euresti
5de7bfe185 Add missing classes to distutils.version (#450) 2016-08-05 14:50:14 -07:00
Valérian Rousset
e3a1ddfbeb add readline module (#448) 2016-08-05 12:04:01 -07:00
Valérian Rousset
4fa352e6fa add keyword module (#446) 2016-08-05 12:03:21 -07:00
Valérian Rousset
a1e1d6c355 Add code (#447)
* 30.1.0

* 30.1.1

* 30.1.2
2016-08-05 07:55:43 -07:00
Valérian Rousset
5a5138aa1e Add stubs for pkgutils (#431)
* py3 done (py2 pass empty)

* remove dangling importlib

* importlib.abc only exists in py3
2016-08-03 15:40:37 -07:00
Valérian Rousset
2e560d38dc Improve distutils (#418)
* remove old distutils

* core done

* ccompiler done

* compilers done

* archive_util done

* dep_util done

* dir_util done

* file_util done

* util done

* dist done

* debug, error, extension done

* fancy_getopt done

* filelist, log, spawn done

* sysconfig done

* text_file done

* version done

* cmd done

* add command

* add emxccompiler which is py2 only

* command.build_py have spec only in py3

* make pytype happy by resolving relative import
2016-08-03 15:38:15 -07:00