0
0
mirror of https://github.com/python/cpython.git synced 2024-11-24 17:47:13 +01:00
cpython/Parser
Victor Stinner a60ddd31be
gh-98401: Invalid escape sequences emits SyntaxWarning (#99011)
A backslash-character pair that is not a valid escape sequence now
generates a SyntaxWarning, instead of DeprecationWarning.  For
example, re.compile("\d+\.\d+") now emits a SyntaxWarning ("\d" is an
invalid escape sequence), use raw strings for regular expression:
re.compile(r"\d+\.\d+"). In a future Python version, SyntaxError will
eventually be raised, instead of SyntaxWarning.

Octal escapes with value larger than 0o377 (ex: "\477"), deprecated
in Python 3.11, now produce a SyntaxWarning, instead of
DeprecationWarning. In a future Python version they will be
eventually a SyntaxError.

codecs.escape_decode() and codecs.unicode_escape_decode() are left
unchanged: they still emit DeprecationWarning.

* The parser only emits SyntaxWarning for Python 3.12 (feature
  version), and still emits DeprecationWarning on older Python
  versions.
* Fix SyntaxWarning by using raw strings in Tools/c-analyzer/ and
  wasm_build.py.
2022-11-03 17:53:25 +01:00
..
action_helpers.c
asdl_c.py GH-91079: Decouple C stack overflow checks from Python recursion checks. (GH-96510) 2022-10-05 01:34:03 +01:00
asdl.py
myreadline.c gh-93937: PyOS_StdioReadline() uses PyConfig.legacy_windows_stdio (#94024) 2022-06-20 16:10:47 +02:00
parser.c gh-98931: Improve error message when the user types 'import x from y' instead of 'from y import x' (#98932) 2022-11-01 13:01:20 +00:00
peg_api.c
pegen_errors.c gh-97973: Return all necessary information from the tokenizer (GH-97984) 2022-10-06 16:07:17 -07:00
pegen.c gh-97973: Return all necessary information from the tokenizer (GH-97984) 2022-10-06 16:07:17 -07:00
pegen.h
Python.asdl
string_parser.c gh-98401: Invalid escape sequences emits SyntaxWarning (#99011) 2022-11-03 17:53:25 +01:00
string_parser.h
token.c gh-97669: Create Tools/build/ directory (#97963) 2022-10-17 12:01:00 +02:00
tokenizer.c gh-97997: Add col_offset field to tokenizer and use that for AST nodes (#98000) 2022-10-07 14:38:35 -07:00
tokenizer.h gh-97997: Add col_offset field to tokenizer and use that for AST nodes (#98000) 2022-10-07 14:38:35 -07:00