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
(cherry picked from commit ad3bbe8)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
…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 <adorilson@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…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 <dw-git@d-woods.co.uk>
…base (GH-132231) (GH-132443)

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

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…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 <1538321957@qq.com>
…-132374) (#132465)

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

Co-authored-by: Felix Scherz <felixwscherz@gmail.com>
gh-132111: Document dataclasses.InitVar (GH-132446)
(cherry picked from commit 281fc33)

Co-authored-by: Tapeline <mail@tapeline.dev>
…32422) (#132485)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
…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 <storchaka@gmail.com>
…) (#132487)

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

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
…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 <10796600+picnixz@users.noreply.github.com>
…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) <longjinyii@outlook.com>
…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 <jeremyfleischman@gmail.com>
…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 <mail@sobolevn.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
…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 <65823030+wrongnull@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
…GH-132567) (#132573)

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

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
…H-132580)

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

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
… no_proxy) (GH-132584) (GH-132585)

(cherry picked from commit 8b7cb94)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…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 <mail@sobolevn.me>
) (#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 <vstinner@python.org>
) (#132603)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
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