Skip to content

Commit b0461e1

Browse files
authored
bpo-40275: test.support.check_impl_detail() uses sys.implementation (GH-20468)
check_impl_detail() of test.support now uses sys.implementation.name, instead of platform.python_implementation().lower(). This change prepares test.support to import the platform module lazily.
1 parent 10228ba commit b0461e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎Lib/test/support/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,7 @@ def check_impl_detail(**guards):
17401740
if check_impl_detail(cpython=False): # everywhere except on CPython
17411741
"""
17421742
guards, default = _parse_guards(guards)
1743-
return guards.get(platform.python_implementation().lower(), default)
1743+
return guards.get(sys.implementation.name, default)
17441744

17451745

17461746
def no_tracing(func):

0 commit comments

Comments
 (0)