Skip to content
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

bpo-45292: [PEP-654] exception groups and except* documentation #30158

Merged
merged 17 commits into from
Jan 6, 2022

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Dec 16, 2021

@iritkatriel
Copy link
Member Author

@willingc Is there anyone from the documentation experts who may be interested in helping with this?

@iritkatriel iritkatriel changed the title bpo-45292: except* documentation bpo-45292: [PEP-654] exception groups and except* documentation Dec 16, 2021
@gvanrossum
Copy link
Member

@Fidget-Spinner Are you available to help here?

@willingc
Copy link
Contributor

@iritkatriel I'm happy to help if @Fidget-Spinner is unavailable. I'm assuming you wish for some help to resolve whatever is causing the doc build to error.

Copy link
Contributor

@willingc willingc left a comment

Choose a reason for hiding this comment

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

Irit, this looks good. Looking into the keyword errors.

Doc/library/exceptions.rst Outdated Show resolved Hide resolved
Doc/library/exceptions.rst Outdated Show resolved Hide resolved
Doc/library/exceptions.rst Outdated Show resolved Hide resolved
@iritkatriel
Copy link
Member Author

@iritkatriel I'm happy to help if @Fidget-Spinner is unavailable. I'm assuming you wish for some help to resolve whatever is causing the doc build to error.

Thank you. Not just the formatting error, also a fresh reader who can see if it’s clear and consistent with the documentation style, and whether things are where they belong and at the right level of detail.

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
@willingc
Copy link
Contributor

@iritkatriel I think the tone and content are well done. I need to drop for the evening but feel free to merge if the build error resolves. Ping me in the morning if you get stuck on that. Thanks!

@Fidget-Spinner
Copy link
Member

Fidget-Spinner commented Dec 17, 2021

Hi @iritkatriel, you need to create a label/anchor (I forgot the term) for except_star. See line 221-223 of compound_stmts.rst for an example. Adding a .._except_star: under the try, except, finally labels should be sufficient.

For some reason, keyword labels must be placed preceding a title, even though rST supports arbitrary anchors normally. See https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-ref for more info.

@iritkatriel
Copy link
Member Author

Thank you @willingc and @Fidget-Spinner , it's looking good now.

I will give @gvanrossum and @1st1 and anyone else a chance to review before merging. There isn't any rush with this - the early users we have now already read the PEP.

Copy link
Member

@Fidget-Spinner Fidget-Spinner left a comment

Choose a reason for hiding this comment

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

Wow! This is the first time I'm reading about PEP 654 in more detail, and I did not realize it was this powerful!

Speaking from the perspective of a newbie, I understood what you wrote. The tutorial and language reference is very clear to me.

Doc/reference/compound_stmts.rst Show resolved Hide resolved
Doc/reference/compound_stmts.rst Outdated Show resolved Hide resolved
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Doc/reference/compound_stmts.rst Outdated Show resolved Hide resolved
Doc/tutorial/errors.rst Show resolved Hide resolved
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Doc/library/exceptions.rst Outdated Show resolved Hide resolved
Doc/library/exceptions.rst Outdated Show resolved Hide resolved
Doc/library/traceback.rst Outdated Show resolved Hide resolved
Doc/tutorial/errors.rst Show resolved Hide resolved
Doc/tutorial/errors.rst Outdated Show resolved Hide resolved
iritkatriel and others added 3 commits December 20, 2021 19:56
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
@Zac-HD
Copy link
Contributor

Zac-HD commented Dec 21, 2021

I'm happy to take comments related to .__note__ over on my PEP 678 draft 😁

@iritkatriel
Copy link
Member Author

Shall I merge this? It might be nice to have the documentation there when except* is released in the next alpha.

@willingc
Copy link
Contributor

willingc commented Jan 6, 2022

@iritkatriel Prior to merging, can you recap any outstanding next actions needed in a message here. Thanks!

@iritkatriel
Copy link
Member Author

iritkatriel commented Jan 6, 2022

I believe this PR now describes the way exception groups and except* work, and is consistent with PEP654.

The new __note__ field on exception is the subject of PEP678, which is still in draft stage. The doc here describes the current implementation, which is consistent with the PEP. Any changes/reversion following the PEP678 discussions will be made in the code and the doc at the same time.

@iritkatriel
Copy link
Member Author

I could also split out the __note__ section into a separate PR and merge only the PEP654 stuff for now if that works better.

@gvanrossum
Copy link
Member

I could also split out the __note__ section into a separate PR and merge only the PEP654 stuff for now if that works better.

Yeah, let's keep __note__ undocumented until its PEP has been approved.

Doc/tutorial/errors.rst Outdated Show resolved Hide resolved
@iritkatriel iritkatriel merged commit 9925e70 into python:main Jan 6, 2022
@iritkatriel iritkatriel deleted the bpo-45292-doc branch January 6, 2022 19:22
@iritkatriel
Copy link
Member Author

Thank you everyone!

The notes section is in this draft PR #30441.

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 news
Projects
None yet
Development

Successfully merging this pull request may close these issues.