Skip to content

Commit f0cc920

Browse files
[refactor] Remove code that "disables deprecation warnings about \u"
Probably now useless: it doesn't seem to do anything anymore as far as I can tell. And I checked a couple of things, and old documentation. This is essentially a revert of #7635 aka bd00106, although not 100% exactly.
1 parent db67fac commit f0cc920

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

mypy/fastparse.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import re
44
import sys
5-
import warnings
65
from collections.abc import Sequence
76
from typing import Any, Callable, Final, Literal, Optional, TypeVar, Union, cast, overload
87

@@ -227,11 +226,7 @@ def parse(
227226
assert options.python_version[0] >= 3
228227
feature_version = options.python_version[1]
229228
try:
230-
# Disable deprecation warnings about \u
231-
with warnings.catch_warnings():
232-
warnings.filterwarnings("ignore", category=DeprecationWarning)
233-
ast = ast3_parse(source, fnam, "exec", feature_version=feature_version)
234-
229+
ast = ast3_parse(source, fnam, "exec", feature_version=feature_version)
235230
tree = ASTConverter(
236231
options=options,
237232
is_stub=is_stub_file,

0 commit comments

Comments
 (0)