The registry() method of functools.singledispatch() functions checks now
the first argument or the first parameter annotation and raises a TypeError if it is
not supported. Previously unsupported "types" were ignored (e.g. typing.List[int])
or caused an error at calling time (e.g. list[int]).
(cherry picked from commit 078abb676c)
Ensure `fakeuser` does not exist in `PosixPathTest.test_expanduser`
(cherry picked from commit b8de8b7039)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
To keep checks even if run tests with optimized Python.
Either use special assertion methods like assertEqual() or
raise an AssertionError explicitly.
(cherry picked from commit 6ca78affc8)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
See discussion in GH-30179.
(cherry picked from commit 7c5c3f7254)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Automerge-Triggered-By: GH:Fidget-Spinner
This allows the title to be translated to other languages without linking problems.
(cherry picked from commit 3d3615f41f)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
* Fix-1 - isidentifier() function output
* Fix-2 Update the str.splitlines() function parameter
* Fix-3 Removed unwanted full stop for str and bytes types double quotes examples.
* Fix-4 Updated class dict from **kwarg to **kwargs
(cherry picked from commit 6f2df42951)
Co-authored-by: Vivek Vashist <vivekvashist@gmail.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit 427a490c49)
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
The file is utils.py not util.py.
Automerge-Triggered-By: GH:gpshead
(cherry picked from commit 69ef1b5998)
Co-authored-by: Yilei "Dolee" Yang <yileiyang9@gmail.com>
Updated the output for it=iter(s) from <iterator object at 0x00A1DB50> to <str_iterator object at 0x10c90e650>
(cherry picked from commit c5d18a5014)
Co-authored-by: Vivek Vashist <vivekvashist@gmail.com>
The "Color" example in the pattern-matching section of the "control flow" documentation is not immediately runnable, leading to confusion.
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 1cbb88736c)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Functions signal(), getsignal(), pthread_sigmask(), sigpending(),
sigwait() and valid_signals() were omitted.
If __all__ is not defined all non-builtin functions should have
correct __module__.
(cherry picked from commit e08c0d8eec)
(cherry picked from commit 4325a766f5)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
(cherry picked from commit 59435eea08)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
A similar sentence is present in the 'Invocation from super' section of
the descriptor HOWTO, where it is already correct.
(cherry picked from commit ee49484c0f)
Co-authored-by: Jouke Witteveen <j.witteveen@gmail.com>
It can prevent some losses when output to buffered stream..
(cherry picked from commit f42a06ba27)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit f0d290d25c)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.10] bpo-46009: Do not exhaust generator when send() method raises (GH-29986).
(cherry picked from commit 69806b9516)
Co-authored-by: Mark Shannon <mark@hotpy.org>
* Rename variable after cherry-pick.
* Add NULL check.