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

gh-111159: Fix SyntaxError doctests for non-builtin exception classes #111541

Merged
merged 6 commits into from Nov 4, 2023

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Oct 31, 2023

Copy link
Contributor

@scoder scoder left a comment

Choose a reason for hiding this comment

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

Looks almost good to me, just a performance+readability remark.

Lib/doctest.py Outdated Show resolved Hide resolved
Copy link
Contributor

@scoder scoder left a comment

Choose a reason for hiding this comment

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

What about this?

Lib/doctest.py Outdated Show resolved Hide resolved
Lib/doctest.py Outdated Show resolved Hide resolved
Co-authored-by: scoder <stefan_ml@behnel.de>
Lib/test/test_doctest.py Outdated Show resolved Hide resolved
@scoder
Copy link
Contributor

scoder commented Nov 1, 2023

Looks good now.
This fixes a bug introduced in 3.13a1. Not sure what the current policy is – would that suggest adding a news entry for 3.13a2?

@iritkatriel iritkatriel added type-bug An unexpected behavior, bug, or error stdlib Python modules in the Lib dir needs backport to 3.11 only security fixes needs backport to 3.12 bug and security fixes labels Nov 4, 2023
@iritkatriel iritkatriel merged commit 18c9548 into python:main Nov 4, 2023
31 checks passed
@miss-islington-app
Copy link

Thanks @sobolevn for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 4, 2023
… classes (pythonGH-111541)

(cherry picked from commit 18c9548)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 4, 2023
… classes (pythonGH-111541)

(cherry picked from commit 18c9548)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@bedevere-app
Copy link

bedevere-app bot commented Nov 4, 2023

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

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Nov 4, 2023
@bedevere-app
Copy link

bedevere-app bot commented Nov 4, 2023

GH-111733 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Nov 4, 2023
@sobolevn
Copy link
Member Author

sobolevn commented Nov 4, 2023

Thanks everyone! 👍

iritkatriel pushed a commit that referenced this pull request Nov 4, 2023
…n classes (GH-111541) (#111733)

gh-111159: Fix `SyntaxError` doctests for non-builtin exception classes (GH-111541)
(cherry picked from commit 18c9548)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
iritkatriel pushed a commit that referenced this pull request Nov 4, 2023
…n classes (GH-111541) (#111732)

gh-111159: Fix `SyntaxError` doctests for non-builtin exception classes (GH-111541)
(cherry picked from commit 18c9548)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants