Skip to content

Commit 5b50daa

Browse files
Relocate import
1 parent c8fc658 commit 5b50daa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/encodings/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"""
3030

3131
import codecs
32-
import warnings
3332
import sys
3433
from . import aliases
3534

@@ -57,6 +56,7 @@ def normalize_encoding(encoding):
5756
encoding = str(encoding, "ascii")
5857

5958
if not encoding.isascii():
59+
import warnings
6060
warnings.warn(
6161
"Support for non-ascii encoding names will be removed in 3.17",
6262
DeprecationWarning, stacklevel=2)

0 commit comments

Comments
 (0)