Skip to content

gh-111609: Test end_offset in SyntaxError subclass - #127830

Merged
pablogsal merged 1 commit into
python:mainfrom
nineteendo:patch-1
Dec 11, 2024
Merged

gh-111609: Test end_offset in SyntaxError subclass#127830
pablogsal merged 1 commit into
python:mainfrom
nineteendo:patch-1

Conversation

@nineteendo

@nineteendonineteendo commented Dec 11, 2024

Copy link
Copy Markdown
Contributor

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

classCustomSyntaxError(SyntaxError):
passraiseCustomSyntaxError("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
Copy Markdown
ContributorAuthor

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
Comment threadLib/test/test_exceptions.py
@Eclips4Eclips4 removed the needs backport to 3.12 only security fixes label Dec 11, 2024

@Eclips4Eclips4 left a comment

Copy link
Copy Markdown
Member

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:mainDec 11, 2024
@miss-islington-app

Copy link
Copy Markdown

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
@hugovkhugovk 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
Copy Markdown

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
Copy Markdown

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

@bedevere-appbedevere-appBot 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>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip newstestsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@nineteendo@pablogsal@Eclips4@hugovk@ZeroIntensity