Shantanu and hauntsaninja
2414b21a96
Update xxhash ( #8034 )
...
Co-authored-by: hauntsaninja <>
2022-06-07 17:45:04 -07:00
Shantanu and hauntsaninja
8fd308699c
Update flake8-rst-docstrings ( #8033 )
...
Fixes #8032
Co-authored-by: hauntsaninja <>
2022-06-07 17:33:10 -07:00
Shantanu and hauntsaninja
a6924bdcfa
Fix CI for Python 3.11 beta 2 ( #8005 )
...
Co-authored-by: hauntsaninja <>
2022-06-01 02:28:40 -07:00
Shantanu and hauntsaninja
d736bb9d85
caldav: add verify_expand to Calendar.date_search ( #7996 )
...
Co-authored-by: hauntsaninja <>
2022-05-30 18:29:19 -07:00
Shantanu and hauntsaninja
bf68214245
mypy_primer: report lines truncated ( #7993 )
...
Co-authored-by: hauntsaninja <>
2022-05-30 17:04:34 -07:00
Shantanu and hauntsaninja
c8f9abf41d
threading.Semaphore: add _value ( #7952 )
...
I've had occasion to use this multiple times. We already have _value for
asyncio.locks.Semaphore See also
https://github.com/python/cpython/issues/93213
Co-authored-by: hauntsaninja <>
2022-05-25 14:24:09 -07:00
Shantanu
8968eb4fc9
bdb: update for py311 ( #7927 )
2022-05-23 09:20:48 +02:00
Shantanu
ceda368abc
shutil: update rmtree for py311 ( #7925 )
2022-05-22 15:40:06 -07:00
Shantanu and hauntsaninja
c0aafb9a34
termios: update for py311 ( #7924 )
...
Co-authored-by: hauntsaninja <>
2022-05-22 15:36:50 -07:00
Shantanu and hauntsaninja
5b1ef8b119
mmap: add MADV_FREE on darwin ( #7923 )
...
Co-authored-by: hauntsaninja <>
2022-05-22 15:30:09 -07:00
Shantanu and hauntsaninja
f2ea124e82
random: explicitly mention int for seed ( #7916 )
...
https://github.com/python/typeshed/pull/7906#discussion_r878750404
I felt this better documents how seed is used in practice
Co-authored-by: hauntsaninja <>
2022-05-21 13:00:05 -07:00
Shantanu and hauntsaninja
cb45a4387f
stubtest: organise allowlists ( #7847 )
...
Co-authored-by: hauntsaninja <>
2022-05-16 21:29:39 -07:00
Shantanu
b445bb8856
stubtest: test against 3.11 ( #7845 )
2022-05-16 19:50:30 -07:00
Shantanu and hauntsaninja
05c929d42c
stubtest_stdlib: [minor] remove unused code ( #7846 )
...
Co-authored-by: hauntsaninja <>
2022-05-16 19:40:46 -07:00
Shantanu
a27f15ef0e
builtins: reorder overloads ( #7828 )
...
This is slightly more friendly for --no-strict-optional (gross)
2022-05-11 01:00:52 -07:00
Shantanu and hauntsaninja
468d8adff1
stubtest_third_party: show package versions on failure ( #7826 )
...
Co-authored-by: hauntsaninja <>
2022-05-11 08:08:02 +02:00
Shantanu
75d2f6c881
statistics: improve type for median_grouped ( #7825 )
2022-05-11 08:06:35 +02:00
Shantanu
550454c9aa
beautifulsoup4: small fixes and updates ( #7816 )
2022-05-10 09:17:40 +02:00
Shantanu
032787d867
builtins: accept old-style iterables to iter ( #7817 )
2022-05-10 09:06:31 +02:00
Shantanu and hauntsaninja
e8b361983f
bs4: update to 4.11 ( #7785 )
...
Co-authored-by: hauntsaninja <>
2022-05-06 11:54:50 -07:00
Shantanu
4bcb1a95ab
Upgrade paramiko ( #7766 )
2022-05-02 20:52:14 +02:00
Shantanu and Akuli
67425a89d4
hashlib: update for py311 ( #7652 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2022-04-18 21:21:19 +03:00
Shantanu
a24ce3f935
dis: update for py311 ( #7649 )
2022-04-17 20:40:39 +03:00
Shantanu and hauntsaninja
b562089d13
ast: add TryStar in py311 ( #7646 )
...
Co-authored-by: hauntsaninja <>
2022-04-16 22:13:21 -07:00
Shantanu and hauntsaninja
556fe3e4ef
weakref: use positional-only args ( #7653 )
...
Co-authored-by: hauntsaninja <>
2022-04-16 22:10:39 -07:00
Shantanu
435f758019
sqlite3: add py311 constants ( #7654 )
...
bpo-24139
2022-04-16 22:08:42 -07:00
Shantanu
145a85307a
random: update for py311 (#7651 )
2022-04-17 01:01:36 +01:00
Shantanu
520f807b5f
builtins: default values for int.(to|from)_bytes in py311 ( #7647 )
...
See https://github.com/python/cpython/issues/89318
2022-04-17 00:57:13 +01:00
Shantanu
c93f92d92e
builtins: add BaseExceptionGroup.__class_getitem__ ( #7648 )
2022-04-17 00:48:46 +01:00
Shantanu
e90a551ceb
Unpin Python micro versions ( #7621 )
...
Fixes #7620
2022-04-13 18:47:17 -07:00
Shantanu
0af746d048
mypy_primer: mention if output is truncated ( #7525 )
2022-03-21 23:41:31 +01:00
Shantanu
9c737f1326
Re-enable stubtest on SQLAlchemy ( #7456 )
2022-03-09 07:34:12 +01:00
Shantanu and hauntsaninja
9796b9ed69
Improve open overloads when mode is a literal union ( #7428 )
...
As pointed out by @gvanrossum in https://github.com/python/typing/issues/1096
Improves type inference in cases when we know that mode is
OpenBinaryMode, but don't know anything more specific:
```
def my_open(name: str, write: bool):
mode: Literal['rb', 'wb'] = 'wb' if write else 'rb'
with open(name, mode) as f:
reveal_type(f) # previously typing.IO[Any], now typing.BinaryIO
```
You may be tempted into thinking this is some limitation of type
checkers. mypy does in fact have logic for detecting if we match
multiple overloads and union-ing up the return types of matched
overloads. The problem is the last overload interferes with this logic.
That is, if you remove the fallback overload (prior to this PR), you'd get
"Union[io.BufferedReader, io.BufferedWriter]" in the above example.
Co-authored-by: hauntsaninja <>
2022-03-06 15:45:34 -08:00
Shantanu and hauntsaninja
6cdecae6f9
Rename Github workflow ( #7445 )
...
Calling this "stubtest.yml" is a little confusing, since most of the
time stubtest is actually run out of "tests.yml". I renamed the workflow
in #7306 and this gets the filename to match.
Co-authored-by: hauntsaninja <>
2022-03-06 15:24:18 -08:00
Shantanu
77e5a2d468
Upgrade to stubtest with dunder pos only reverted ( #7442 )
2022-03-05 18:38:08 -08:00
Shantanu and hauntsaninja
a5ec3c69b2
bs4: expose several other classes ( #7420 )
...
On the same lines as #7419
These are all imports that are not used within bs4/__init__.py
My main interest here is in exposing NavigableString
Co-authored-by: hauntsaninja <>
2022-03-01 17:59:11 -08:00
Shantanu and hauntsaninja
2f27eaab44
bs4: expose bs4.PageElement ( #7419 )
...
This is generally useful. It's also imported in the source without being
used in bs4/__init__.py which in well maintained packages is a pretty
good marker of intention to export
Co-authored-by: hauntsaninja <>
2022-03-01 16:59:50 -08:00
Shantanu
ebcfe7bc4e
random: use bound methods ( #7408 )
2022-03-01 09:27:44 +01:00
Shantanu
b5f32a609a
random: add new default args in py311 ( #7400 )
2022-03-01 00:19:05 +02:00
Shantanu and hauntsaninja
09c945b32b
http: make __str__ match runtime def ( #7348 )
...
Co-authored-by: hauntsaninja <>
2022-02-21 17:55:29 -08:00
Shantanu and hauntsaninja
c2fb0fb814
Downgrade stubtest a little ( #7346 )
...
Fixes #7344 for now.
As discussed in that issue, I think it might make sense to revert the
change to check positional-only arguments on dunders for now, since it
seems to be mostly busywork and has very little benefit for end users.
However, that'll happen on stubtest master, which typeshed isn't yet
ready for.
Co-authored-by: hauntsaninja <>
2022-02-21 17:05:46 -08:00
Shantanu and hauntsaninja
075b8e02eb
Update stubtest for async and dunder pos only checking ( #7333 )
...
Co-authored-by: hauntsaninja <>
2022-02-21 15:54:16 -08:00
Shantanu and hauntsaninja
65724c254d
select: mark positional-only args ( #7337 )
...
Co-authored-by: hauntsaninja <>
2022-02-20 17:39:24 -08:00
Shantanu
94127ca2f5
builtins: add __build_class__ ( #7324 )
2022-02-20 16:16:07 -08:00
Shantanu
6c08c2f4bd
graphlib: update for py311 ( #7317 )
2022-02-20 15:23:27 -08:00
Shantanu and hauntsaninja
584e18491b
xml.dom.minidom: add Node.__bool__ ( #7323 )
...
Co-authored-by: hauntsaninja <>
2022-02-20 15:22:02 -08:00
Shantanu
2279c87257
collections: fix some Counter nits ( #7313 )
2022-02-20 12:13:49 +02:00
Shantanu
690864c86f
heapq: re-export, add __about__ ( #7308 )
2022-02-20 12:04:44 +02:00
Shantanu
6b29dca128
cgitb: add __UNDEF__ ( #7322 )
2022-02-20 11:51:59 +02:00
Shantanu
991b74e166
math: add exp2 ( #7321 )
2022-02-19 20:57:33 -08:00
Shantanu and hauntsaninja
6985d6a1a1
statistics: update for py311 ( #7320 )
...
Co-authored-by: hauntsaninja <>
2022-02-19 20:53:05 -08:00
Shantanu and hauntsaninja
296920a9e9
zlib: update for py311 ( #7315 )
...
Co-authored-by: hauntsaninja <>
2022-02-19 19:57:43 -08:00
Shantanu and hauntsaninja
8d911a313b
glob: update for py311 ( #7316 )
...
Co-authored-by: hauntsaninja <>
2022-02-19 19:54:45 -08:00
Shantanu and hauntsaninja
0eb6baa663
typing: don't accidentally use typing.Self ( #7318 )
...
We can switch to it when all type checkers have support
Co-authored-by: hauntsaninja <>
2022-02-19 19:53:30 -08:00
Shantanu and hauntsaninja
823592e100
Update stubtest for final checking ( #7312 )
...
Co-authored-by: hauntsaninja <>
2022-02-19 18:53:15 -08:00
Shantanu
06a2024422
decimal: add __libmpdec_version__ ( #7311 )
2022-02-19 18:17:46 -08:00
Shantanu and hauntsaninja
ebdbd564be
sqlalchemy: skip stubtest for now ( #7310 )
...
Co-authored-by: hauntsaninja <>
2022-02-19 17:47:55 -08:00
Shantanu and hauntsaninja
c176911bfb
flask-cors: remove unused allowlist ( #7309 )
...
Co-authored-by: hauntsaninja <>
2022-02-19 17:12:33 -08:00
Shantanu and hauntsaninja
879b617366
Update stubtest for submodule versions, typeddict fix ( #7306 )
...
First step in #7305
Co-authored-by: hauntsaninja <>
2022-02-19 15:53:40 -08:00
Shantanu
feb20fc20a
urllib.request: loosen data type ( #7211 )
...
Fixes #7208
This is what urllib.request claims to support over here:
https://github.com/python/cpython/blob/ad4e8d2b871c4f5bce27520627bbb2e0e544bc24/Lib/urllib/request.py#L1276
There is additional validation logic (e.g. strs don't work), but a lot
of what determines what works is over here:
https://github.com/python/cpython/blob/ad4e8d2b871c4f5bce27520627bbb2e0e544bc24/Lib/http/client.py#L1039
2022-02-15 06:44:28 -08:00
Shantanu and hauntsaninja
a6d9b83263
Add @final to several more stdlib classes ( #7215 )
...
Co-authored-by: hauntsaninja <>
2022-02-14 15:12:40 -08:00
Shantanu and hauntsaninja
3a2ce92d32
singledispatch: fix lint ( #7178 )
...
Co-authored-by: hauntsaninja <>
2022-02-11 17:53:01 -08:00
Shantanu and hauntsaninja
4d21d5a87d
codecs: allow str to bytes decoding for "hex", fix overloads ( #7118 )
...
Fixes #7115
Co-authored-by: hauntsaninja <>
2022-02-03 14:20:11 -08:00
Shantanu
b88a6f19cd
Upgrade black version ( #7089 )
2022-01-30 16:27:06 -08:00
2ad00c9664
Use stubtest 0.920 ( #6589 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-12-17 13:58:11 +02:00
Shantanu
86da630cff
turtle: improve RawTurtle.screen(s) types ( #6603 )
2021-12-16 14:02:06 +02:00
Shantanu
9aa66f0c37
Run primer on latest Python version ( #6593 )
2021-12-16 08:56:30 +01:00
Shantanu
7103b0be2d
turtle: add RawTurtle.screens ( #6594 )
2021-12-16 08:55:09 +01:00
Shantanu
1b80461b96
mypy_extensions: fix NoReturn, remove inaccurate comment ( #6595 )
2021-12-15 19:45:57 -08:00
Shantanu
d84a03829f
Revert addition of class_getitem to PathLike ( #6591 )
...
This was added in #5869
This breaks all PathLike classes that don't have class_getitem
2021-12-15 19:25:08 -08:00
Shantanu
b345843e56
dbm: fix error type ( #6590 )
...
Surfaced by stubtest upgrade
2021-12-15 17:07:15 -08:00
Shantanu and hauntsaninja
f9cedff5af
ast: allow non-literal strings ( #6566 )
...
Co-authored-by: hauntsaninja <>
2021-12-10 21:48:46 -08:00
2a1ef3735d
random: add VERSION, SystemRandom.getrandbits is not pos only ( #6419 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-05 16:52:34 +02:00
Shantanu and hauntsaninja
d453b74ceb
logging: fix various __init__ methods ( #6417 )
...
Co-authored-by: hauntsaninja <>
2021-11-30 23:18:35 -08:00
Shantanu and hauntsaninja
238dff64c9
unittest.mock: add decorate_async_callable, use tuple methods ( #6438 )
...
Co-authored-by: hauntsaninja <>
2021-11-28 21:55:47 -08:00
Shantanu and hauntsaninja
287a9a427e
Fix allowlists ( #6440 )
...
Broken by https://github.com/python/typeshed/pull/6439
Co-authored-by: hauntsaninja <>
2021-11-28 20:18:49 -08:00
Shantanu and hauntsaninja
0bad0691be
threading: fixes for _DummyThread and _RLock ( #6437 )
...
Co-authored-by: hauntsaninja <>
2021-11-28 20:11:54 -08:00
1d335545b2
_osx_support: fix _read_output ( #6436 )
...
* _osx_support: fix _read_output
* [pre-commit.ci] auto fixes from pre-commit.com hooks
Co-authored-by: hauntsaninja <>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-28 20:01:06 -08:00
Shantanu and hauntsaninja
d68a28fb52
ssl: add timeout to get_server_certificate ( #6421 )
...
Co-authored-by: hauntsaninja <>
2021-11-28 12:32:12 +02:00
Shantanu and hauntsaninja
72d804f130
smtplib: add timeout to LMTP ( #6415 )
...
Co-authored-by: hauntsaninja <>
2021-11-28 12:31:18 +02:00
0131f4b868
style: put most recent python branch first ( #6420 )
...
Co-authored-by: hauntsaninja <>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-28 12:05:25 +02:00
Shantanu
5ba7254555
locale: fix positional-only args ( #6413 )
2021-11-28 11:43:46 +02:00
Shantanu
eb16dcc2c1
builtins: change aiter argument name ( #6412 )
2021-11-28 11:41:49 +02:00
Shantanu
c47ed98b3e
dummy_thread/ing: remove in 3.9 ( #6408 )
...
https://bugs.python.org/issue37312
2021-11-27 20:50:14 -08:00
e734231314
typing: add _ProtocolMeta ( #6394 )
...
Co-authored-by: hauntsaninja <>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-27 16:53:36 +02:00
Shantanu
bf92378722
Bump typed-ast version, recommend Python 3.8 for tests ( #6278 )
2021-11-12 02:53:42 -08:00
Shantanu
c0675a797f
tempfile: add ignore_cleanup_errors to TemporaryDirectory ( #6226 )
2021-11-02 20:25:58 -07:00
Shantanu
38ab20926f
pathlib: update for py310 ( #6225 )
2021-11-02 20:23:30 -07:00
Shantanu and hauntsaninja
9f691d9c6e
stubtest_third_party: advice for unused allowlist entries ( #6208 )
...
Co-authored-by: hauntsaninja <>
2021-10-27 21:55:18 -07:00
Shantanu and hauntsaninja
55cf343ba9
zip: update for PEP 618 ( #6123 )
...
Resolves #6122
Co-authored-by: hauntsaninja <>
2021-10-06 12:54:47 -07:00
Shantanu and hauntsaninja
c7ac9b6641
markdown: fix type of Pattern ( #6115 )
...
Surfaced weirdly by #6109
Co-authored-by: hauntsaninja <>
2021-10-04 21:35:26 -07:00
Shantanu and hauntsaninja
67e8979ac1
stubtest_third_party: more newlines in printing ( #6060 )
...
Co-authored-by: hauntsaninja <>
2021-09-21 23:16:12 +02:00
Shantanu
8576b344b8
binhex: removed in py311 ( #6011 )
2021-09-10 15:27:24 -07:00
Shantanu and hauntsaninja
c74fd22931
Update pytype ( #6026 )
...
Co-authored-by: hauntsaninja <>
2021-09-11 01:11:05 +03:00
Shantanu and hauntsaninja
2d4fcbc81e
zipfile: py310 changes, fix open ( #5979 )
...
Co-authored-by: hauntsaninja <>
2021-08-28 22:45:01 +02:00
Shantanu and hauntsaninja
ba998cd5f9
multiprocessing.pool: fix __init__ methods ( #5833 )
...
Co-authored-by: hauntsaninja <>
2021-08-28 12:04:08 -07:00
Shantanu and hauntsaninja
670929e908
dateparser: use PEP 604 ( #5977 )
...
Co-authored-by: hauntsaninja <>
2021-08-28 21:03:02 +02:00
Shantanu and hauntsaninja
f6e4c9c38f
Check for PEP 604 usage in CI ( #5903 )
...
Since this is a common review issue and our stubs have all been
converted
Co-authored-by: hauntsaninja <>
2021-08-28 11:37:50 -07:00
Shantanu and hauntsaninja
98846a65e2
More shards for stubtest_third_party ( #5902 )
...
Co-authored-by: hauntsaninja <>
2021-08-09 13:36:54 -07:00
Shantanu and hauntsaninja
76eeeee4c4
[minor] Clearer formatting for stubtest_third_party output ( #5856 )
...
Co-authored-by: hauntsaninja <>
2021-08-05 20:16:46 -07:00