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

fix: tests webserver syntaxwarning #2432

Merged
merged 1 commit into from
May 3, 2024

Conversation

SchoNie
Copy link
Contributor

@SchoNie SchoNie commented May 3, 2024

Changed in Python version 3.12: Unrecognized escape sequences produce a SyntaxWarning. In a future Python version they will be eventually a SyntaxError.
2.4.1.1. Escape sequences

Change to raw string literal to fix:

/webserver.py:17: SyntaxWarning: invalid escape sequence '\d'
  elif re.match("/status/(\d+)", self.path):
/webserver.py:18: SyntaxWarning: invalid escape sequence '\d'
  result = re.match("/status/(\d+)", self.path)

To fix:
/webserver.py:17: SyntaxWarning: invalid escape sequence '\d'
  elif re.match("/status/(\d+)", self.path):
/webserver.py:18: SyntaxWarning: invalid escape sequence '\d'
  result = re.match("/status/(\d+)", self.path)
@buchdag buchdag added the type/test PR that add missing tests or correct existing tests label May 3, 2024
@buchdag buchdag merged commit 43b8ab8 into nginx-proxy:main May 3, 2024
2 checks passed
@buchdag
Copy link
Member

buchdag commented May 3, 2024

Thanks !

@SchoNie SchoNie deleted the webserver-syntaxwarning-fix branch May 3, 2024 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/test PR that add missing tests or correct existing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants