1
0
forked from VimPlug/jedi

Remove Python 3.4 support

This commit is contained in:
Dave Halter
2020-02-27 02:04:03 +01:00
parent d1ac00f64f
commit a892887b04
28 changed files with 31 additions and 68 deletions

View File

@@ -473,7 +473,7 @@ def test_func():
#? int()
tuple({1})[0]
# python >= 3.4
# python > 2.7
# -----------------
# PEP 3132 Extended Iterable Unpacking (star unpacking)
# -----------------

View File

@@ -242,7 +242,7 @@ def x():
# yield from
# -----------------
# python >= 3.4
# python > 2.7
def yield_from():
yield from iter([1])

View File

@@ -1,6 +1,6 @@
""" Pep-0484 type hinting """
# python >= 3.4
# python > 2.7
class A():

View File

@@ -283,7 +283,7 @@ def testnewtype2(y):
y
#? []
y.
# python >= 3.4
# python > 2.7
class TestDefaultDict(typing.DefaultDict[str, int]):
def setdud(self):
@@ -311,7 +311,7 @@ for key in x.keys():
for value in x.values():
#? int()
value
# python >= 3.4
# python > 2.7
"""

View File

@@ -130,7 +130,7 @@ def test_p(monkeypatch):
#? ['setattr']
monkeypatch.setatt
# python > 3.4
# python > 2.7
#? ['capsysbinary']
def test_p(capsysbin

View File

@@ -359,7 +359,7 @@ class Test(metaclass=Meta):
# Enum
# -----------------
# python >= 3.4
# python > 2.7
import enum
class X(enum.Enum):

View File

@@ -1,4 +1,4 @@
# python >= 3.4
# python > 2.7
from stub_folder import with_stub, stub_only, with_stub_folder, stub_only_folder
# -------------------------

View File

@@ -2,7 +2,7 @@
import sys
sys.path[0:0] = [
'/usr/lib/python3.4/site-packages',
'/usr/lib/python3.8/site-packages',
'/tmp/.buildout/eggs/important_package.egg'
]

View File

@@ -440,7 +440,7 @@ Options:
--pdb Enable pdb debugging on fail.
-d, --debug Enable text output debugging (please install ``colorama``).
--thirdparty Also run thirdparty tests (in ``completion/thirdparty``).
--env <dotted> A Python version, like 2.7, 3.4, etc.
--env <dotted> A Python version, like 2.7, 3.8, etc.
"""
if __name__ == '__main__':
import docopt

View File

@@ -27,7 +27,7 @@ def test_find_system_environments():
@pytest.mark.parametrize(
'version',
['2.7', '3.4', '3.5', '3.6', '3.7']
['2.7', '3.5', '3.6', '3.7']
)
def test_versions(version):
try:

View File

@@ -67,7 +67,7 @@ def test_path_from_sys_path_assignment(Script):
import sys
sys.path[0:0] = [
'/usr/lib/python3.4/site-packages',
'/usr/lib/python3.8/site-packages',
'/home/test/.buildout/eggs/important_package.egg'
]

View File

@@ -33,9 +33,9 @@ def test_get_signatures_stdlib(Script):
assert len(sigs[0].params) == 1
# Check only on linux 64 bit platform and Python3.4.
# Check only on linux 64 bit platform and Python3.8.
@pytest.mark.parametrize('load_unsafe_extensions', [False, True])
@pytest.mark.skipif('sys.platform != "linux" or sys.maxsize <= 2**32 or sys.version_info[:2] != (3, 4)')
@pytest.mark.skipif('sys.platform != "linux" or sys.maxsize <= 2**32 or sys.version_info[:2] != (3, 8)')
def test_init_extension_module(Script, load_unsafe_extensions):
"""
``__init__`` extension modules are also packages and Jedi should understand
@@ -45,10 +45,10 @@ def test_init_extension_module(Script, load_unsafe_extensions):
This test was built by the module.c and setup.py combination you can find
in the init_extension_module folder. You can easily build the
`__init__.cpython-34m.so` by compiling it (create a virtualenv and run
`__init__.cpython-38m.so` by compiling it (create a virtualenv and run
`setup.py install`.
This is also why this test only runs on certain systems (and Python 3.4).
This is also why this test only runs on certain systems and Python 3.8.
"""
project = jedi.Project(get_example_dir(), load_unsafe_extensions=load_unsafe_extensions)

View File

@@ -45,7 +45,7 @@ def test_infer_and_goto(Script, code, full_name, has_stub, has_python, way,
kwargs, type_, options, environment):
if environment.version_info < (3, 5):
# We just don't care about much of the detailed Python 2 failures
# anymore, because its end-of-life soon. (same for 3.4)
# anymore, because its end-of-life soon.
pytest.skip()
if type_ == 'infer' and full_name == 'typing.Sequence' and environment.version_info >= (3, 7):