[3.11] Fix typos in documentation and comments (GH-102374)
Found some duplicate `to`s in the documentation and some code comments and fixed them.
[Misc/NEWS.d/3.12.0a1.rst](ed55c69ebd/Misc/NEWS.d/3.12.0a1.rst) also contains two duplicate `to`s, but I wasn't sure if it's ok to touch that file. Looks auto generated. I'm happy to amend the PR if requested. :)
Automerge-Triggered-By: GH:AlexWaygood
Co-authored-by: Michael K <michael-k@users.noreply.github.com>
Refactor DynOptionMenu's initializer to not copy kwargs dict and use subscripting;
improve its htest.
(cherry picked from commit c41af812c9)
Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Add tests for conversion from bool to complex.
(cherry picked from commit 4197043637)
Co-authored-by: Eclips4 <80244920+Eclips4@users.noreply.github.com>
gh-95675: fix uid and gid at test_add_dir_getmember (gh-102207)
(cherry picked from commit 56e93c8020)
Co-authored-by: Seonkyo Ok <seonkyo.ok@linecorp.com>
---------
(cherry picked from commit 9f3ecd1aa3)
Co-authored-by: Eclips4 <80244920+Eclips4@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
gh-101936: Update the default value of fp from io.StringIO to io.BytesIO (gh-102100)
(cherry picked from commit 0d4c7fcd4f)
Co-authored-by: Long Vo <long.vo@linecorp.com>
gh-101961 fileinput.hookcompressed should not set the encoding value for the binary mode (gh-102068)
(cherry picked from commit 6f25657b83)
Co-authored-by: Gihwan Kim <gihwan.kim@linecorp.com>
gh-100210: Correct the comment link for unescaping HTML (GH-100212)
(cherry picked from commit 9a07eff628)
gh-100210: correct the comment link for unescaping HTML
Co-authored-by: Jean-Christophe Amiel <jeanchristophe.amiel@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Previously, any data _after_ the zip64 extra would be removed.
With many new tests.
Fixes GH-88233
(cherry picked from commit 59e86caca8)
Co-authored-by: Tim Hatch <tim@timhatch.com>
Automerge-Triggered-By: GH:jaraco
Items checked by this test are always `str` and `dict` instances.
(cherry picked from commit eb49d32b9a)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
testBytesOpen requires an ASCII filename, but TESTFN usually isn't ASCII.
(cherry picked from commit 6fd5eb640a)
Co-authored-by: Zachary Ware <zach@python.org>
That causes the test to fail when run using a high UID as that ancient format
cannot represent it. The current default (PAX) and the old default (GNU) both
support high UIDs.
(cherry picked from commit ffcb8220d7)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Fix the behaviour of the `__sizeof__` method (and hence the results returned
by `sys.getsizeof`) for subclasses of `int`. Previously, `int` subclasses gave
identical results to the `int` base class, ignoring the presence of the instance
dictionary.
(Manual backport of #101394 to the Python 3.11 branch.)
[3.11] gh-99952: [ctypes] fix refcount issues in from_param() result. (GH-100169)
Fixes a reference counting issue with `ctypes.Structure` when a `from_param()` method call is used and the structure size is larger than a C pointer `sizeof(void*)`.
This problem existed for a very long time, but became more apparent in 3.8+ by change likely due to garbage collection cleanup timing changes..
(cherry picked from commit dfad678d70)
Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
(cherry picked from commit 9e947675ae)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
The zipfile.Path open() and read_text() encoding parameter can be supplied as a positional argument without causing a TypeError again. 3.10.0b1 included a regression that made it keyword only.
Documentation update included as users writing code to be compatible with a wide range of versions will need to consider this for some time..
(cherry picked from commit 5927013e47)
Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
This brings the Python implementation of `ntpath.normpath()` in line with the C implementation added in 99fcf15
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Eryk Sun <eryksun@gmail.com>