Skip to content

Commit cb7ba0f

Browse files
committed
gh-161513: trim comments per review
1 parent a10fb85 commit cb7ba0f

3 files changed

Lines changed: 1 addition & 6 deletions

File tree

‎Lib/platform.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@
114114
import functools
115115
import itertools
116116
lazy import warnings
117-
# _wmi is resolved on first use, see _wmi_query.
118117
lazy import _wmi
119118

120119
### Globals & Constants
@@ -331,8 +330,6 @@ def _syscmd_ver(system='', release='', version='',
331330
def _wmi_query(table, *keys):
332331
global _wmi
333332
try:
334-
# A failed lazy import is retried on every access, so bind None
335-
# to record that _wmi is unavailable.
336333
_wmi # Force the deferred import.
337334
except ImportError:
338335
_wmi = None

‎Lib/test/test_platform.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,6 @@ def test_win32_ver_on_non_windows(self):
438438

439439
@support.cpython_only
440440
def test_wmi_is_lazily_imported(self):
441-
# gh-161513: importing platform must not import the _wmi extension module.
442441
import_helper.ensure_lazy_imports('platform', {'_wmi'})
443442

444443
def test_mac_ver(self):
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
:mod:`platform` is now about 30% faster to import on Windows: the ``_wmi``
2-
extension module is loaded on first use instead of at import time, so
3-
``import platform`` no longer loads the OLE and property-system DLLs.
2+
extension module is loaded on first use instead of at import time.

0 commit comments

Comments
 (0)