mirror of
https://github.com/python/cpython.git
synced 2026-04-20 02:40:59 +00:00
gh-146547: Use lazy imports in ctypes (GH-146548)
This commit is contained in:
parent
dfeb160bc3
commit
e65987d4c0
3 changed files with 7 additions and 4 deletions
|
|
@ -2,9 +2,10 @@
|
|||
|
||||
import os as _os
|
||||
import sys as _sys
|
||||
import sysconfig as _sysconfig
|
||||
import types as _types
|
||||
|
||||
lazy import sysconfig as _sysconfig
|
||||
|
||||
from _ctypes import Union, Structure, Array
|
||||
from _ctypes import _Pointer
|
||||
from _ctypes import CFuncPtr as _CFuncPtr
|
||||
|
|
|
|||
|
|
@ -5,11 +5,12 @@
|
|||
"""
|
||||
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
from _ctypes import CField, buffer_info
|
||||
import ctypes
|
||||
|
||||
lazy import warnings
|
||||
|
||||
def round_down(n, multiple):
|
||||
assert n >= 0
|
||||
assert multiple > 0
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
lazy import shutil
|
||||
lazy import subprocess
|
||||
|
||||
# find_library(name) returns the pathname of a library, or None.
|
||||
if os.name == "nt":
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue