[Python-checkins] bpo-40275: test.support imports lazily locale import (GH-19761)
Hai Shi
webhook-mailer at python.org
Mon May 4 14:05:10 EDT 2020
https://github.com/python/cpython/commit/975408c065b645e7d717546b0d744415abb45cd1
commit: 975408c065b645e7d717546b0d744415abb45cd1
branch: master
author: Hai Shi <shihai1992 at gmail.com>
committer: GitHub <noreply at github.com>
date: 2020-05-04T20:05:02+02:00
summary:
bpo-40275: test.support imports lazily locale import (GH-19761)
files:
M Lib/test/support/__init__.py
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index bd2157496fe00..d2418282afc11 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -13,7 +13,6 @@
import glob
import importlib
import importlib.util
-import locale
import os
import platform
import re
@@ -2311,6 +2310,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
More information about the Python-checkins
mailing list