File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 22
33from taichi ._funcs import *
44from taichi ._lib import core as _ti_core
5+ from taichi ._lib .utils import warn_restricted_version
56from taichi ._logging import *
67from taichi ._snode import *
78from taichi .lang import * # pylint: disable=W0622 # TODO(archibate): It's `taichi.lang.core` overriding `taichi.core`
@@ -93,3 +94,6 @@ def __getattr__(attr):
9394
9495del sys
9596del _ti_core
97+
98+ warn_restricted_version ()
99+ del warn_restricted_version
Original file line number Diff line number Diff line change 22import platform
33import re
44import sys
5+ import warnings
56
67from colorama import Fore , Style
78
@@ -202,7 +203,9 @@ def try_get_loaded_libc_version():
202203
203204def try_get_pip_version ():
204205 try :
205- import pip # pylint: disable=import-outside-toplevel
206+ with warnings .catch_warnings ():
207+ warnings .simplefilter ("ignore" )
208+ import pip # pylint: disable=import-outside-toplevel
206209 return tuple ([int (v ) for v in pip .__version__ .split ('.' )])
207210 except ImportError :
208211 return None
@@ -244,6 +247,3 @@ def warn_restricted_version():
244247 )
245248 except Exception :
246249 pass
247-
248-
249- warn_restricted_version ()
You can’t perform that action at this time.
0 commit comments