diff --git a/README.rst b/README.rst index 62f976aa..7b559abe 100644 --- a/README.rst +++ b/README.rst @@ -102,7 +102,7 @@ Features and Limitations Jedi's features are listed here: `Features `_. -You can run Jedi on Python 3.8+ but it should also +You can run Jedi on Python 3.10+ but it should also understand code that is older than those versions. Additionally you should be able to use `Virtualenvs `_ very well. @@ -183,10 +183,10 @@ The test suite uses ``pytest``:: pip install pytest -If you want to test only a specific Python version (e.g. Python 3.8), it is as +If you want to test only a specific Python version (e.g. Python 3.14), it is as easy as:: - python3.8 -m pytest + python3.14 -m pytest For more detailed information visit the `testing documentation `_. diff --git a/conftest.py b/conftest.py index d7c96845..38465076 100644 --- a/conftest.py +++ b/conftest.py @@ -42,7 +42,7 @@ def pytest_addoption(parser): help="Warnings are treated as errors.") parser.addoption("--env", action='store', - help="Execute the tests in that environment (e.g. 39 for python3.9).") + help="Execute the tests in that environment (e.g. 314 for python3.14).") parser.addoption("--interpreter-env", "-I", action='store_true', help="Don't use subprocesses to guarantee having safe " "code execution. Useful for debugging.") @@ -164,19 +164,3 @@ def skip_pre_python311(environment): # This if is just needed to avoid that tests ever skip way more than # they should for all Python versions. pytest.skip() - - -@pytest.fixture() -def skip_pre_python38(environment): - if environment.version_info < (3, 8): - # This if is just needed to avoid that tests ever skip way more than - # they should for all Python versions. - pytest.skip() - - -@pytest.fixture() -def skip_pre_python37(environment): - if environment.version_info < (3, 7): - # This if is just needed to avoid that tests ever skip way more than - # they should for all Python versions. - pytest.skip() diff --git a/docs/docs/api.rst b/docs/docs/api.rst index 8eac9bd6..f85b3b8a 100644 --- a/docs/docs/api.rst +++ b/docs/docs/api.rst @@ -107,7 +107,7 @@ Completions >>> code = '''import json; json.l''' >>> script = jedi.Script(code, path='example.py') >>> script - > + > >>> completions = script.complete(1, 19) >>> completions [, ] diff --git a/docs/docs/features.rst b/docs/docs/features.rst index 72c3bc8a..9540a758 100644 --- a/docs/docs/features.rst +++ b/docs/docs/features.rst @@ -16,7 +16,7 @@ Jedi's main API calls and features are: Basic Features -------------- -- Python 3.8+ support +- Python 3.10+ support - Ignores syntax errors and wrong indentation - Can deal with complex module / function / class structures - Great ``virtualenv``/``venv`` support diff --git a/docs/docs/testing.rst b/docs/docs/testing.rst index 223cc292..458ae9ac 100644 --- a/docs/docs/testing.rst +++ b/docs/docs/testing.rst @@ -7,10 +7,10 @@ The test suite depends on ``pytest``:: pip install pytest -If you want to test only a specific Python version (e.g. Python 3.8), it is as +If you want to test only a specific Python version (e.g. Python 3.14), it is as easy as:: - python3.8 -m pytest + python3.14 -m pytest Tests are also run automatically on `GitHub Actions `_. diff --git a/jedi/api/classes.py b/jedi/api/classes.py index 94988260..1fe89944 100644 --- a/jedi/api/classes.py +++ b/jedi/api/classes.py @@ -96,7 +96,7 @@ class BaseName: @property def module_path(self) -> Optional[Path]: """ - Shows the file path of a module. e.g. ``/usr/lib/python3.9/os.py`` + Shows the file path of a module. e.g. ``/usr/lib/python3.14/os.py`` """ module = self._get_module_context() if module.is_stub() or not module.is_compiled(): diff --git a/jedi/api/environment.py b/jedi/api/environment.py index f9f78b08..f03bdc12 100644 --- a/jedi/api/environment.py +++ b/jedi/api/environment.py @@ -22,7 +22,7 @@ if TYPE_CHECKING: _VersionInfo = namedtuple('VersionInfo', 'major minor micro') # type: ignore[name-match] -_SUPPORTED_PYTHONS = ['3.13', '3.12', '3.11', '3.10', '3.9', '3.8'] +_SUPPORTED_PYTHONS = ['3.13', '3.12', '3.11', '3.10'] _SAFE_PATHS = ['/usr/bin', '/usr/local/bin'] _CONDA_VAR = 'CONDA_PREFIX' _CURRENT_VERSION = '%s.%s' % (sys.version_info.major, sys.version_info.minor) diff --git a/jedi/api/replstartup.py b/jedi/api/replstartup.py index e0f23d19..ce57ce0c 100644 --- a/jedi/api/replstartup.py +++ b/jedi/api/replstartup.py @@ -9,7 +9,7 @@ just use IPython instead:: Then you will be able to use Jedi completer in your Python interpreter:: $ python - Python 3.9.2+ (default, Jul 20 2020, 22:15:08) + Python 3.14.0+ (default, Jul 20 2020, 22:15:08) [GCC 4.6.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os diff --git a/jedi/inference/helpers.py b/jedi/inference/helpers.py index b7dbf4c2..bcca751f 100644 --- a/jedi/inference/helpers.py +++ b/jedi/inference/helpers.py @@ -10,7 +10,7 @@ from parso import tree def is_stdlib_path(path): # Python standard library paths look like this: - # /usr/lib/python3.9/... + # /usr/lib/python3.14/... # TODO The implementation below is probably incorrect and not complete. parts = path.parts if 'dist-packages' in parts or 'site-packages' in parts: diff --git a/setup.py b/setup.py index e189d171..1857ffed 100755 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ setup(name='jedi', keywords='python completion refactoring vim', long_description=readme, packages=find_packages(exclude=['test', 'test.*']), - python_requires='>=3.8', + python_requires='>=3.10', # Python 3.13 grammars are added to parso in 0.8.4 install_requires=['parso>=0.8.6,<0.9.0'], extras_require={ @@ -93,8 +93,6 @@ setup(name='jedi', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', diff --git a/test/completion/named_expression.py b/test/completion/named_expression.py index 11293b68..87b88856 100644 --- a/test/completion/named_expression.py +++ b/test/completion/named_expression.py @@ -1,7 +1,6 @@ # For assignment expressions / named expressions / walrus operators / whatever # they are called. -# python >= 3.8 b = (a:=1, a) #? int() diff --git a/test/completion/pep0484_typing.py b/test/completion/pep0484_typing.py index 1a0fabea..1eaadbc7 100644 --- a/test/completion/pep0484_typing.py +++ b/test/completion/pep0484_typing.py @@ -476,8 +476,6 @@ dynamic_annotation('') # TypeDict # ------------------------- -# python >= 3.8 - class Foo(typing.TypedDict): foo: str bar: typing.List[float] diff --git a/test/completion/pep0593_annotations.py b/test/completion/pep0593_annotations.py index 8da12928..92013625 100644 --- a/test/completion/pep0593_annotations.py +++ b/test/completion/pep0593_annotations.py @@ -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 diff --git a/test/completion/positional_only_params.py b/test/completion/positional_only_params.py index 3c1108d9..6280498d 100644 --- a/test/completion/positional_only_params.py +++ b/test/completion/positional_only_params.py @@ -1,5 +1,3 @@ -# python >= 3.8 - def positional_only_call(a, /, b): #? str() a diff --git a/test/completion/stdlib.py b/test/completion/stdlib.py index 94eb5328..1686fa2c 100644 --- a/test/completion/stdlib.py +++ b/test/completion/stdlib.py @@ -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() diff --git a/test/examples/buildout_project/bin/app b/test/examples/buildout_project/bin/app index e8df4eb6..001c553d 100644 --- a/test/examples/buildout_project/bin/app +++ b/test/examples/buildout_project/bin/app @@ -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' ] diff --git a/test/run.py b/test/run.py index 7d0d4821..86ca19ca 100755 --- a/test/run.py +++ b/test/run.py @@ -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 A Python version, like 3.9, 3.8, etc. + --env A Python version, like 3.14, 3.13, etc. """ if __name__ == '__main__': import docopt diff --git a/test/test_api/test_classes.py b/test/test_api/test_classes.py index 0c3dac5a..01b7cf2d 100644 --- a/test/test_api/test_classes.py +++ b/test/test_api/test_classes.py @@ -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. """ diff --git a/test/test_api/test_environment.py b/test/test_api/test_environment.py index 87da7e2b..8deb9500 100644 --- a/test/test_api/test_environment.py +++ b/test/test_api/test_environment.py @@ -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: diff --git a/test/test_api/test_refactoring.py b/test/test_api/test_refactoring.py index a0dd95ff..ae7b5b31 100644 --- a/test/test_api/test_refactoring.py +++ b/test/test_api/test_refactoring.py @@ -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') diff --git a/test/test_inference/test_buildout_detection.py b/test/test_inference/test_buildout_detection.py index 01d56a78..3a988508 100644 --- a/test/test_inference/test_buildout_detection.py +++ b/test/test_inference/test_buildout_detection.py @@ -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}, ] diff --git a/test/test_inference/test_extension.py b/test/test_inference/test_extension.py index 8c9015b5..d7a0c136 100644 --- a/test/test_inference/test_extension.py +++ b/test/test_inference/test_extension.py @@ -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) diff --git a/test/test_inference/test_signature.py b/test/test_inference/test_signature.py index a09626fd..edac7f26 100644 --- a/test/test_inference/test_signature.py +++ b/test/test_inference/test_signature.py @@ -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") diff --git a/test/test_parso_integration/test_parser_utils.py b/test/test_parso_integration/test_parser_utils.py index d29bf751..47546a9e 100644 --- a/test/test_parso_integration/test_parser_utils.py +++ b/test/test_parso_integration/test_parser_utils.py @@ -67,7 +67,7 @@ def test_hex_values_in_docstring(): ('lambda x, y, z: x + y * z\n', '(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