Skip to content

Conversation

@hunterhogan
Copy link
Contributor

@hunterhogan hunterhogan commented May 25, 2025

Fixes gh-134674

Problem

ast.MatchStar.name incorrectly appears to have a class-level default value when using ast.dump(). The issue causes ast.MatchStar(name=None) to display as MatchStar() instead of the expected MatchStar(name=None).

Solution

Change the ASDL definition of MatchStar, and add MatchStar to the special cases list in ast.dump() alongside Constant and MatchSingleton.


📚 Documentation preview 📚: https://cpython-previews--134676.org.readthedocs.build/

miss-islington and others added 30 commits April 12, 2025 10:42
…unctions (GH-113575) (#132437)

gh-58211: Add tests for  the `__self__` attribute of builtins functions (GH-113575)

---------
(cherry picked from commit 891465f)

Co-authored-by: Adorilson Bezerra <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Sergey B Kirpichev <[email protected]>
Co-authored-by: Serhiy Storchaka <[email protected]>
…32441)

Docs: Fix specifications of `gcvisitobjects_t` (GH-132433)

`gcvisitobjects_t` callbacks should return 1 for the iteration to continue instead of 0.
(cherry picked from commit 1e5798e)

Co-authored-by: da-woods <[email protected]>
…base (GH-132231) (GH-132443)

Use only a limited number of randomly selected entries.
(cherry picked from commit 842ab81)

Co-authored-by: Serhiy Storchaka <[email protected]>
…onFly BSD (GH-132431) (GH-132458)

Also fix a compiler warning on FreeBSD.
(cherry picked from commit f2f86d3)
Fix a typo in c-api/typeobj.rst (GH-132317)
(cherry picked from commit f69b344)

Co-authored-by: Yongzi Li <[email protected]>
…-132374) (#132465)

gh-132354: document return value for `asyncio.Task.cancel` (GH-132374)
(cherry picked from commit 64b066a)

Co-authored-by: Felix Scherz <[email protected]>
gh-132111: Document dataclasses.InitVar (GH-132446)
(cherry picked from commit 281fc33)

Co-authored-by: Tapeline <[email protected]>
…d FreeBSD (GH-132476) (GH-132498)

On platforms where the file descriptor limit is larger than FD_SETSIZE
that test was always skipped (FreeBSD) or always failing (NetBSD).
(cherry picked from commit f7b24ff)

Co-authored-by: Serhiy Storchaka <[email protected]>
…) (#132487)

gh-86513: improve docs of loop.call_exception_handler (GH-132466)
(cherry picked from commit ce75351)

Co-authored-by: Kumar Aditya <[email protected]>
…lotted_base` (GH-132516) (#132518)

gh-132515: de-duplicate `test_dataclass_derived_generic_from_slotted_base` (GH-132516)
(cherry picked from commit 45c447b)

Co-authored-by: Bénédikt Tran <[email protected]>
…H-132497)

Now all protocols always accept the Bluetooth address as string and
getsockname() always returns the Bluetooth address as string.

* BTPROTO_SCO now accepts not only bytes, but str.
* BTPROTO_SCO now checks address for embedded null.
* On *BSD, BTPROTO_HCI now accepts str instead of bytes.
* On FreeBSD, getsockname() for BTPROTO_HCI now returns str instead of bytes.
* On NetBSD and DragonFly BSD, BTPROTO_HCI now checks address for embedded null.
(cherry picked from commit 1fc1df8)
…132521)

gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040)

(cherry picked from commit 8768df2)

Co-authored-by: RUANG (James Roy) <[email protected]>
…set_wakeup_fd (GH-131859) (#132522)

gh-131803: Clarify that you must register signal handlers for set_wakeup_fd (GH-131859)
(cherry picked from commit 939476b)

Co-authored-by: Jeremy Fleischman <[email protected]>
…8 locale (GH-132477) (ПР-132528)

(cherry picked from commit 102f825)
…as `bases` (GH-132212) (#132548)

gh-132176: Fix crash on `type()` when `tuple` subclass passed as `bases` (GH-132212)
(cherry picked from commit b6c552f)

Co-authored-by: sobolevn <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
…ZoneInfo` (GH-114731) (#132563)

gh-114713: Handle case of an empty string passed to `zoneinfo.ZoneInfo` (GH-114731)
(cherry picked from commit 884df11)

Co-authored-by: Bogdan Romanyuk <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
Co-authored-by: Kirill Podoprigora <[email protected]>
…GH-132567) (#132573)

Docs: Synchronise ``indexsidebar.html`` with docsbuild-scripts (GH-132567)
(cherry picked from commit 4f10b93)

Co-authored-by: Adam Turner <[email protected]>
…H-132580)

They were emitted if internet connection was not available.
(cherry picked from commit 82f74eb)

Co-authored-by: Serhiy Storchaka <[email protected]>
… no_proxy) (GH-132584) (GH-132585)

(cherry picked from commit 8b7cb94)

Co-authored-by: Serhiy Storchaka <[email protected]>
…lue` and `interpolation` set (GH-130949) (#132588)

gh-130941: Fix `configparser` parsing values with `allow_no_value` and `interpolation` set (GH-130949)
(cherry picked from commit c35c735)

Co-authored-by: sobolevn <[email protected]>
) (#132598)

gh-130052: Fix search_map_for_section() error handling (GH-132594)

* Don't call close() if the file descriptor is negative.
* If close() fails, chain the existing exception.
(cherry picked from commit 014c7f9)

Co-authored-by: Victor Stinner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ast.MatchStar.name incorrectly has class-level default value