Commit Graph

7600 Commits

Author SHA1 Message Date
Andrew Svetlov
39fcd396ce lru_cache.cache_info().maxsize can be None for infinite cache size (#9763) 2023-02-19 16:50:19 +00:00
Alex Waygood
4ca0c48425 Improve the first overload of is_dataclass (#9758) 2023-02-19 06:26:11 -08:00
Alex Waygood
70c027e9ef Fix broken stubsabot logic in find_first_release_with_py_typed (#9760) 2023-02-19 14:22:51 +00:00
Avasam
50acb57cda Ignore flake8 extensions stubbed by typeshed (#9715) 2023-02-19 12:42:03 +00:00
Nikita Sobolev
1387a9efa9 Mark threading.(R)Lock as final (#9753)
These are actually factory functions: 128379b8cd/Lib/threading.py (L108)

The pure-Python version of `RLock` is, strictly-speaking, subclassable. But you're not *meant* to subclass `RLock`, even if you *can* with the pure-Python version: https://discuss.python.org/t/make-threading-lock-rlock-factory-functions-subclassable/24008/2
2023-02-19 12:21:55 +00:00
hamdanal
a2fee5b30f pyserial: fix stubtest errors (#9722) 2023-02-19 12:08:20 +00:00
Shantanu
da9366d016 Add frozen_default to dataclass_transform (#9756) 2023-02-18 15:25:29 -08:00
Avasam
1db405b15c stubsabot: minor refactoring (#9754) 2023-02-18 14:25:04 -08:00
Spencer Brown
f5b761d465 Add types for PIL.ImageTk (#9733) 2023-02-18 21:50:28 +02:00
Jonathan Plasse
0bb7d621d3 Fix pre-commit configuration (#9748)
* Fix flake8 pre-commit hook to run on pyi files too

* Fix pycln pre-commit hook
   * Run on pyi files too
   * Remove `stubs stdlib tests scripts` in args to avoid running pycln on files twice
2023-02-18 06:13:14 -08:00
Max Murin
5ebf892d07 Allow urlparse and urlsplit of bytes URLs (#9746) 2023-02-17 21:52:49 +01:00
Max Murin
75cd302215 dataclass: switch order of decorator overloads (#9743) 2023-02-16 16:22:56 -08:00
Shantanu
5c54e52e23 Fix default value of input, remove now unused allowlist entry for epoll (#9742) 2023-02-17 01:55:31 +02:00
Shantanu
660c832fa4 Remove prettier from pre-commit (#9744)
This doesn't autofix, see #9742

> GitHub prevented pre-commit.ci from autofixing this pr due to autofixes to a workflow file

Life is too short to spend it being yelled at by robots because line
length in some YAML is too long.
2023-02-16 15:38:39 -08:00
Alex Waygood
7180d0223b Use typing_extensions.Self instead of _typeshed.Self (#9702) 2023-02-15 11:32:43 +01:00
Alex Waygood
8cd6d81f15 Bump pyright to 1.1.294; improve psutil stubs (#9739)
Partially type psfullmem
2023-02-15 10:54:36 +01:00
Shantanu
58edfea33f email.parser: narrow io types (#9737) 2023-02-15 10:43:39 +01:00
github-actions[bot]
c50ceada0f [stubsabot] Bump setuptools to 67.3.* (#9738) 2023-02-15 08:15:49 +01:00
Avasam
140bba3425 Add comments when subclassing Any (#9732) 2023-02-14 14:11:56 +01:00
github-actions[bot]
c437f5ba06 [stubsabot] Bump flake8-bugbear to 23.2.13 (#9729) 2023-02-14 01:18:46 +01:00
Andy Doan
70f0f5488a pyOpenSSL: Introduce PARTIAL_CHAIN constant (#9727) 2023-02-13 18:36:14 +01:00
Will Frey
48ef9eace8 Update xml.sax.parse to accept StrPath (#9708) 2023-02-13 17:51:47 +01:00
Bart van Merriënboer
8aa9b37a97 [PyYAML] Accept all iterables for dump_all functions (#9725) 2023-02-13 13:19:16 +01:00
Avasam
965b3108fe Further improve and simplify pyright configuration (#9714) 2023-02-12 22:42:23 +01:00
Avasam
a768744d51 Type and mark as final module-level dunders not meant to be overwritten in stdlib/ (#9709) 2023-02-12 16:15:20 +00:00
Shantanu
35871f4222 Bump DateTimeRange to 2.0.* (#9720)
Release: https://pypi.org/pypi/DateTimeRange/2.0.0
Homepage: https://github.com/thombashi/DateTimeRange
Diff: https://github.com/thombashi/DateTimeRange/compare/v1.2.0...v2.0.0
2023-02-12 10:40:54 +01:00
Avasam
95789d20b2 Bump pyinstaller to 5.8.* (#9721)
Release: https://pypi.org/pypi/pyinstaller/5.8.0
Homepage: https://www.pyinstaller.org/
Diff: https://github.com/pyinstaller/pyinstaller/compare/v5.7.0...v5.8.0
2023-02-11 18:00:16 -08:00
Avasam
2930f8c6f0 Set HOMEBREW_NO_INSTALL_CLEANUP to speedup brew installs (#9713) 2023-02-11 11:20:20 -08:00
PythonCoderAS
52cf716831 Make datetime classmethods return correct type (#9706) 2023-02-10 15:53:17 +00:00
Sebastian Rittau
39487a8bab [redis] Update to 4.5.1 (#9697)
Also add a few argument defaults
2023-02-10 11:10:37 +00:00
Anders Kaseorg
8e0b56f12c Add markdown.treeprocessors.UnescapeTreeprocessor (#9671)
This replaced the deprecated
`markdown.postprocessors.UnescapePostprocessor` in
https://github.com/Python-Markdown/markdown/pull/1272.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2023-02-09 17:22:23 +00:00
Jelle Zijlstra
e17ee201f5 yaml: allow ReadableBuffer in represent_binary (#9701) 2023-02-09 16:03:49 +01:00
Sebastian Rittau
ad1e2bede1 [fpdf2] FPDF.add_font() accepts PurePaths (#9699) 2023-02-09 05:57:45 -08:00
Anders Kaseorg
afb7704b36 Pillow: Add missing enums from 9.1.0 (#9698) 2023-02-09 11:03:50 +01:00
Alex Waygood
9ed39d8796 Use typing_extensions.Self in the stdlib (#9694) 2023-02-09 09:12:13 +00:00
Avasam
10086c06a1 Fix Any subclassing in fpdf2 (#9536) 2023-02-09 09:39:40 +01:00
Avasam
372073d35b Use _typeshed.FileDescriptorOrPath in stubs (#9695) 2023-02-09 08:30:19 +01:00
Alex Waygood
6d535bf0a3 Enable stubtest for pyserial (#9692) 2023-02-09 00:10:33 +01:00
github-actions[bot]
cf6ff75952 [stubsabot] Bump setuptools to 67.2.* (#9691)
Release: https://pypi.org/pypi/setuptools/67.2.0
Homepage: https://github.com/pypa/setuptools
Changelog: https://setuptools.pypa.io/en/stable/history.html
Diff: https://github.com/pypa/setuptools/compare/v67.1.0...v67.2.0

Stubsabot analysis of the diff between the two releases:
 - 0 public Python files have been added.
 - 0 files included in typeshed's stubs have been deleted.
 - 33 files included in typeshed's stubs have been modified or renamed.
 - Total lines of Python code added: 152.
 - Total lines of Python code deleted: 111.

If stubtest fails for this PR:
- Leave this PR open (as a reminder, and to prevent stubsabot from opening another PR)
- Fix stubtest failures in another PR, then close this PR

Note that you will need to close and re-open the PR in order to trigger CI

Co-authored-by: stubsabot <>
2023-02-08 00:16:53 +00:00
Nikita Sobolev
62c54da134 Complete python-crontab (#9306)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-02-07 05:21:06 -08:00
Alex Waygood
32c575d980 subprocess.check_call: executable defaults to None (#9689)
This argument is forwarded on to `Popen.__init__`, like most of the other arguments. It can be `None`, just like the `executable` parameter for all the other `subprocess` functions:

```pycon
>>> import subprocess
>>> subprocess.check_call(["python", "-c", "1/1"], executable=None)
0
>>> subprocess.check_call(["python", "-c", "1/0"], executable=None)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ZeroDivisionError: division by zero
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\alexw\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python', '-c', '1/0']' returned non-zero exit status 1.
```
2023-02-07 12:33:12 +00:00
Alex Waygood
53747b264e Stdlib: add 'obvious' default values (#9688) 2023-02-07 13:00:40 +01:00
Alex Waygood
60789273a2 Improve pyright verification of third-party test cases in CI (#9650)
Co-authored-by: Avasam <samuel.06@hotmail.com>
2023-02-07 11:53:54 +00:00
Sebastian Rittau
565a1a07ad Remove note about Optional still being necessary sometimes (#9687) 2023-02-07 03:03:22 -08:00
Alex Waygood
0ef9c3f8e8 Enable flake8-pyi's Y037 (#9686) 2023-02-06 19:01:02 -08:00
Alex Waygood
c4c4bee8aa Remove a no-longer-needed # noqa (#9685) 2023-02-07 00:43:53 +00:00
Avasam
29d9aa9b28 Complete stubtest and fix Any subclassing in tqdm (#9525) 2023-02-07 00:15:44 +00:00
Alex Waygood
efee70abfa Bump mypy to 1.0 (#9684) 2023-02-06 15:57:17 -08:00
Nikita Sobolev
f7cb7f33b2 Use OSError instead of IOError (#9683) 2023-02-06 18:56:32 +00:00
Nikita Sobolev
c96079f0df urllib.HTTPError.headers is a settable property (#9682) 2023-02-06 18:56:08 +00:00