Akuli
02f2bc30e7
Make peewee stubs compatible with peewee 3.15.4 ( #9176 )
2022-11-12 16:12:55 -08:00
Ben Blank
f5459640f8
Add None as a valid type in SAXParseException's second argument ( #9162 )
...
Closes #9161
2022-11-11 12:18:22 -08:00
Nikita Sobolev
70c4af4b73
Refactor round and add tests ( #9151 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-11-11 18:19:51 +00:00
Nikita Sobolev
0f33721c52
Remove sqlite3/dbapi2.pyi from pyright excludelist ( #9148 )
2022-11-11 12:00:19 +00:00
Nikita Sobolev
0baadae0c9
urllib.parse: improve bytes handling ( #9103 )
2022-11-10 20:47:57 -08:00
Jelle Zijlstra
ec4ec33639
xml: improve bytes types ( #9110 )
...
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com >
2022-11-10 20:43:26 -08:00
Jelle Zijlstra
8b59dfd10b
termios: improve comments, add more constants ( #9101 )
2022-11-10 17:44:52 +00:00
Jelle Zijlstra
c7820b401d
socket: constructor accepts bytes on Windows ( #9095 )
...
d04899abb0/Modules/socketmodule.c (L5318)
This is used in `socket.fromshare`. It must be bytes, not some other buffer.
2022-11-10 15:10:44 +00:00
Nikita Sobolev
f8dd877e48
Improve math.{ceil,floor,trunc} ( #9141 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-11-10 14:45:07 +00:00
Anh71me
cc66167c38
inspect: use Literal type for Attribute.kind ( #9149 )
2022-11-10 14:15:36 +00:00
Alex Waygood
068b0b488a
Improve builtins.vars() ( #9146 )
2022-11-10 12:14:05 +01:00
Samuel T
796bdc2eb0
Improve accuracy of six byte index methods ( #9117 )
2022-11-09 19:22:33 -08:00
Nikita Sobolev
a74acc8225
urllib.response: improve bytes handling ( #9142 )
2022-11-09 18:21:13 -08:00
Jelle Zijlstra
afa2a8e3dd
mailbox: improve bytes handling ( #9083 )
...
- The _MessageData alias refers to objects handled in the
_dump_message method: 016c7d37b6/Lib/mailbox.py (L210)
- The path passed to __init__ should be a str path because there are
many places in the file (search for self._path) where we join it
with a str, which won't work with a bytes path.
2022-11-08 21:50:51 +00:00
Nikita Sobolev
62a6c3d616
Annotate known magic-method return types ( #9131 )
2022-11-08 18:28:42 +00:00
Alex Waygood
739460291b
Use recursive type aliases in builtins and _typeshed ( #9134 )
2022-11-08 17:04:09 +00:00
Alex Waygood
4f381af4c5
Upgrade mypy to 0.990 ( #9123 )
2022-11-07 11:20:47 -08:00
Jelle Zijlstra
68924e00e5
os: improve bytes handling ( #9072 )
2022-11-06 21:32:46 -08:00
Jelle Zijlstra
340eb1264b
unicodedata: accepts ReadOnlyBuffer ( #9106 )
2022-11-06 21:17:06 -08:00
Jelle Zijlstra
1d4eed1c9d
zipfile: improve bytes handling ( #9109 )
...
Technically some uses of `pwd` accept more types, but others
use `isinstance()` to enforce only `bytes`. It seems better to
keep the same type throughout the module.
2022-11-06 21:16:27 -08:00
Jelle Zijlstra
6639e2e14c
sqlite3: Blob.write accepts buffer ( #9097 )
2022-11-06 21:06:55 -08:00
Jelle Zijlstra
1f7648976c
unittest: cannot use bytes regexes ( #9107 )
...
```
>>> from unittest.case import TestCase
>>> c = TestCase()
>>> with c.assertRaisesRegex(Exception, b"x"): 1/0
...
ZeroDivisionError: division by zero
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/unittest/case.py", line 274, in __exit__
if not expected_regex.search(str(exc_value)):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot use a bytes pattern on a string-like object
```
2022-11-05 14:14:53 -07:00
Jelle Zijlstra
3d64286f9e
winsound: accepts buffers ( #9108 )
...
b5f711185b/PC/winsound.c (L93)
2022-11-05 13:52:31 -07:00
Jelle Zijlstra
0e1ca279a4
struct: add missing pos-only markers ( #9099 )
2022-11-04 23:00:33 -07:00
Jelle Zijlstra
f678fac75a
tokenize: you can tokenize bytearrays too ( #9102 )
2022-11-04 22:59:05 -07:00
Jelle Zijlstra
cff08b674a
isort: Add more to extra_standard_library ( #9098 )
2022-11-04 22:56:40 -07:00
Jelle Zijlstra
7ef7029f88
smtplib: Improve bytes handling ( #9094 )
2022-11-04 20:08:10 -07:00
Nikita Sobolev
9f0d0b9af7
zipimport: improve bytes handling ( #9087 )
2022-11-04 17:58:59 -07:00
Jelle Zijlstra
7299b07790
multiprocessing: improve bytes handling ( #9085 )
2022-11-04 10:58:58 +01:00
Nikita Sobolev
e68567a1b4
tarfile: improve bytes handling ( #9076 )
2022-11-03 10:15:46 -07:00
Nikita Sobolev
86f9d93003
Update pyright to 1.1.278 ( #9077 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-11-03 15:32:10 +00:00
Jelle Zijlstra
a17fa5001a
pickletools: accepts bytearray, use protocol from _typeshed ( #9073 )
2022-11-03 16:20:03 +01:00
Jelle Zijlstra
2f3f8da90a
msvcrt: improve bytes handling ( #9071 )
2022-11-03 12:11:36 +01:00
Jelle Zijlstra
43631078f0
importlib: improve bytes handling ( #9070 )
2022-11-03 12:00:24 +01:00
Jelle Zijlstra
82bf494534
quopri: improve types ( #9074 )
2022-11-03 11:37:59 +01:00
Alex Waygood
22c5afa2d2
http.server.SimpleHTTPRequestHandler: Fix version branching ( #9075 )
2022-11-03 11:17:50 +01:00
Jelle Zijlstra
6b702452b6
http: improve types ( #9055 )
2022-11-03 09:55:56 +01:00
Jelle Zijlstra
460158fc40
imaplib: _Authenticator also works with bytearray ( #9056 )
2022-11-02 20:55:41 -07:00
Nikita Sobolev
f972bdfd96
io, codecs: improve bytes handling ( #9059 )
2022-11-02 09:32:06 -07:00
Shantanu
a3ce512095
typing: remove metaclass from Sized ( #9058 )
...
as per https://github.com/python/typeshed/pull/8977#issuecomment-1297872394
2022-11-01 18:38:52 -07:00
Sebastian Rittau
e7e94dd101
Make unittest.patch.* methods static ( #7543 )
2022-11-01 13:09:56 +01:00
Jelle Zijlstra
62ddebb65c
fcntl: fix fcntl arg type (s#) ( #9052 )
2022-11-01 12:34:04 +01:00
Jelle Zijlstra
4d40fc6c8a
logging: StreamHandler.send takes ReadableBuffer ( #9057 )
2022-11-01 11:52:30 +01:00
Jelle Zijlstra
7ab933f3c3
email: improve bytes handling ( #9032 )
2022-11-01 10:13:30 +01:00
Jelle Zijlstra
3e46f9a9ee
dbm: fix bytes handling ( #9030 )
2022-11-01 10:10:37 +01:00
Jelle Zijlstra
39936cd18a
hmac: also support bytearray in 3.7 branch ( #9054 )
2022-10-31 23:28:53 -07:00
Jelle Zijlstra
524cd53d73
gzip: remove Any usage ( #9053 )
2022-10-31 23:14:12 -07:00
Nikita Sobolev
34e147fcd9
plistlib: improve bytes handling ( #9048 )
2022-10-31 21:01:23 -07:00
Nikita Sobolev
8036bbdce1
marshal: improve bytes handling ( #9047 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2022-10-31 13:24:18 -07:00
Jelle Zijlstra
3d8d744eb4
ctypes: improve bytes handling ( #9029 )
2022-10-31 15:26:09 +01:00