Skip to content

Conversation

@bneradt
Copy link
Contributor

@bneradt bneradt commented Aug 21, 2023

Python 3.12 makes the use of unexpected escape sequences a SyntaxError. This is simply avoided by making these regexes, which are intentional and passed down to other modules or shell commands, raw character sequences so that Python doesn't incorrectly try to interpret them.

Python 3.12 makes the use of unexpected escape sequences a SyntaxError.
This is simply avoided by making these regexes, which are intentional
and passed down to other modules or shell commands, raw character
sequences so that Python doesn't incorrectly try to interpret them.
@bneradt bneradt added the AuTest label Aug 21, 2023
@bneradt bneradt added this to the 10.0.0 milestone Aug 21, 2023
@bneradt bneradt self-assigned this Aug 21, 2023
@bryancall bryancall requested a review from moonchen August 21, 2023 22:06
@bneradt bneradt merged commit 06519e8 into apache:master Aug 22, 2023
@bneradt bneradt deleted the address_python3_12_escape_sequence_errors branch August 22, 2023 16:49
@bneradt
Copy link
Contributor Author

bneradt commented Aug 22, 2023

I marked this for 9.2.x since we'll need this for autest of that branch for anything running Python 3.12. Otherwise, CI will fail.

@zwoop
Copy link
Contributor

zwoop commented Aug 28, 2023

This fixes something that's new via #9572, but looking at that one, kinda feels we also want #9572 in 9.2.x?

@bneradt
Copy link
Contributor Author

bneradt commented Aug 28, 2023

This fixes something that's new via #9572, but looking at that one, kinda feels we also want #9572 in 9.2.x?

I wouldn't pull in #9572 just because of this because that includes a production change. Rather, let's take this PR out of 9.2.x and I'll create a new PR without the patch for that new test.

zwoop pushed a commit that referenced this pull request Aug 29, 2023
Python 3.12 makes the use of unexpected escape sequences a SyntaxError.
This is simply avoided by making these regexes, which are intentional
and passed down to other modules or shell commands, raw character
sequences so that Python doesn't incorrectly try to interpret them.

(cherry picked from commit 06519e8)
@zwoop
Copy link
Contributor

zwoop commented Aug 29, 2023

Cherry-picked to v9.2.x

@zwoop zwoop modified the milestones: 10.0.0, 9.2.3 Aug 29, 2023
cmcfarlen pushed a commit to cmcfarlen/trafficserver that referenced this pull request Jun 3, 2024
Python 3.12 makes the use of unexpected escape sequences a SyntaxError.
This is simply avoided by making these regexes, which are intentional
and passed down to other modules or shell commands, raw character
sequences so that Python doesn't incorrectly try to interpret them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants