1
0
forked from VimPlug/jedi

Python 3.5 is not supported for refactorings

This commit is contained in:
Dave Halter
2020-02-27 18:59:16 +01:00
parent ebdaf0177d
commit 140a45081f
3 changed files with 8 additions and 4 deletions

View File

@@ -52,12 +52,16 @@ sys.setrecursionlimit(3000)
def no_py2_support(func):
# TODO remove when removing Python 2
# TODO remove when removing Python 2/3.5
def wrapper(self, *args, **kwargs):
if self._grammar.version_info.major == 2:
raise NotImplementedError(
"Python 2 is deprecated and won't support this feature anymore"
)
if self._grammar.version_info[:2] == (3, 5):
raise NotImplementedError(
"No support for refactorings on Python 3.5"
)
return func(self, *args, **kwargs)
return wrapper