Philip House and Jukka Lehtosalo
830c2fb089
updating stderr to return type Any ( #776 )
2016-12-16 11:51:52 +00:00
David Fisher and Guido van Rossum
957307b785
Make filter work properly with Optional elements ( #775 )
2016-12-15 17:53:38 -08:00
KOSAKA Masayuki and Guido van Rossum
6fc57a419b
Adapt base64 stub to newer Python 3 versions ( #762 )
2016-12-14 08:52:19 -08:00
Tom Manderson and Guido van Rossum
5dbc7d1db6
Py2 SQLAlchemy: Move some TypeEngine functions from subclasses to TypeEngine ( #724 )
2016-12-13 15:38:55 -08:00
Henri Dwyer and Guido van Rossum
6887edebda
add calendar data attributes ( #751 )
2016-12-13 14:58:26 -08:00
jgarvin and Guido van Rossum
0392ccaa9c
Add stub for _thread.get_ident() ( #746 )
2016-12-13 14:56:06 -08:00
KOSAKA Masayuki and Guido van Rossum
3cae92253b
Fix datetime.fromtimestamp ( #759 )
2016-12-13 14:55:06 -08:00
Jelle Zijlstra and Guido van Rossum
918dab66d0
pstats: add stub ( #727 )
...
partially addresses #531
2016-12-13 14:51:57 -08:00
Philip House and Guido van Rossum
04f5c5699e
Merge 3.4 and 3.5 pathlib stubs ( #764 )
...
Fixes #659
2016-12-13 12:03:03 -08:00
Guido van Rossum and GitHub
b46280ec78
Make FrozenSet covariant. ( #769 )
...
Follow-up for PR #726 .
2016-12-13 11:40:18 -08:00
Philip House and Jukka Lehtosalo
bc252d69ac
set subprocess stdout to be type Any ( #581 ) ( #761 )
2016-12-13 14:23:45 +00:00
Thomas Aynaud and Łukasz Langa
0d7a5374c5
Add missing stubs for bz2
2016-12-12 14:06:10 -08:00
Matthias Kramm and Łukasz Langa
7e6000949e
it's threading.Lock, not threading.LockType
2016-12-12 12:02:01 -08:00
Matthias Kramm and Łukasz Langa
ac97b22365
add missing Ellipsis
2016-12-12 12:02:01 -08:00
Matthias Kramm and Łukasz Langa
8a5447be05
add 'Handler' and 'Filterer' classes to logging
2016-12-12 12:02:01 -08:00
Jelle Zijlstra and Łukasz Langa
97a6d27558
Make first argument to filter optional
...
```
$ python3.4
Python 3.4.3 (default, Nov 17 2016, 01:08:31)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> list(filter(None, [False, True]))
[True]
>>>
```
2016-12-12 11:31:12 -08:00
Daisuke Miyakawa and Guido van Rossum
57aa1923d5
Make sqlite3's Connection.rollback() return None ( #758 )
...
Fixes #747 .
2016-12-07 16:22:47 -08:00
George King and Jukka Lehtosalo
af5b5c83fd
Make shutil.copytree stub's ignore parameter optional. ( #740 )
...
* Make `shutil.copytree` stub's `ignore` parameter optional.
* python2.7 shutil.copytree `ignore` annotated as optional.
2016-12-07 14:47:34 -08:00
George King and Jukka Lehtosalo
e7db9cda4d
Add stub for os.path.commonpath (new in 3.5). ( #738 )
...
* Add stub for os.path.commonpath (new in 3.5).
2016-12-07 14:47:04 -08:00
George King and Jukka Lehtosalo
dccc29bc2f
Add None to type union for subprocess.Popen.communicate input. ( #743 )
...
* Add `None` to type union for `subprocess.Popen.communicate` stub's `input` parameter.
* subprocess.communicate `input` annotated as `Optional[AnyStr]` for both 2.7 and 3.x; `timeout` as `Optional[float]`.
2016-12-07 14:46:34 -08:00
Jukka Lehtosalo and Guido van Rossum
f39f9bf694
Make object_hook of json.load and json.loads optional (Python 2) ( #757 )
2016-12-07 13:32:56 -08:00
Daisuke Miyakawa and Jukka Lehtosalo
b33c2c6158
Introduce multiprocessing.freeze_support() ( #749 )
2016-12-07 13:30:14 -08:00
Philip House and Jukka Lehtosalo
090dafb9b0
fixes #559 ( #750 )
2016-12-07 13:28:37 -08:00
George King and Jukka Lehtosalo
00e4027b77
Add idx parameter to JSONDecoder.raw_decode. ( #742 )
2016-12-07 13:19:27 -08:00
George King and Jukka Lehtosalo
085c3f9915
Make json.load, json.loads stubs object_hook parameter optional. ( #741 )
2016-12-07 13:14:49 -08:00
Jon Dufresne and Guido van Rossum
2b022d18a4
Add stub for unittest.mock ( #731 )
...
Stub generated by stubgen.
Fixes #372
2016-12-07 08:05:01 -08:00
Matthias Kramm and Jukka Lehtosalo
79061f9de2
move simplejson from stdlib/ to third_party/ ( #752 )
2016-12-06 17:43:47 -08:00
Naomi Seyfer and Guido van Rossum
64124376aa
Make a few types in werkzeug more compatible with base types ( #730 )
...
* Make a few types in werkzeug more compatible with base types
* Keyword arguments to __delitem__ were private to implementation so can be left out
2016-12-06 16:14:46 -08:00
Onno Kortmann and Guido van Rossum
69ea0ad43f
Iteration and fetch* fixes to the sqlite3.Cursor type ( #663 )
...
- Cursor is an Iterator of Any now, and .__iter__(..) and .__next__(..)
have been changed / made explicit to reflect this.
- .fetchall(..)/.fetchmany(..)/.fetchone(..) return (lists of) Anys
instead of tuples.
As per discussion in PR #663 , the output of fetching values from the
cursor can be customized with a custom assignment to
.row_factory. Therefore the correct return type for fetching is Any and
not tuple.
2016-12-06 08:17:21 -08:00
Danny Weinberg and David Fisher
3855e7023f
Ignore a stub class that extends Any ( #745 )
...
Ignore a stub class that extends Any so that programs can use `--disallow-subclassing-any`.
2016-12-05 14:30:14 -08:00
Danny Weinberg and Guido van Rossum
679a6e5669
Give shutil.which a return annotation ( #744 )
2016-12-05 11:41:53 -08:00
Bertrand Bonnefoy-Claudet and Guido van Rossum
f447cbdc89
Fix resource_string type: from str to bytes ( #734 )
...
Fixes #733
2016-12-05 11:20:16 -08:00
George King and Guido van Rossum
4d59c04c16
Fix README.md to name mypy_test.py correctly. ( #737 )
2016-12-05 11:18:33 -08:00
thomascellerier and Guido van Rossum
d18a225ec2
Fix type for base64.b64encode, it should accept str or bytes ( #736 )
...
Fixes #735
2016-12-05 11:15:40 -08:00
Calen Pennington and Guido van Rossum
5ba7abc559
Add GenericMeta (so that classes can be Generic when they already hav… ( #703 )
2016-12-02 12:09:59 -08:00
Matthias Kramm and GitHub
a2559eeaeb
make pytype aware that 2.7/ has been renamed to 2/ ( #729 )
2016-12-02 06:10:14 -08:00
Philip House and Jukka Lehtosalo
8e1cad6837
#538 fixing concurrent.futures.ProcessPoolExecutor ( #728 )
2016-12-02 11:10:48 +00:00
Roy Williams and Jukka Lehtosalo
5d61aa5acb
Add stubs for jinja2 ( #722 )
...
I added strong types to the class that users are likely to interact with and left
the rest untyped for now. This is needed to support Flask.
Permission is given here - https://github.com/pallets/flask/issues/2012
2016-12-01 13:38:15 +00:00
Jelle Zijlstra and Jukka Lehtosalo
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
Naomi Seyfer and Jukka Lehtosalo
38d356503d
Increase compatibility of itsdangerous URLSafeSerializerMixin & Serializer ( #712 )
...
I'm preparing a PR to mypy that further formalizes and improves the rules for
which functions are "compatible" with each other, both for subtyping and for
assignment. This is the one place in the stubs that violates the new rules but
not the old: the supertype `Serializer` can take an optional positional argument
called `serializer` to `load_payload`, but until this diff the mixin used to
implement it could not, but rather could only take `serializer` as a named
argument, through its **kwargs.
2016-12-01 11:48:56 +00:00
Jelle Zijlstra and Jukka Lehtosalo
ed4f9e9b0b
urlencode: change parameters to Any instead of AnyStr ( #715 )
...
The implementation of this function calls str() on all arguments, so it accepts
any object (https://hg.python.org/cpython/file/3.5/Lib/urllib/parse.py#l801 ).
This was discussed on the mypy gitter chat.
2016-12-01 11:38:23 +00:00
Josiah Boning and Guido van Rossum
c9ad4b8dc0
Have frozenset inherit from FrozenSet ( #726 )
...
Fixes python/mypy#2514
2016-11-30 17:58:11 -08:00
Lukasz Langa
d1081b94ee
[logging] Fix forward references
2016-11-30 10:48:10 -08:00
Łukasz Langa and Guido van Rossum
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
Roy Williams and Łukasz Langa
0391e72a6e
Expose pytz.UTC as an instance as opposed to as a class ( #723 )
...
* Expose pytz.UTC as an instance as opposed to as a class
pytz shadows UTC after declaring it with a singleton:
https://github.com/newvem/pytz/blob/master/pytz/__init__.py#L135
This fixes https://github.com/python/typeshed/issues/710
2016-11-29 23:04:53 -08:00
Roy Williams and Łukasz Langa
1dff8e4a45
Add stubs for markupsafe ( #718 )
...
* Add stubs for markupsafe
* Add more specific types for markupsafe
This is needed for Flask. Permission was given here:
https://github.com/pallets/itsdangerous/issues/69#issuecomment-246516942
2016-11-29 13:32:12 -08:00
Guido van Rossum and Łukasz Langa
bbbf1d8c7a
PurePath.parent[s] should be properties ( #706 )
...
PurePath.parent[s] should be properties
2016-11-28 14:01:22 -08:00
Guido van Rossum and Łukasz Langa
33c0134b70
Move PY2 werkzeug stubs to 2/ directory.
...
We no longer use 2.7/ since that is the only version.
2016-11-28 13:48:19 -08:00
Peter Amstutz and Łukasz Langa
d0f6a05793
Fix logging.Logger.isEnabledFor() to return bool instead of None.
2016-11-28 13:46:40 -08:00
Roy Williams and Guido van Rossum
021b162bc9
Add stubs for werkzeug ( #530 )
2016-11-28 10:50:57 -08:00