Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove global import of locale module in test.support
  • Loading branch information
shihai1991 committed Apr 29, 2020
commit 4a1471eec9240e799e7098679d31f9fbd976121a
3 changes: 2 additions & 1 deletion Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import hashlib
import importlib
import importlib.util
import locale
import os
import platform
import re
Expand Down Expand Up @@ -1622,6 +1621,7 @@ def run_with_locale(catstr, *locales):
def decorator(func):
def inner(*args, **kwds):
try:
import locale
category = getattr(locale, catstr)
orig_locale = locale.setlocale(category)
except AttributeError:
Expand Down Expand Up @@ -2432,6 +2432,7 @@ def skip_if_buggy_ucrt_strfptime(test):
See bpo-37552 [Windows] strptime/strftime return invalid
results with UCRT version 17763.615
"""
import locale
global _buggy_ucrt
if _buggy_ucrt is None:
if(sys.platform == 'win32' and
Expand Down