mirror of
https://github.com/davidhalter/jedi.git
synced 2026-04-28 00:15:29 +08:00
Remove Python 3.9 and 3.10
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
# For assignment expressions / named expressions / walrus operators / whatever
|
||||
# they are called.
|
||||
|
||||
# python >= 3.8
|
||||
b = (a:=1, a)
|
||||
|
||||
#? int()
|
||||
|
||||
@@ -476,8 +476,6 @@ dynamic_annotation('')
|
||||
# TypeDict
|
||||
# -------------------------
|
||||
|
||||
# python >= 3.8
|
||||
|
||||
class Foo(typing.TypedDict):
|
||||
foo: str
|
||||
bar: typing.List[float]
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# python >= 3.9
|
||||
|
||||
from typing import Annotated
|
||||
|
||||
# This is just a dummy and very meaningless thing to use with to the Annotated
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# python >= 3.8
|
||||
|
||||
def positional_only_call(a, /, b):
|
||||
#? str()
|
||||
a
|
||||
|
||||
@@ -459,8 +459,6 @@ X().just_partial('')[0]
|
||||
#? str()
|
||||
X().just_partial('')[1]
|
||||
|
||||
# python >= 3.8
|
||||
|
||||
@functools.lru_cache
|
||||
def x() -> int: ...
|
||||
@functools.lru_cache()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import sys
|
||||
sys.path[0:0] = [
|
||||
'/usr/lib/python3.8/site-packages',
|
||||
'/usr/lib/python3.14/site-packages',
|
||||
'/tmp/.buildout/eggs/important_package.egg'
|
||||
]
|
||||
|
||||
|
||||
+1
-1
@@ -448,7 +448,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 3.9, 3.8, etc.
|
||||
--env <dotted> A Python version, like 3.14, 3.13, etc.
|
||||
"""
|
||||
if __name__ == '__main__':
|
||||
import docopt
|
||||
|
||||
@@ -523,7 +523,7 @@ def test_added_equals_to_params(Script):
|
||||
|
||||
def test_builtin_module_with_path(Script):
|
||||
"""
|
||||
This test simply tests if a module from /usr/lib/python3.8/lib-dynload/ has
|
||||
This test simply tests if a module from /usr/lib/python3.14/lib-dynload/ has
|
||||
a path or not. It shouldn't have a module_path, because that is just
|
||||
confusing.
|
||||
"""
|
||||
|
||||
@@ -26,7 +26,7 @@ def test_find_system_environments():
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'version',
|
||||
['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
|
||||
['3.10', '3.11', '3.12', '3.13']
|
||||
)
|
||||
def test_versions(version):
|
||||
try:
|
||||
|
||||
@@ -54,6 +54,7 @@ def test_rename_mod(Script, dir_with_content):
|
||||
''').format(dir=dir_with_content)
|
||||
|
||||
|
||||
# TODO does this test still make sense?
|
||||
@pytest.mark.skipif('sys.version_info[:2] < (3, 8)', reason="Python 3.8 introduces dirs_exist_ok")
|
||||
def test_namespace_package(Script, tmpdir):
|
||||
origin = get_example_dir('implicit_namespace_package')
|
||||
|
||||
@@ -67,7 +67,7 @@ def test_path_from_sys_path_assignment(Script):
|
||||
|
||||
import sys
|
||||
sys.path[0:0] = [
|
||||
{os.path.abspath('/usr/lib/python3.8/site-packages')!r},
|
||||
{os.path.abspath('/usr/lib/python3.14/site-packages')!r},
|
||||
{os.path.abspath('/home/test/.buildout/eggs/important_package.egg')!r},
|
||||
]
|
||||
|
||||
|
||||
@@ -31,7 +31,9 @@ def test_get_signatures_stdlib(Script):
|
||||
assert len(sigs[0].params) == 1
|
||||
|
||||
|
||||
# Check only on linux 64 bit platform and Python3.8.
|
||||
# TODO This is currently only checked on linux 64 bit platform and Python3.8,
|
||||
# which we don't support anymore, this test should be rewritten (or the
|
||||
# extension recreated).
|
||||
@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, 8)',
|
||||
@@ -48,7 +50,8 @@ def test_init_extension_module(Script, load_unsafe_extensions):
|
||||
`__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.8.
|
||||
This is also why this test only runs on certain systems and a specific
|
||||
Python version.
|
||||
"""
|
||||
|
||||
project = jedi.Project(get_example_dir(), load_unsafe_extensions=load_unsafe_extensions)
|
||||
|
||||
@@ -406,7 +406,7 @@ def test_wraps_signature(Script, code, signature):
|
||||
],
|
||||
)
|
||||
def test_dataclass_signature(
|
||||
Script, skip_pre_python37, start, start_params, include_params, environment
|
||||
Script, start, start_params, include_params, environment
|
||||
):
|
||||
if environment.version_info < (3, 8):
|
||||
# Final is not yet supported
|
||||
@@ -725,7 +725,7 @@ ids = [
|
||||
'start, start_params, include_params', dataclass_transform_cases, ids=ids
|
||||
)
|
||||
def test_extensions_dataclass_transform_signature(
|
||||
Script, skip_pre_python37, start, start_params, include_params, environment
|
||||
Script, start, start_params, include_params, environment
|
||||
):
|
||||
has_typing_ext = bool(Script('import typing_extensions').infer())
|
||||
if not has_typing_ext:
|
||||
@@ -846,7 +846,7 @@ def test_dataclass_transform_signature(
|
||||
],
|
||||
ids=["define", "frozen", "define_customized", "define_subclass", "define_both"]
|
||||
)
|
||||
def test_attrs_signature(Script, skip_pre_python37, start, start_params):
|
||||
def test_attrs_signature(Script, start, start_params):
|
||||
has_attrs = bool(Script('import attrs').infer())
|
||||
if not has_attrs:
|
||||
raise pytest.skip("attrs needed in target environment to run this test")
|
||||
|
||||
@@ -67,7 +67,7 @@ def test_hex_values_in_docstring():
|
||||
('lambda x, y, z: x + y * z\n', '<lambda>(x, y, z)')
|
||||
])
|
||||
def test_get_signature(code, signature):
|
||||
node = parse(code, version='3.8').children[0]
|
||||
node = parse(code, version='3.14').children[0]
|
||||
if node.type == 'simple_stmt':
|
||||
node = node.children[0]
|
||||
assert parser_utils.get_signature(node) == signature
|
||||
|
||||
Reference in New Issue
Block a user