Jelle Zijlstra
583b600db0
asyncio: improve bytes handling ( #9013 )
2022-10-29 00:36:44 +02:00
Jelle Zijlstra
b8659e69f5
array: one more bad bytes type ( #9022 )
2022-10-28 14:18:19 -07:00
Jelle Zijlstra
b5c4580d52
CONTRIBUTING: Note no bytearray promotion ( #9005 )
...
Closes #9001
2022-10-28 13:48:59 -07:00
Jelle Zijlstra
05acb6c5c3
_msi: improve types ( #9008 )
2022-10-28 15:36:57 +02:00
Jelle Zijlstra
287fce4872
ssl, socket, array: Improve bytes handling ( #8997 )
2022-10-28 15:35:51 +02:00
Jelle Zijlstra
bcd876f77e
_codecs: Fix buffer parameters ( #9003 )
2022-10-28 11:25:21 +02:00
Jelle Zijlstra
f792b14e7f
_tcl: fix bytes usage ( #9010 )
2022-10-28 11:07:56 +02:00
Jelle Zijlstra
cb90e9d3a5
bz2: fix bytes parameters ( #9015 )
2022-10-28 11:01:03 +02:00
Jelle Zijlstra
97d8519f33
base64: fix a85decode param type ( #9014 )
2022-10-27 21:07:10 -07:00
Jelle Zijlstra
6438c7355c
_winapi: takes a ReadableBuffer ( #9011 )
2022-10-27 20:24:45 -07:00
Jelle Zijlstra
e8e69efd2b
antigravity: takes a ReadableBuffer ( #9012 )
2022-10-27 20:19:24 -07:00
Jelle Zijlstra
51c92d8975
_posixsubprocess: improve types ( #9009 )
2022-10-27 20:00:21 -07:00
Jelle Zijlstra
e0aa539854
_curses: improve bytes handling ( #9007 )
2022-10-27 19:48:08 -07:00
Jelle Zijlstra
5bcd4c1a93
ast: parse takes a ReadableBuffer ( #9002 )
...
parse() is basically just a wrapper around compile(), which we
already have as taking ReadableBuffer.
2022-10-27 13:28:02 -07:00
Jelle Zijlstra
739711e947
lzma: Takes ReadableBuffer, not bytes ( #8996 )
2022-10-27 07:02:57 -07:00
Jelle Zijlstra
f8ae34c34e
psutil: add snicstats.flags ( #8928 )
...
Fixes #8927
See https://github.com/giampaolo/psutil/commit/70eecaf44d61f2cabcd22ffb407b904242a122c9
2022-10-18 18:04:07 -07:00
Jelle Zijlstra
1b04ef2673
bytes, bytearray constructors: support buffers ( #8924 )
2022-10-18 19:20:20 +01:00
Jelle Zijlstra
9733901770
psycopg2: __nonzero__ was removed ( #8863 )
...
Fixes #8862
2022-10-07 02:23:56 +01:00
Jelle Zijlstra
c1d307fc3b
black: upgrade ( #8659 )
2022-08-31 16:01:52 -07:00
Jelle Zijlstra
5477097c6d
Upgrade pyright ( #8541 )
2022-08-12 20:24:51 -07:00
Jelle Zijlstra
b418c1c3ba
beautifulsoup4: Fix type of Tag.__iter__ ( #8357 )
2022-07-21 21:32:15 +02:00
Jelle Zijlstra
55562b83a1
threading: __exit__ only returns None ( #8298 )
...
Fixes #8297
`threading.Lock.__exit__` is implemented in C and can only return None: https://github.com/python/cpython/blob/6cbb57f62d345d7a5d6aeb1b3b5d37a845344d5e/Modules/_threadmodule.c#L200
`threading.Condition.__exit__` returns whatever its lock's `__exit__` returns, but our type annotations indicate that the lock is always a `Lock` or an `_RLock`, and neither returns anything other than None.
2022-07-14 20:00:08 -07:00
Jelle Zijlstra
0306754f5f
os: pos-only params for various functions ( #8284 )
2022-07-12 12:30:19 -07:00
Jelle Zijlstra
2a7439e106
Revert "add overload to tuple.__new__ to better express an empty tuple" ( #8278 )
...
This reverts commit 64554bdd5d .
Also add a test case.
2022-07-12 12:29:37 -07:00
Jelle Zijlstra
2a1b33df9f
os: Params for posix_fallocate and posix_fadvise are pos-only ( #8283 )
...
https://github.com/python/cpython/blob/90a6e56e5663233fe986331ef3f10422fe57dcbc/Modules/posixmodule.c#L10845
2022-07-12 12:19:41 -07:00
Jelle Zijlstra
56c8cbb314
Add GenericAlias.__typing_unpacked_tuple_args__ ( #8015 )
...
Fixes #8014
python/cpython#92484
2022-06-03 08:26:41 +01:00
Jelle Zijlstra
cb9023988d
psycopg2: stub improvements ( #7964 )
...
Fixes an entry from #7928 along with a number of other improvements.
I went off the C code:
https://github.com/psycopg/psycopg2/blob/master/psycopg/connection_type.c
2022-06-02 18:02:07 -07:00
Jelle Zijlstra
1aa546d07d
pyright: turn off reportPropertyTypeMismatch ( #7985 )
2022-05-30 09:20:28 +02:00
Jelle Zijlstra
c35ec8ba89
contextlib: Remove explicit base class from ExitStack ( #7963 )
...
Fixes #7961
2022-05-27 09:19:18 -07:00
Jelle Zijlstra
7d34d75582
array: stub improvements ( #7966 )
...
- TypeVar changes from https://github.com/microsoft/pyright/issues/3501
- Fix pos-only param
- Use protocols instead of IO classes
2022-05-27 07:33:24 +01:00
Jelle Zijlstra
789c12ad90
constructors: Fix defaulted TypeVars ( #7965 )
...
From the list in https://github.com/microsoft/pyright/issues/3501
2022-05-27 07:32:56 +01:00
Jelle Zijlstra
466f9c2ad7
redis: Fix unconstrained TypeVars in a few redis commands ( #7942 )
...
Part of #7928
2022-05-26 15:53:56 +01:00
Jelle Zijlstra
84e2ea113f
gettext: fix unconstrained TypeVar ( #7935 )
2022-05-26 07:10:47 +01:00
Jelle Zijlstra
d5bc48d29b
builtins, collections: Fix unconstrained overloads for container constructors ( #7944 )
...
See https://github.com/microsoft/pyright/issues/3501#issuecomment-1135979479
Related to #7928
2022-05-25 10:07:23 +01:00
Jelle Zijlstra
796a689fc1
mock: Fix unconstrained TypeVar ( #7945 )
...
The first overload covers the case where `new` is not given.
Part of #7928
2022-05-25 06:52:40 +01:00
Jelle Zijlstra
070e6c2a2d
invoke: Fix unconstrained TypeVar ( #7943 )
...
Part of #7928
https://github.com/pyinvoke/invoke/blob/f34c6c9413146a34ede3a5b529916b4cee649887/invoke/tasks.py#L328
2022-05-25 06:48:49 +01:00
Jelle Zijlstra
bb119544d8
pkg_resources: Fix unconstrained TypeVars ( #7941 )
...
https://github.com/pypa/setuptools/blob/499c468a57d240e5bb450bdb6daedc3e559541dd/pkg_resources/__init__.py#L1049
Part of #7928
2022-05-24 19:49:22 -07:00
Jelle Zijlstra
d950ec37ca
fileinput: Fix TypeVar usage (#7934 )
...
* fileinput: Fix TypeVar usage
Fixes #7922 , part of #7928 .
2022-05-24 17:55:35 +01:00
Jelle Zijlstra
158293257e
optparse: fix unconstrained TypeVar ( #7936 )
...
Part of #7928
2022-05-23 19:39:31 -07:00
Jelle Zijlstra
b4518bfb2b
argparse: remove incorrect default in overload ( #7929 )
...
Part of #7928
2022-05-23 18:12:19 +01:00
Jelle Zijlstra
9660ee97ee
codecs: add missing function, reflect runtime import * ( #7918 )
2022-05-22 16:06:21 -07:00
Jelle Zijlstra and Alex Waygood
18433202ba
concurrent.futures: new params in 3.11 ( #7919 )
...
https://github.com/python/cpython/commit/fdc0e09c3316098b038996c428e88931f0a4fcdb
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-05-22 15:51:09 -07:00
Jelle Zijlstra
54c2e23a55
3.11 allowlist: move inspect._ParameterKind.description to wontfix section ( #7920 )
2022-05-22 12:04:11 +03:00
Jelle Zijlstra
3dcfbf3745
urllib.request: add code 308 handler for 3.11 ( #7917 )
...
https://github.com/python/cpython/commit/c379bc5ec9012cf66424ef3d80612cf13ec51006
2022-05-21 14:13:17 -07:00
Jelle Zijlstra
1220a99399
unicodedata: add UCD.is_normalized ( #7915 )
2022-05-21 12:59:44 -07:00
Jelle Zijlstra
ddc6eda10a
symtable: has_exec was removed in 3.9 ( #7911 )
2022-05-21 17:50:27 +02:00
Jelle Zijlstra
39c777f70c
pydoc: 3.11 changes ( #7910 )
2022-05-21 17:49:39 +02:00
Jelle Zijlstra
237b1bb189
binascii.a2b_base64: new param in 3.11 ( #7909 )
...
https://github.com/python/cpython/commit/35b98e38b6edd63153fc8e092f94cb20725dacc1
2022-05-21 08:36:03 -07:00
Jelle Zijlstra
9c0c631e46
gettext.install: names is kw-only in 3.11 ( #7908 )
2022-05-21 08:22:34 -07:00
Jelle Zijlstra
8b58371278
subprocess: new params in 3.11 ( #7907 )
2022-05-21 16:07:50 +01:00
Jelle Zijlstra
0198d75153
types: 3.11 (and earlier) fixes ( #7900 )
...
- New attributes in 3.11
- Arguments to CodeType.__init__ are always positional (have fun)
- co_consts can use object instead of Any
2022-05-21 07:37:11 -07:00
Jelle Zijlstra and Alex Waygood
7576805aee
zipfile: 3.11 fixes ( #7898 )
...
* zipfile: 3.11 fixes
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-05-21 09:22:32 +01:00
Jelle Zijlstra
585517b20e
stubtest: put all the incorrect __get__ sigs together ( #7899 )
2022-05-20 09:47:02 -07:00
Jelle Zijlstra
e7cbde0928
xml: stubtest fixes ( #7890 )
2022-05-20 13:03:45 +02:00
Jelle Zijlstra
26fa57ab78
traceback: update for py311 ( #7886 )
2022-05-19 19:14:12 -07:00
Jelle Zijlstra
0b7df3b2aa
dataclasses: fix and sort stubtest complaints ( #7888 )
2022-05-19 19:13:22 -07:00
Jelle Zijlstra
4220712aab
dis: add adaptive argument for 3.11 ( #7889 )
2022-05-19 18:27:34 -07:00
Jelle Zijlstra and Shantanu
64766c8521
locale: add locale.getencoding ( #7887 )
...
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com >
2022-05-19 18:20:16 -07:00
Jelle Zijlstra
1ffb1bdc0e
wsgiref: categorise stubtest issues ( #7885 )
2022-05-19 18:10:56 -07:00
Jelle Zijlstra
6f2c53f3b0
_imp: fix stubtest issues, add Python 3.11 items ( #7878 )
2022-05-19 14:43:58 +02:00
Jelle Zijlstra
250f3d92e7
ast: fix stubtest issues ( #7877 )
...
Add annotations for `_ast.Tuple.dims` and `ast.main()`. Add allowlist comments for others.
2022-05-19 10:13:08 +01:00
Jelle Zijlstra
4191906e6e
3.11: move some stubtest entries to wontfix list ( #7876 )
2022-05-19 08:14:44 +02:00
Jelle Zijlstra
7998906226
re: 3.11 fixes ( #7859 )
2022-05-17 21:42:23 -07:00
Jelle Zijlstra
bd394d2486
builtins: add BaseException.add_note in py311 ( #7860 )
2022-05-17 20:32:28 -07:00
Jelle Zijlstra
a01f98c361
sqlite3.Blob: fix stubtest errors ( #7858 )
2022-05-17 19:50:19 -07:00
Jelle Zijlstra and Alex Waygood
8f5a83516b
tempfile.SpooledTemporaryFile: inherit from IOBase on 3.11 ( #7802 )
...
python/cpython#29560
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-05-17 18:41:47 -07:00
eab82c838a
asyncio: updates for 3.11 ( #7844 )
...
CPython changes:
- https://github.com/python/cpython/commit/13c10bfb777483c7b02877aab029345a056b809c
- https://github.com/python/cpython/commit/9523c0d84f351a610dc651b234461eb015fa3b82
- https://github.com/python/cpython/commit/9f04ee569cebb8b4c6f04bea95d91a19c5403806
- https://github.com/python/cpython/commit/d03acd7270d66ddb8e987f9743405147ecc15087
- https://github.com/python/cpython/commit/195a46d6ffd4cec6c5fb69c5890f8b1758ac91ca
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com >
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-05-17 18:11:29 -07: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
68a781d04e
Upgrade pytype ( #7823 )
2022-05-10 14:47:10 -07:00
Jelle Zijlstra
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
Jelle Zijlstra
6b5068b11d
Add new arguments to subprocess.Popen ( #7798 )
2022-05-07 09:49:23 +03:00
Jelle Zijlstra
031c998055
enum: Add member and nonmember ( #7795 )
...
python/cpython#92366
2022-05-07 07:48:34 +01:00
Jelle Zijlstra
2fc719d3cf
tkinter: add info_patchlevel for 3.11 ( #7794 )
2022-05-07 09:25:55 +03:00
Jelle Zijlstra
963b8aa2f7
add os.login_tty for 3.11 ( #7800 )
...
python/cpython#29658
2022-05-06 22:54:58 -07:00
Jelle Zijlstra
4856064ed7
sys.flags: add safe_path for 3.11 ( #7797 )
...
python/cpython#31542
2022-05-06 22:50:30 -07:00
Jelle Zijlstra
ab1dcafec2
socket: add SO_INCOMING_CPU for 3.11 ( #7801 )
...
python/cpython#31237
2022-05-06 22:46:34 -07:00
Jelle Zijlstra
c93f262427
Add closure argument to exec() ( #7793 )
...
python/cpython#92204
2022-05-06 22:46:01 -07:00
Jelle Zijlstra
b1ccd03d51
Add GenericAlias.__unpacked__ ( #7774 )
2022-05-03 15:41:45 +02:00
Jelle Zijlstra
d77d848975
contextlib: Use bound TypeVar ( #7764 )
2022-05-02 08:57:21 +02:00
Jelle Zijlstra
9effb643b3
logging.LoggerAdapter: Use a bound TypeVar ( #7763 )
2022-05-02 08:56:32 +02:00
Jelle Zijlstra
7e7562b95b
Add socket.TCP_CONNECTION_INFO ( #7755 )
...
python/cpython#69256
2022-04-30 09:24:09 -06:00
Jelle Zijlstra
e6623754e9
sqlite: Blob now uses ints in getitem/setitem ( #7754 )
...
I just merged python/cpython#92020 which implemented this change (thanks @erlend-aasland!).
2022-04-30 09:15:03 -06:00
Jelle Zijlstra
145e659482
inspect: Add positions attributes that will be new in 3.11 ( #7688 )
2022-04-29 17:00:37 -06:00
Jelle Zijlstra and Alex Waygood
1deb9cb806
jack: Fix MidiPort properties ( #7730 )
...
Fixes #7729
https://github.com/spatialaudio/jackclient-python/blob/26b648a36143b1e3db6e6fc827ca927b0c93cbec/src/jack.py#L1950
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-04-27 22:28:17 -06:00
Jelle Zijlstra
1f2a970b94
Upgrade mypy to 0.950 ( #7726 )
2022-04-27 19:25:02 +02:00
Jelle Zijlstra
2299c43860
decimal: kwargs to localcontext() ( #7686 )
2022-04-26 13:19:29 +02:00
Jelle Zijlstra
2668cae090
Add PickleBuffer to _typeshed.WriteableBuffer ( #7683 )
...
Fixes #4362
2022-04-26 09:14:37 +02:00
Jelle Zijlstra
573539ba2a
multiprocessing: add shutdown_timeout param to BaseManager ( #7692 )
...
python/cpython#32112
2022-04-25 22:12:56 -06:00
Jelle Zijlstra
85a6f0ffe9
socket: add all_errors param to create_connection ( #7691 )
...
python/cpython#91704
2022-04-25 22:10:29 -06:00
Jelle Zijlstra
c8a978f756
typing: Add dataclass_transform ( #7690 )
...
python/cpython#91861
2022-04-25 22:06:32 -06:00
Jelle Zijlstra
ac2b24c08f
warnings: New arguments to catch_warnings() in 3.11 ( #7685 )
2022-04-25 21:19:29 -06:00
Jelle Zijlstra
125f9b4275
sqlite3: Add sequence methods to Blob ( #7684 )
...
python/cppython#91599
2022-04-25 20:17:09 -07:00
Jelle Zijlstra
08ae9f324b
subprocess: Add _USE_VFORK and _USE_POSIX_SPAWN ( #7687 )
...
These are now documented: python/cpython#91490
2022-04-25 21:13:39 -06:00
Jelle Zijlstra
02e0c98d62
Buffer support for re ( #7679 )
2022-04-23 18:28:35 -07:00
Jelle Zijlstra
5dad506bf2
binascii: Improve bytes types ( #7677 )
...
Add missing arguments to b2a_hex()
2022-04-23 20:57:02 +02:00
Jelle Zijlstra
00f4031915
pickle: accept ReadableBuffer ( #7678 )
2022-04-23 20:54:20 +02:00
Jelle Zijlstra
66383ee8e3
unittest.mock: target must be a str ( #7672 )
...
See [the CPython source](https://github.com/python/cpython/blob/eaa85cb22fa2d9e7cd31c2eac29a56cd3a8f2f65/Lib/unittest/mock.py#L1754 ). It calls `_get_target`, and [that](https://github.com/python/cpython/blob/eaa85cb22fa2d9e7cd31c2eac29a56cd3a8f2f65/Lib/unittest/mock.py#L1594 ) does `target.rsplit('.', 1)`.
2022-04-21 14:07:55 -07:00
Jelle Zijlstra
a17b3afb16
Run pytype test with --print-stderr ( #7656 )
2022-04-18 10:57:48 +03:00
Jelle Zijlstra
a24b765388
improve type for itertools.zip_longest ( #7655 )
2022-04-17 15:49:05 -07:00
Jelle Zijlstra
bedf520d76
typing(_extensions) updates for 3.11 ( #7643 )
2022-04-16 21:42:12 +02:00