Alejandro Giacometti and GitHub
87abd8a39f
requests: Fix type of request headers (#7773 )
...
Allow bytes values. In `Session` methods, `None` can be used to ignore the session's headers.
2022-05-16 23:33:46 +03:00
L and GitHub
487bef5a67
markdown: isBlockLevel() returns a bool value. ( #7839 )
2022-05-16 15:52:22 +02:00
Jukka Lehtosalo and GitHub
21a81c6575
sqlite3: Avoid optional type for 'description' ( #7842 )
...
Use the `| Any` trick instead, since it seems that in a lot of
code the value can be predicted to be non-`None` (if a query
has been executed previously, I think).
The docs don't mention the possibility of this being `None`, so
it seems likely that a lot of code doesn't check for it:
https://docs.python.org/3/library/sqlite3.html#sqlite3.Cursor.description
2022-05-16 14:54:15 +02:00
Jukka Lehtosalo and GitHub
dca33e5f8d
gettext: Make GNUTranslations.CONTEXT not final ( #7841 )
2022-05-16 13:32:02 +02:00
Sam Bull and GitHub
686cd6ef63
Add __version__/VERSION to redis ( #7838 )
2022-05-15 11:55:12 +01:00
L and GitHub
dbccdcb50e
markdown: @deprecated argument of message is a str. ( #7835 )
2022-05-12 18:48:20 -07:00
Adam Simpkins and GitHub
40d6592ba1
tarfile.gettarinfo() accepts PathLike objects ( #7832 )
...
This method has accepted PathLike objects since Python 3.6
(https://github.com/python/cpython/pull/512 )
2022-05-11 22:02:04 -07:00
L and GitHub
f8db698ece
markdown: PY37 is a bool ( #7831 )
2022-05-11 19:46:50 -07:00
Rick Voormolen and GitHub
693c4f19b4
Mark Future._callbacks as a @property ( #7829 )
2022-05-11 11:13:29 +02:00
Shantanu and GitHub
a27f15ef0e
builtins: reorder overloads ( #7828 )
...
This is slightly more friendly for --no-strict-optional (gross)
2022-05-11 01:00:52 -07:00
468d8adff1
stubtest_third_party: show package versions on failure ( #7826 )
...
Co-authored-by: hauntsaninja <>
2022-05-11 08:08:02 +02:00
Shantanu and GitHub
75d2f6c881
statistics: improve type for median_grouped ( #7825 )
2022-05-11 08:06:35 +02:00
b00b4f3447
regex: accept buffers ( #7680 )
...
Similar to #7679
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2022-05-10 15:08:36 -07:00
Jelle Zijlstra and GitHub
68a781d04e
Upgrade pytype ( #7823 )
2022-05-10 14:47:10 -07:00
Alex Waygood and GitHub
f8547a3f31
Use flake8-pyi 22.5.0, remove redundant parts of check_new_syntax ( #7821 )
2022-05-10 09:34:41 -07:00
Alex Waygood and GitHub
fed1f35c32
Remove explicit inheritance from object ( #7819 )
2022-05-10 16:24:53 +03:00
Sebastian Rittau and GitHub
b211bf31a3
Update testing_engine() annotations ( #7818 )
2022-05-10 12:46:01 +03:00
Shantanu and GitHub
550454c9aa
beautifulsoup4: small fixes and updates ( #7816 )
2022-05-10 09:17:40 +02:00
Shantanu and GitHub
032787d867
builtins: accept old-style iterables to iter ( #7817 )
2022-05-10 09:06:31 +02:00
Alex Waygood and GitHub
ac30b96d14
Use str instead of Text ( #7812 )
2022-05-09 20:47:11 +01:00
Jelle Zijlstra and GitHub
5c13f8bbce
ast: FormattedValue.conversion cannot be None ( #7810 )
...
```
In [4]: ast.dump(ast.parse('f"{x!r}"'))
Out[4]: "Module(body=[Expr(value=JoinedStr(values=[FormattedValue(value=Name(id='x', ctx=Load()), conversion=114)]))], type_ignores=[])"
In [5]: ast.dump(ast.parse('f"{x}"'))
Out[5]: "Module(body=[Expr(value=JoinedStr(values=[FormattedValue(value=Name(id='x', ctx=Load()), conversion=-1)]))], type_ignores=[])"
```
(On 3.9 but I don't think this has changed since 3.6.)
The stdlib also assumes this: https://github.com/python/cpython/blob/main/Lib/ast.py#L1211 (`chr(None)` doesn't work).
2022-05-08 19:42:38 -07:00
Mix and GitHub
32f474d6ef
subprocess: improve Popen.returncode type ( #7806 )
2022-05-08 16:53:44 -07:00
Alex Waygood and GitHub
8d8420bc54
Fix bugs in check_new_syntax.py ( #7808 )
2022-05-08 21:59:19 +01:00
Alex Waygood and GitHub
bb39bdfd30
Add test cases for pow that are meant to fail a type check ( #7760 )
2022-05-08 08:16:37 -07:00
Julian and GitHub
032d937bdf
#7805 : Ensure all references to mode are Literals, not str. ( #7807 )
2022-05-08 16:51:27 +02:00
Alex Waygood and GitHub
3ed7e3ba50
csv: annotate keyword arguments in various functions and methods ( #7788 )
2022-05-07 21:01:20 -07:00
Alex Waygood and GitHub
4e946b74bf
csv.pyi: minor cleanup (#7790 )
2022-05-07 10:49:27 +02:00
Alex Waygood and GitHub
5c6178a821
Import generics from standard modules in all third-party stubs ( #7791 )
2022-05-07 10:35:50 +02:00
Akuli and GitHub
6c6c669ada
Run mypy_primer in all pull requests ( #7804 )
2022-05-07 09:58:53 +03:00
Jelle Zijlstra and GitHub
6b5068b11d
Add new arguments to subprocess.Popen ( #7798 )
2022-05-07 09:49:23 +03:00
Alex Waygood and GitHub
16ca92fac7
Add http.HTTPMethod ( #7784 )
...
https://github.com/python/cpython/pull/91997
`description` isn't actually read-only at runtime, but I don't think there's any other way of telling type checkers "this is an attribute that the members have, not a member itself". And pretending it's a property is already what we do for `HTTPStatus`, which has the same issue.
2022-05-06 23:48:52 -07:00
Jelle Zijlstra and GitHub
031c998055
enum: Add member and nonmember ( #7795 )
...
python/cpython#92366
2022-05-07 07:48:34 +01:00
Akuli and GitHub
58f2e317c1
tkinter: add _windowingsystem() ( #7803 )
2022-05-06 23:45:47 -07:00
Jelle Zijlstra and GitHub
2fc719d3cf
tkinter: add info_patchlevel for 3.11 ( #7794 )
2022-05-07 09:25:55 +03:00
Jelle Zijlstra and GitHub
963b8aa2f7
add os.login_tty for 3.11 ( #7800 )
...
python/cpython#29658
2022-05-06 22:54:58 -07:00
Jelle Zijlstra and GitHub
4856064ed7
sys.flags: add safe_path for 3.11 ( #7797 )
...
python/cpython#31542
2022-05-06 22:50:30 -07:00
Jelle Zijlstra and GitHub
ab1dcafec2
socket: add SO_INCOMING_CPU for 3.11 ( #7801 )
...
python/cpython#31237
2022-05-06 22:46:34 -07:00
Jelle Zijlstra and GitHub
c93f262427
Add closure argument to exec() ( #7793 )
...
python/cpython#92204
2022-05-06 22:46:01 -07:00
e8b361983f
bs4: update to 4.11 ( #7785 )
...
Co-authored-by: hauntsaninja <>
2022-05-06 11:54:50 -07:00
Alex Waygood and GitHub
5f557176b4
_csv.pyi: minor cleanup (#7789 )
2022-05-06 11:38:19 -07:00
Ilya Konstantinov and GitHub
0b5213a213
flask-cors.decorator: allow re.Pattern objects to origins and allow_headers parameters (#7782 )
2022-05-06 19:34:51 +01:00
Rebecca Chen and GitHub
46fc7768c4
Add missing 'headers' property to urllib.error.HTTPError. ( #7783 )
...
Seen here: https://docs.python.org/3/library/urllib.error.html#urllib.error.HTTPError.headers
2022-05-05 14:05:51 -07:00
kasium and GitHub
92c578546a
Improve types of invoke/env.pyi ( #7780 )
2022-05-05 07:12:51 +01:00
Sebastian Rittau and GitHub
460537c7f6
Add missing redis modules and classes ( #7676 )
...
This adds asyncio support and support for redis.typing.
2022-05-04 11:29:13 +02:00
Sam Ezeh and GitHub
caaf0f1bf2
datetime: add UTC alias ( #7779 )
2022-05-04 00:00:08 -07:00
Jelle Zijlstra and GitHub
b1ccd03d51
Add GenericAlias.__unpacked__ ( #7774 )
2022-05-03 15:41:45 +02:00
Sam Ezeh and GitHub
ef878e925f
Add weakref_slot parameter to @dataclass decorator ( #7772 )
...
https://github.com/python/cpython/pull/92160
2022-05-03 10:37:06 +01:00
Shantanu and GitHub
4bcb1a95ab
Upgrade paramiko ( #7766 )
2022-05-02 20:52:14 +02:00
Sam Ezeh and GitHub
bf30fbd3d3
Add ZipFile.mkdir (new in 3.11) ( #7769 )
2022-05-02 07:32:37 -06:00
Jelle Zijlstra and GitHub
d77d848975
contextlib: Use bound TypeVar ( #7764 )
2022-05-02 08:57:21 +02:00