8000 gh-115931: Fix `SyntaxWarning`s in `test_unparse` by sobolevn · Pull Request #115935 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-115931: Fix SyntaxWarnings in test_unparse #115935

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 2 commits into from
Feb 26, 2024

Conversation

sobolevn
Copy link
Member
@sobolevn sobolevn commented Feb 26, 2024

Refs:

The problem is that the odd amount of \ produces the \ escape sequence that is not valid.
So, I added two expected warnings + I added two extra cases with valid escape sequences \n.

Thanks a lot to @Eclips4 for the report!
CC @15r10nk

@bedevere-app bedevere-app bot added the tests Tests in the Lib/test dir label Feb 26, 2024
@Eclips4 Eclips4 added the needs backport to 3.12 only security fixes label Feb 26, 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.

Thanks Nikita!

@pablogsal pablogsal merged commit b7383b8 into python:main Feb 26, 2024
@miss-islington-app
Copy link

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

@pablogsal
Copy link
Member

Thanks @sobolevn !

8000 miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 26, 2024
)

(cherry picked from commit b7383b8)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@bedevere-app
Copy link
bedevere-app bot commented Feb 26, 2024

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

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Feb 26, 2024
pablogsal pushed a commit that referenced this pull request Feb 26, 2024
…115948)

gh-115931: Fix `SyntaxWarning`s in `test_unparse` (GH-115935)
(cherry picked from commit b7383b8)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024