* Merge existing tests test_repr_str and test_to_str.
* Add more tests for non-printable and non-ASCII bytes.
* Add tests for special escape sequences ('\t\n\r').
* Add tests for slashes.
* Add more tests for quotes.
* Add tests for subclasses.
* Add test for non-ASCII class name.
* Only apply @check_bytes_warnings for str() tests.
(cherry picked from commit 0dbbf61cc2)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-138148: Fix grammatical error in the `asynchronous generator iterator` term (GH-138155)
(cherry picked from commit 43b113d23d)
Co-authored-by: Krishna Chaitanya <141550576+XChaitanyaX@users.noreply.github.com>
Show signatures that match the actual signatures or future multisignatures
for all functions, classes and methods in the "builtins" module.
(cherry picked from commit 65fb4d11a0)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This partially reverts commit ad944b5e1f
by bringing back the CI job for testing OpenSSL 1.1.1w. Despite this
version being upstream EOL, the rationale for keeping it as follows:
- It most resembles other 1.1.1-work-a-like ssl APIs supported by important vendors.
- Python officially requires OpenSSL 1.1.1 or later, although OpenSSL 3.0 or later
is recommended for cryptographic modules. Since changing the build requirements
requires a transition period, we need to keep testing the allowed versions.
- The code base still contains calls to OpenSSL functions that are deprecated since
OpenSSL 3.0 as well as `ifdef` blocks constrained to OpenSSL 1.1.1.
(cherry picked from commit 96b7a2eba4)
The csv.register_dialect() docstring no longer imply that it returns a
dialect.
All functions have now signatures.
(cherry picked from commit aa1dbd4dde)
Co-authored-by: maurycy <5383+maurycy@users.noreply.github.com>
Both modules should use the Python implementation in that case.
(cherry picked from commit 6620ef0ff6)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-133125: Clarify ZipInfo.date_time attribute documentation (GH-136082)
Specifically, clarify that ZipInfo.date_time pulls the datetime information from the central directory, and that times are interpreted as local time.
(cherry picked from commit 282e88506b)
Co-authored-by: Kentaro Jay Takahashi <64148935+KentaroJay@users.noreply.github.com>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
Modifies the iOS testbed project to add a test plan. This simplifies the iOS
test runner, as we can now use the built-in log streaming to see test results.
It also allows for some other affordances, like providing a default LLDB config,
and using a standardized mechanism for specifying test arguments.
(cherry picked from commit 2ba2287b85)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Fix typo in `logging` docs (GH-137981)
(cherry picked from commit 9b5235b62e)
Co-authored-by: Maximilian Linhoff <maximilian.linhoff@cta-observatory.org>
Unify documentation for all backends, enumerate all not implemented mapping
methods, document particularities of implemented mapping methods.
(cherry picked from commit 8700404f86)
gh-123085: _compile_importlib: Avoid copying sources before compilation (GH-124131)
(cherry picked from commit 42c8b0556c)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* [3.13] gh-87135: Hang non-main threads that attempt to acquire the GIL during finalization (GH-105805)
Instead of surprise crashes and memory corruption, we now hang threads that attempt to re-enter the Python interpreter after Python runtime finalization has started. These are typically daemon threads (our long standing mis-feature) but could also be threads spawned by extension modules that then try to call into Python. This marks the `PyThread_exit_thread` public C API as deprecated as there is no plausible safe way to accomplish that on any supported platform in the face of things like C++ code with finalizers anywhere on a thread's stack. Doing this was the least bad option.
(cherry picked from commit 8cc5aa47ee)
Co-authored-by: Jeremy Maitin-Shepard <jeremy@jeremyms.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
* state "3.13.7 and earlier"
* backport: do not add the deprecated marker
* fix Py_IsFinalizing doc ref
---------
Co-authored-by: Jeremy Maitin-Shepard <jeremy@jeremyms.com>
Bogus comments that start with "<![CDATA[" should not include the starting "!"
in its value.
(cherry picked from commit 7636a66635)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-137846: Add missing 'be' to profile doc. (GH-137856)
Insert 'be' into 'will interpreted'.
(cherry picked from commit 3663b2ad54)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Mention the "context manager" keyword in concurrent.futures documentation (GH-130976)
(cherry picked from commit 095bc775ec)
Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
gh-134262: Catch both URLError and ConnectionError in retries (GH-135365)
(cherry picked from commit acc20a83f4)
Co-authored-by: Emma Smith <emma@emmatyping.dev>
"] ]>" and "]] >" no longer end the CDATA section.
Make CDATA section parsing context depending.
Add private method HTMLParser._set_support_cdata() to change the context.
If called with True, "<[CDATA[" starts a CDATA section which ends with "]]>".
If called with False, "<[CDATA[" starts a bogus comments which ends with ">".
(cherry picked from commit 0cbbfc4621)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>