Skip to content
New issue

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

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

Already on GitHub? # to your account

gh-111609: Test end_offset in SyntaxError subclass #127830

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

nineteendo
Copy link
Contributor

@nineteendo nineteendo commented Dec 11, 2024

This was fixed as a side effect of #110702, but wasn't tested.

class CustomSyntaxError(SyntaxError):
    pass

raise CustomSyntaxError("Error message", (None, 1, 5, 'a = sin(3)', 1, 9))

Output:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 1
    a = sin(3)
        ^^^^
CustomSyntaxError: Error message

@nineteendo
Copy link
Contributor Author

Peter, this test is already on 3.12, so doesn't need to be backported.

@nineteendo nineteendo marked this pull request as ready for review December 11, 2024 15:54
@Eclips4 Eclips4 removed the needs backport to 3.12 bug and security fixes label Dec 11, 2024
Copy link
Member

@Eclips4 Eclips4 left a comment

Choose a reason for hiding this comment

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

Thank you.

@pablogsal pablogsal merged commit e8f4e27 into python:main Dec 11, 2024
52 checks passed
@miss-islington-app
Copy link

Thanks @nineteendo for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 11, 2024
…127830)

Test `end_offset` in SyntaxError subclass
(cherry picked from commit e8f4e27)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
@nineteendo nineteendo deleted the patch-1 branch December 11, 2024 18:40
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
@hugovk hugovk added needs backport to 3.13 bugs and security fixes and removed needs backport to 3.13 bugs and security fixes labels Feb 21, 2025
@miss-islington-app
Copy link

Thanks @nineteendo for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 21, 2025
…127830)

Test `end_offset` in SyntaxError subclass
(cherry picked from commit e8f4e27)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Feb 21, 2025

GH-130407 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Feb 21, 2025
hugovk pushed a commit that referenced this pull request Feb 21, 2025
… (#130407)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants