Skip to content

Add version directives to ast docs #108788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 7, 2023
Merged

Conversation

hauntsaninja
Copy link
Contributor

@hauntsaninja hauntsaninja commented Sep 1, 2023

@bedevere-bot bedevere-bot added docs Documentation in the Doc dir skip news awaiting core review labels Sep 1, 2023
@hauntsaninja hauntsaninja added needs backport to 3.12 only security fixes skip issue and removed docs Documentation in the Doc dir awaiting core review skip news labels Sep 1, 2023
@hauntsaninja hauntsaninja added docs Documentation in the Doc dir awaiting core review skip news labels Sep 1, 2023
Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The versionadded directives for a bunch of the match nodes are rendered within the code blocks: https://cpython-previews--108788.org.readthedocs.build/en/108788/library/ast.html#ast.MatchAs

I didn't add these initially because other recently added objects didn't have them. Not sure if there's a reason behind that, but it seems useful to add the directives.

You might also want to add 3.8 for NamedExpr, which incidentally is misindented (https://docs.python.org/3.10/library/ast.html#ast.NamedExpr).

@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@hauntsaninja
Copy link
Contributor Author

Thank you! (I have made the requested changes; please review again)

@bedevere-bot
Copy link

Thanks for making the requested changes!

@JelleZijlstra: please review the changes made to this pull request.

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build preview didn't update but I built locally and everything looks fine now, thanks!

We'll have to do a manual backport for 3.11.

@hugovk
Copy link
Member

hugovk commented Sep 7, 2023

Aside: maybe the build preview was slow to upload or cached or something, here's the new versionadded above the "Subscripting" header:

image

https://cpython-previews--108788.org.readthedocs.build/en/108788/library/ast.html#subscripting

@hauntsaninja hauntsaninja merged commit 74fc96b into python:main Sep 7, 2023
@miss-islington
Copy link
Contributor

Thanks @hauntsaninja for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@hauntsaninja hauntsaninja deleted the ast-directi branch September 7, 2023 18:34
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 7, 2023
(cherry picked from commit 74fc96b)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
@bedevere-bot
Copy link

GH-109106 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Sep 7, 2023
Yhg1s pushed a commit that referenced this pull request Sep 8, 2023
Add version directives to ast docs (GH-108788)
(cherry picked from commit 74fc96b)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants