Skip to content

Conversation

@hunterhogan
Copy link
Contributor

I inappropriately submitted this to the main branch in pull request #134676, which is now closed.

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.

@picnixz
Copy link
Member

picnixz commented May 26, 2025

  • Why was this opened against 3.13? is it 3.13 only?
  • If not, please checkout from main and open a PR against main. We will make the backports if needed.

@hunterhogan
Copy link
Contributor Author

  • Why was this opened against 3.13? is it 3.13 only?

  • If not, please checkout from main and open a PR against main. We will make the backports if needed.

I inappropriately submitted this to the main branch in pull request #134676, which is now closed.

@picnixz
Copy link
Member

picnixz commented May 26, 2025

Yes, but why was it submitted incorrectly? all PRs should be opened against main. AFAICT, the other PR was based from 3.13 and not main. Or is the issue only in 3.13?

@hunterhogan
Copy link
Contributor Author

Yes, but why was it submitted incorrectly? all PRs must be opened against main. afaict, the other PR was based from 3.13 and not main. Or is the issue only in 3.13?

#134676 (comment)

Why? I am diligently trying to follow instructions.

I am a little frustrated that you are asking me questions that are certainly answered in the first pull request or in the Issue.

I cannot do this the right way if I don't understand what the right way is.

@picnixz
Copy link
Member

picnixz commented May 26, 2025

that are certainly answered in the first pull request or in the Issue

I can't find in the issue whether the issue is 3.13 only or not. If it's a 3.13 issue, then it's fine, but AFAICT, the current behaviors between 3.13 and 3.15 look the same. For that reason, 3.13, 3.14 and 3.15 are affected by this issue and thus we should fix 3.15 (which is main) and then we backport the changes to 3.14 and 3.13 (this is how it's done).

@picnixz
Copy link
Member

picnixz commented May 26, 2025

#134676 (comment)

This comment was perhaps incomplete but the idea was to:

  • Checkout from main
  • Make the changes.
  • Open a PR against main.

It would have been fine to checkout from 3.13, make the changes and open a PR against 3.13 only if the bug is present in 3.13 but not in 3.14 or 3.15 (but AFAICT, this is not the case here)

@picnixz
Copy link
Member

picnixz commented May 26, 2025

And I apologize if I was rude, that wasn't my intention!

@hunterhogan
Copy link
Contributor Author

And I apologize if I was rude, that wasn't my intention!

Thank you very much for the additional information! I was confused. I sincerely hope I understand things well enough now to submit a well-formed pull request.

@picnixz
Copy link
Member

picnixz commented May 26, 2025

Don't worry, we'll go through together! It's 3:24 AM here so I'll be away but I'll definitely have a look at your PR. I'm sorry if I sounded rude with my questions that were maybe a bit too direct

@hunterhogan
Copy link
Contributor Author

It's all good. You believed I had as much knowledge as you have, which is a compliment to me because I barely understand git or this process for contributing to CPython.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review topic-parser type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants