gh-129873: IDLE: Improve help.py's method of parsing HTML (GH-129859)
In `help.copy_strip`, only copy the text `<section>`. In `help.HelpParser.handle_starttag` and elsewhere, remove code to skip the no longer present html. Add a reminder at the top of idle.rst to run copy_strip after changes.
---------
(cherry picked from commit 6fbf15f98e)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
gh-129699: Add description to IDLE doc title (GH-129727)
Also extend the 'idlelib' section header. These additions affect both the displayed idle.html file and the contents.html file displayed by clicking the Complete table of contents link on the main docs.python.org page. (The module index entries are generated from the module name and synopsis within module files.)
---------
(cherry picked from commit 33a7094aa6)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
gh-64414: mention AF_INET6 and IPv6 in socketserver docs. (GH-129866)
mention AF_INET6 and IPv6 in socketserver docs.
(cherry picked from commit 5ce70ad129)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Found while running `test_load_attr_module` from `test_opcache` under TSan.
(cherry picked from commit 34379d0a59)
Co-authored-by: Sam Gross <colesbury@gmail.com>
The read of `shared->array` should happen under the lock to avoid a race.
(cherry picked from commit b4ff8b22b3)
Co-authored-by: Peter Hawkins <phawkins@google.com>
The MemoryError freelist was not thread-safe in the free threaded build.
Use a mutex to protect accesses to the freelist. Unlike other freelists,
the MemoryError freelist is not performance sensitive.
(cherry picked from commit 51b4edb1a4)
gh-112020: Rework socketserver examples to be correct.
Outdated code updated, the BaseRequestHandler example is now much more
illustrative instead of the bad idea of a single recv() call for TCP.
tested, they now work.
(cherry picked from commit 78377c788e)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Remove an inaccurate note from `socket.recv` (GH-129733)
Remove an inaccurate note from socket.recv.
(cherry picked from commit ded54c3baa)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Replace references to boilerplate files available in About IDLE and instead suggest clicking Help menu.
(cherry picked from commit d83a8a26f5)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Instead, anyone requesting credit should submit a PR with contribution summary.
(Also fix typo in existing name.)
(cherry picked from commit 76e0182948)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Test that the trailing pathname separator is preserved.
Multiple trailing pathname separators are only preserved if the pattern
does not contain metacharacters, otherwise only one trailing pathname
separator is preserved. This is rather an implementation detail.
(cherry picked from commit 8b5c8508c7)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-129502: Fix handling errors in ctypes callbacks (GH-129504)
Unlikely errors in preparing arguments for ctypes callback are now
handled in the same way as errors raised in the callback of in converting
the result of the callback -- using sys.unraisablehook() instead of
sys.excepthook() and not setting sys.last_exc and other variables.
(cherry picked from commit 9d63ae5fe5)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-128696: Add arm64 to the get_platform return val description (GH-128701)
(cherry picked from commit 553cdc6d68)
Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
gh-129407: Clarify that a `SystemError` isn't always CPython's fault (GH-129410)
(cherry picked from commit 39b754a359)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
gh-127975: Avoid reusing quote types in ast.unparse if not needed (GH-127980)
(cherry picked from commit 8df5193d37)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* Do not recreate unnamed section on every read in ConfigParser
* Remove duplicate section creation code
(cherry picked from commit 914c232e93)
Co-authored-by: Andrey Efremov <duxus@yandex.ru>
gh-115514: Fix incomplete writes after close while using ssl in asyncio(GH-128037)
(cherry picked from commit 4e38eeafe2)
Co-authored-by: Vojtěch Boček <vbocek@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
gh-105704: Disallow square brackets (`[` and `]`) in domain names for parsed URLs (GH-129418)
* gh-105704: Disallow square brackets ( and ) in domain names for parsed URLs
* Use Sphinx references
* Add mismatched bracket test cases, fix news format
* Add more test coverage for ports
---------
(cherry picked from commit d89a5f6a6e)
Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
gh-119461: Restore the testSocket VSOCK skipUnless removed by PR GH-119465 (GH-129561)
Restore the skipUnless removed by GH-119465.
This test can only pass on virtual machines, not actual machines.
actual machines see:
```
self.cli.connect((cid, VSOCKPORT))
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
OSError: [Errno 19] No such device
```
Reproduced on (Linux) Ubuntu 24.04.1 running 6.8.0-52-generic.
(cherry picked from commit e1006ce1de)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
gh-129438: Update ``--enable-experimental-jit`` section with install requirements (GH-129450)
Add a note to the `JIT` docs that building CPython with `JIT` requires Python 3.11 or newer.
(cherry picked from commit 652f66ac38)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
gh-129403: Fix `ValueError` messages in `asyncio.Barrier` and `threading.Barrier` (GH-129419)
(cherry picked from commit bcb25d60b1)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>