PyInstaller: Fix DeprecationWarning when parsing the stub using ast.parse() (#9112)

```python
>>> import ast, warnings
>>> warnings.filterwarnings("always")
>>> with open("typeshed/stubs/pyinstaller/pyi_splash/__init__.pyi", encoding="utf-8") as file:
...     source = file.read()
...
>>> ast.parse(source)
<unknown>:11: DeprecationWarning: invalid escape sequence '\u'
<ast.Module object at 0x0000027EAF6D3AF0>
```

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Alex Waygood
2022-11-06 22:50:38 +00:00
committed by GitHub
parent 5751b467e0
commit 658b6e7de0

View File

@@ -8,5 +8,5 @@ def is_alive() -> bool: ...
def update_text(msg: str) -> None: ...
def close() -> None: ...
CLOSE_CONNECTION: Literal[b"\u0004"]
CLOSE_CONNECTION: Literal[b"\x04"]
FLUSH_CHARACTER: Literal[b"\r"]