Guido van Rossum and GitHub
9d9527c94c
Get rid of BLOCKED label in favor of [WIP] subject prefix ( #1956 )
...
We (I) introduced the BLOCKED label ~2 years ago, but it never got much usage, and I remember it startled some developers (Ivan may recall...). A better convention seems to put [WIP] in the subject, so let's standardize on that and get rid of the BLOCKED label.
I already removed the BLOCKED label and edited the subject of the one issue under it.
We also don't make good use of the other labels, but they seem more useful and less controversial.
2018-03-09 10:39:30 -08:00
Martin DeMello and Matthias Kramm
b0d5a2100e
add progress monitoring ( #1945 )
2018-03-08 15:37:45 -08:00
Dan Sully and Jelle Zijlstra
ef87943397
Update click.option to allow for user defined kwargs. ( #1950 )
...
Click's option decorator can take a cls= argument, which allows that class to parse arbitrary arguments from the decorator.
2018-03-07 10:32:55 -08:00
David Euresti and Jelle Zijlstra
df65f6ea15
Better type for click 'type' argument ( #1903 )
...
The call accepts tuples of types and callback methods
2018-03-06 21:41:21 -08:00
Svyatoslav Ilinskiy and Jelle Zijlstra
d702d3621c
Complete stubs for email package in python2 ( #1936 )
...
Fix #685 , fix #275
2018-03-06 21:38:01 -08:00
Salvo 'LtWorf' Tomaselli and Jelle Zijlstra
89e5d9607c
Add missing headers field ( #1946 )
2018-03-06 21:36:33 -08:00
yed podtrzitko and Jelle Zijlstra
1fe9fd83fa
validator.instance_of can contain sequence of types ( #1920 )
2018-03-06 10:18:33 -08:00
David Euresti and Jelle Zijlstra
50c7188300
Work around mypy issue #4554 in attr.Factory ( #1933 )
...
This makes the following not give a type error:
y: DefaultDict[str, List[int]] = Factory(lambda: defaultdict(list))
2018-03-05 19:21:14 -08:00
Ethan Smith and Jelle Zijlstra
1c47458ac6
Add cache_clear to lru_cache ( #1941 )
2018-03-05 18:52:46 -08:00
Matthias Kramm and Jelle Zijlstra
6c30806d07
add deprecation comment to mypy_extensions ( #1943 )
2018-03-05 18:51:14 -08:00
rchen152 and Matthias Kramm
38dc8f5a6a
Switch usages of mypy_extensions.NoReturn over to typing.NoReturn. ( #1942 )
...
* Change mypy_extensions.NoReturn to typing.NoReturn everywhere.
2018-03-05 12:42:29 -08:00
Rob Day and Guido van Rossum
f91163d729
Fix type of loop parameter to start_unix_server ( #1939 )
2018-03-03 13:34:02 -08:00
Guido van Rossum and GitHub
ac465ea224
Add guideline for undocumented objects. ( #1938 )
...
Also add Ivan as a typeshed core dev (since he is in the group).
2018-03-02 11:54:51 -08:00
Miguel Gaiowski and Guido van Rossum
a8465da863
Add stub for subprocess.list2cmdline function ( #1898 )
2018-03-02 11:04:22 -08:00
Kenny Do and Jelle Zijlstra
156927d2a2
tzinfo.tzname is optional ( #1934 )
2018-02-28 19:14:12 -08:00
Takuya Akiba and Jelle Zijlstra
74345aa898
Add missing next method to iterators returned by Pool.imap ( #1926 )
2018-02-28 18:34:30 -08:00
Takuya Akiba and Jelle Zijlstra
7e169a29c2
Add multiprocessing.pool to Python 2 stub ( #1932 )
2018-02-28 11:22:11 -08:00
rchen152 and Jelle Zijlstra
e1243d0103
Add missing attributes, fix some parameter types in argparse.Action. ( #1907 )
2018-02-28 11:20:04 -08:00
Roy Williams and Jelle Zijlstra
a618ee30d4
Fix instantiating a xml.etree.ElementTree.Element ( #1930 )
...
The methods removed by https://github.com/python/typeshed/pull/1816
are abstract in `MutableSequence` and therefore must be specified on `Element`.
2018-02-27 14:59:11 -08:00
Josh Holland and Jelle Zijlstra
c9eead5890
Make some arguments in secrets module optional ( #1929 )
2018-02-27 10:52:21 -08:00
Takuya Akiba and Jelle Zijlstra
5e37071a42
Fix imports to expose error classes in multiprocessing module ( #1928 )
2018-02-27 09:47:18 -08:00
rchen152 and Matthias Kramm
066c434410
Improve the unittest stubs. ( #1927 )
...
* Improvements to stdlib/2/unittest.pyi
* Adds a bunch of missing things.
* Fixes the signatures of assertRaises and failUnlessRaises.
* Corrects the name of a TestCase subclass from CallableTestCase
to FunctionTestCase.
* Makes defaultTestLoader an instance of TestLoader, as it should
be, rather than an alias. Based on https://docs.python.org/2/library/unittest.html and
https://github.com/python/cpython/tree/2.7/Lib/unittest .
* Improvements to stdlib/3/unittest/__init__.pyi
* The constructor arguments to TextTestResult are all required.
* There is a module-level load_tests() function.
* removeResult() returns a bool. Based on https://docs.python.org/3/library/unittest.html and
https://github.com/python/cpython/tree/master/Lib/unittest .
2018-02-27 06:46:10 -08:00
Łukasz Langa and Jelle Zijlstra
9b6df1d6bc
[tokenize.open] Accept PathLike filename ( #1921 )
...
* [tokenize.open] Accept PathLike filename
* Still accept str, bytes and int on Python 3.6+
2018-02-26 11:01:48 -08:00
Han Song and Jelle Zijlstra
a5c9093edc
Allow requests.post to accept str for data. ( #1922 )
...
```python
import json
url = 'https://api.github.com/some/endpoint '
payload = {'some': 'data'}
r = requests.post(url, data=json.dumps(payload))
```
2018-02-25 22:19:35 -08:00
David Euresti and Jelle Zijlstra
61e63293f1
Work around mypy issue #4554 in attrs. ( #1914 )
2018-02-24 13:00:15 -08:00
Sebastian Rittau and Jelle Zijlstra
38aea73b4b
Merge Python 2 and 3 versions of time.pyi ( #1909 )
...
* Use variable annotations
* Replace default values by ellipses
* Remove exceptions from function bodies
* Remove superfluous comments
* Remove superfluous newlines
* Use Optional instead of Union[..., None]
* Replace Union[int, float] by just float
* Make time.pyi (Python 2) more closely resemble the Python 3 stub
* Replace _TIME_TUPLE by TimeTuple
* Reorder imports
* time.pyi: Mark two arguments as optional, mark Unix-only function
* time.pyi (Python 2): Use TimeTuple in NamedTuple and reformat
This makes time.pyi more closely match the Python3 version.
* Merge Python 2 and 3 versions of time.pyi
* Only import SimpleNamespace on Python >= 3.3
* Remove default values from module properties
* Remove Optional from strftime() and asctime()
* accept2dyear was removed in Python 3.3
* Rename TimeTuple to _TimeTuple
2018-02-24 11:49:37 -08:00
Jelle Zijlstra and GitHub
35d3effe03
Remove version check for deque.insert and deque.index ( #1916 )
...
Otherwise, deque is not instantiable in Python 3.4. We could do a dynamic base class instead
but that doesn't seem worth it.
2018-02-24 11:12:56 -08:00
Jelle Zijlstra and GitHub
ab72267669
also test 3.7 with mypy ( #1917 )
2018-02-24 09:56:35 -08:00
Jason Fried and Jelle Zijlstra
f5b3979b70
contextlib.pyi ExitStack.callback take Callable ( #1908 )
...
* contextlib.pyi ExitStack.callback take Callable
The documentation for ExitStack does not specify the return type of the callable's passed to callback.
Saying that they always return None breaks a very common use case for ExitStack, which is to "schedule" changes to a collection
while iterating it.
```
with ExitStack() as stack:
for key, value in adict.items():
if ...:
stack.callback(adict.pop, key)
```
I also added AsyncExitStack, using Awaitable.
* Moving to Explicit Any in Generics
2018-02-24 09:41:13 -08:00
Ethan Smith and Jelle Zijlstra
f91c891ad4
Fix name collision in contextlib on 3.7 ( #1915 )
2018-02-24 09:25:47 -08:00
Roy Williams and Jelle Zijlstra
8891b02d51
Make update parameters all optional ( #1913 )
...
As of https://github.com/pynamodb/PynamoDB/pull/352 all of these params are optional.
2018-02-23 13:18:55 -08:00
Daniel Li and Jelle Zijlstra
84b6e95bdc
Accept unicode in importlib.import_module ( #1910 )
...
On Python 2, importlib.import_module accepts bytes or unicode.
2018-02-22 09:05:06 -08:00
Daniel Li and Jelle Zijlstra
2c6296034f
Future.set_running_or_notify_cancel returns bool ( #1911 )
...
Future.set_running_or_notify_cancel returns a bool, not None. See commit
13bcc79c12 , where this problem was fixed
for Python 2.
2018-02-22 09:03:37 -08:00
Ivan Levkivskyi and Jelle Zijlstra
7ae2f25216
Fix some problems introduced by recent commits. ( #1905 )
2018-02-20 13:34:48 -08:00
shahin and Jelle Zijlstra
d3a9650fa1
Fix return type of re.match, re.search ( #1886 )
2018-02-19 09:23:57 -08:00
David Euresti and Jelle Zijlstra
8ecb74012a
Add __divmod__ to numeric types ( #1900 )
...
Helps with #1889
2018-02-18 16:59:12 -08:00
Pradyun Gedam and Guido van Rossum
b6bd58268b
Update base class to match the source file ( #1899 )
2018-02-18 09:03:09 -08:00
Daniel Bowman and Jelle Zijlstra
1707d8f466
Improve pymysql types ( #1804 )
...
Add all cursor types and missing show_warnings method in connections
Added show_warnings to connections. No return type specified as this
requires tracing back through missing return types in previous
author's work. This is out of scope for this pull request.
Added SSDictCursor, SSCursor and DictCursorMixin to complete the
Cursors definition.
2018-02-16 17:23:17 -08:00
Mark Amery and Jelle Zijlstra
0c2249fbd6
Add FileHandler properties ( #1834 )
...
Fixes #1833 .
2018-02-16 17:21:30 -08:00
Ilya Kulakov and Jelle Zijlstra
1e8b953182
Add stub for AsyncExitContext added by bpo-29302. ( #1876 )
...
* Add stub for AsyncExitContext added by bpo-29302.
* ExitStack's pop_all returns an instance of type(self).
2018-02-16 17:17:17 -08:00
Łukasz Langa and Jelle Zijlstra
18ae67d040
[stdlib/3/multiprocessing] Add queues.pyi, make the other stubs use it ( #1879 )
2018-02-16 17:00:44 -08:00
Asim Goheer and Jelle Zijlstra
e7b567c1f4
Issue 1858: pynamodb 3.2.1 added new methods in Attributes which are not in typeshed ( #1859 )
2018-02-16 16:54:45 -08:00
Roy Williams and Jelle Zijlstra
71c2a94cb8
Allow os.listdir to accept a PathLike in Python3.6 ( #1894 )
2018-02-16 16:42:58 -08:00
Roy Williams and Jelle Zijlstra
0f36f7ea09
Treat all pynamodb Numbers as floats ( #1895 )
...
Previously we specified this as a Union type, which caused more problems than it helped with, namely when reading data off a Pynamo property
We still had to cast to the appropriate type. Pynamo simply reads the type out of Dynamo, which more closely models a float as it can be an int or a float -
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html
2018-02-16 16:42:32 -08:00
Guido van Rossum and Jelle Zijlstra
37ec012113
Change the type of BaseException.message to Any ( #1887 )
2018-02-16 13:42:28 -08:00
Guido van Rossum and GitHub
100a071729
Make the urllib.quote/unquote functions generic ( #1891 )
...
When given unicode they will return unicode.
Also make 'safe' Text.
Fixes #1893 .
2018-02-16 13:14:05 -08:00
Nick Gaya and Jelle Zijlstra
3e85d6bb61
Add missing unittest.mock.patch attributes ( #1882 )
2018-02-16 09:13:33 -08:00
Łukasz Langa and Jelle Zijlstra
2e278f2aeb
[stdlib/2and3/__future__] Add PEP 563 annotations ( #1880 )
2018-02-14 09:23:17 -08:00
Marti Raudsepp and Łukasz Langa
d288f443b9
Merge {IO,Environment,Windows}Error into OSError for Python 3.3+ ( #1852 )
...
Starting with Python 3.3, IOError, EnvironmentError and WindowsError are
aliases for OSError, which has all the attributes.
Reference:
* https://docs.python.org/3/library/exceptions.html#OSError
* https://www.python.org/dev/peps/pep-3151/
* OSError: Drop Python <3.3 compatibility
* Use Any instead of Union for filename/filename2 type, per GvR comment
See: https://github.com/python/mypy/pull/4541
2018-02-14 16:33:56 +00:00
rchen152 and Łukasz Langa
8d46ada49d
Add undocumented but occasionally used attributes to inspect.pyi. ( #1864 )
...
* Add attributes not in docs to 2/inspect.pyi.
* Add attributes not in docs to 3/inspect.pyi.
* Change list to List[Any] in 2/inspect.pyi
2018-02-14 16:20:55 +00:00