We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4516a8d commit 43669ccCopy full SHA for 43669cc
nipype/__init__.py
@@ -6,6 +6,7 @@
6
7
import os
8
import functools
9
+import sys
10
from distutils.version import LooseVersion
11
12
from .info import (LONG_DESCRIPTION as __doc__, URL as __url__, STATUS as
@@ -59,7 +60,16 @@ def get_info():
59
60
Rename, Function, Select, Merge)
61
62
-@functools.lru_cache()
63
+def sys_based_cache(condition):
64
+ def decorator(func):
65
+ if not condition:
66
+ return func
67
+ else:
68
+ return functools.lru_cache(func)
69
+ return decorator
70
+
71
72
+@sys_based_cache(sys.version >= 3)
73
def check_version(raise_exception=False):
74
"""Check for the latest version of the library
75
0 commit comments