Skip to content

SyntaxWarning: invalid escape sequence #62

Closed

Description

@cclauss

Fixed in #55

https://docs.python.org/3/reference/lexical_analysis.html#unrecognized-escape-sequences

Changed in version 3.12: Unrecognized escape sequences produce a SyntaxWarning.
In a future Python version, they will raise a SyntaxError.

https://docs.python.org/3/whatsnew/3.12.html#other-language-changes

.venv/lib/python3.13/site-packages/httpbin/helpers.py:38: SyntaxWarning: invalid escape sequence '_'

\_;`"---"`|//

venv/lib/python3.13/site-packages/httpbin/helpers.py:84: SyntaxWarning: invalid escape sequence '\ '
\ .-" "-. /

\ .-"` `"-. /

venv/lib/python3.13/site-packages/httpbin/helpers.py:444: SyntaxWarning: invalid escape sequence '\s'
match = re.search('\s*(W/)?"?([^"])"?\s', part)

match = re.search('\s*(W/)?\"?([^"]*)\"?\s*', part)

Activity

  1. Mirochill commented on May 24, 2026

    @Mirochill

    This appears to be covered by the existing PR #55: it changes the two ASCII art string literals and the parse_multi_value_header() regex referenced in this issue.

  2. added a commit that references this issue on Jun 16, 2026
    4e445e0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions