forked from VimPlug/jedi
Remove Python 3.4 support
This commit is contained in:
10
.travis.yml
10
.travis.yml
@@ -2,7 +2,6 @@ dist: xenial
|
||||
language: python
|
||||
python:
|
||||
- 2.7
|
||||
- 3.4
|
||||
- 3.5
|
||||
- 3.6
|
||||
- 3.7
|
||||
@@ -10,7 +9,6 @@ python:
|
||||
|
||||
env:
|
||||
- JEDI_TEST_ENVIRONMENT=27
|
||||
- JEDI_TEST_ENVIRONMENT=34
|
||||
- JEDI_TEST_ENVIRONMENT=35
|
||||
- JEDI_TEST_ENVIRONMENT=36
|
||||
- JEDI_TEST_ENVIRONMENT=37
|
||||
@@ -41,13 +39,7 @@ script:
|
||||
if [ "$TRAVIS_PYTHON_VERSION" != "$test_env_version" ] && [ "$JEDI_TEST_ENVIRONMENT" != "interpreter" ]; then
|
||||
python_bin=python$test_env_version
|
||||
python_path="$(which $python_bin || true)"
|
||||
if [ -z "$python_path" ]; then
|
||||
# Only required for JEDI_TEST_ENVIRONMENT=34.
|
||||
download_name=python-$test_env_version
|
||||
wget https://s3.amazonaws.com/travis-python-archives/binaries/ubuntu/16.04/x86_64/$download_name.tar.bz2
|
||||
sudo tar xjf $download_name.tar.bz2 --directory / opt/python
|
||||
ln -s "/opt/python/${test_env_version}/bin/python" /home/travis/bin/$python_bin
|
||||
elif [ "${python_path#/opt/pyenv/shims}" != "$python_path" ]; then
|
||||
if [ "${python_path#/opt/pyenv/shims}" != "$python_path" ]; then
|
||||
# Activate pyenv version (required with JEDI_TEST_ENVIRONMENT=36).
|
||||
pyenv_bin="$(pyenv whence --path "$python_bin" | head -n1)"
|
||||
ln -s "$pyenv_bin" /home/travis/bin/$python_bin
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
Changelog
|
||||
---------
|
||||
|
||||
0.16.1 (2020--)
|
||||
0.17.0 (2020--)
|
||||
+++++++++++++++++++
|
||||
|
||||
- Removed Python 3.4 support
|
||||
|
||||
0.16.0 (2020-01-26)
|
||||
+++++++++++++++++++
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ understands, see: `Features
|
||||
<https://jedi.readthedocs.org/en/latest/docs/features.html>`_. A list of
|
||||
caveats can be found on the same page.
|
||||
|
||||
You can run Jedi on CPython 2.7 or 3.4+ but it should also
|
||||
You can run Jedi on CPython 2.7 or 3.5+ but it should also
|
||||
understand/parse code older than those versions. Additionally you should be able
|
||||
to use `Virtualenvs <https://jedi.readthedocs.org/en/latest/docs/api.html#environments>`_
|
||||
very well.
|
||||
|
||||
12
appveyor.yml
12
appveyor.yml
@@ -3,9 +3,6 @@ environment:
|
||||
- TOXENV: py27
|
||||
PYTHON_PATH: C:\Python27
|
||||
JEDI_TEST_ENVIRONMENT: 27
|
||||
- TOXENV: py27
|
||||
PYTHON_PATH: C:\Python27
|
||||
JEDI_TEST_ENVIRONMENT: 34
|
||||
- TOXENV: py27
|
||||
PYTHON_PATH: C:\Python27
|
||||
JEDI_TEST_ENVIRONMENT: 35
|
||||
@@ -19,9 +16,6 @@ environment:
|
||||
- TOXENV: py35
|
||||
PYTHON_PATH: C:\Python35
|
||||
JEDI_TEST_ENVIRONMENT: 27
|
||||
- TOXENV: py35
|
||||
PYTHON_PATH: C:\Python35
|
||||
JEDI_TEST_ENVIRONMENT: 34
|
||||
- TOXENV: py35
|
||||
PYTHON_PATH: C:\Python35
|
||||
JEDI_TEST_ENVIRONMENT: 35
|
||||
@@ -35,9 +29,6 @@ environment:
|
||||
- TOXENV: py36
|
||||
PYTHON_PATH: C:\Python36
|
||||
JEDI_TEST_ENVIRONMENT: 27
|
||||
- TOXENV: py36
|
||||
PYTHON_PATH: C:\Python36
|
||||
JEDI_TEST_ENVIRONMENT: 34
|
||||
- TOXENV: py36
|
||||
PYTHON_PATH: C:\Python36
|
||||
JEDI_TEST_ENVIRONMENT: 35
|
||||
@@ -51,9 +42,6 @@ environment:
|
||||
- TOXENV: py37
|
||||
PYTHON_PATH: C:\Python37
|
||||
JEDI_TEST_ENVIRONMENT: 27
|
||||
- TOXENV: py37
|
||||
PYTHON_PATH: C:\Python37
|
||||
JEDI_TEST_ENVIRONMENT: 34
|
||||
- TOXENV: py37
|
||||
PYTHON_PATH: C:\Python37
|
||||
JEDI_TEST_ENVIRONMENT: 35
|
||||
|
||||
@@ -17,7 +17,7 @@ make it work.
|
||||
General Features
|
||||
----------------
|
||||
|
||||
- Python 2.7 and 3.4+ support
|
||||
- Python 2.7 and 3.5+ support
|
||||
- Ignores syntax errors and wrong indentation
|
||||
- Can deal with complex module / function / class structures
|
||||
- Great Virtualenv support
|
||||
|
||||
@@ -275,7 +275,7 @@ def _iter_modules(paths, prefix=''):
|
||||
# END COPY
|
||||
|
||||
|
||||
iter_modules = _iter_modules if py_version >= 34 else pkgutil.iter_modules
|
||||
iter_modules = _iter_modules if py_version >= 35 else pkgutil.iter_modules
|
||||
|
||||
|
||||
class ImplicitNSInfo(object):
|
||||
|
||||
@@ -815,7 +815,7 @@ class ParamDefinition(Definition):
|
||||
Returns an enum instance. Returns the same values as the builtin
|
||||
:py:attr:`inspect.Parameter.kind`.
|
||||
|
||||
No support for Python < 3.4 anymore.
|
||||
No support for Python < 3.5 anymore.
|
||||
"""
|
||||
if sys.version_info < (3, 5):
|
||||
raise NotImplementedError(
|
||||
|
||||
@@ -17,7 +17,7 @@ import parso
|
||||
|
||||
_VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
|
||||
_SUPPORTED_PYTHONS = ['3.8', '3.7', '3.6', '3.5', '3.4', '2.7']
|
||||
_SUPPORTED_PYTHONS = ['3.8', '3.7', '3.6', '3.5', '2.7']
|
||||
_SAFE_PATHS = ['/usr/bin', '/usr/local/bin']
|
||||
_CONDA_VAR = 'CONDA_PREFIX'
|
||||
_CURRENT_VERSION = '%s.%s' % (sys.version_info.major, sys.version_info.minor)
|
||||
|
||||
@@ -502,22 +502,6 @@ class DirectObjectAccess(object):
|
||||
obj = self._obj
|
||||
if py_version < 33:
|
||||
raise ValueError("inspect.signature was introduced in 3.3")
|
||||
if py_version == 34:
|
||||
# In 3.4 inspect.signature are wrong for str and int. This has
|
||||
# been fixed in 3.5. The signature of object is returned,
|
||||
# because no signature was found for str. Here we imitate 3.5
|
||||
# logic and just ignore the signature if the magic methods
|
||||
# don't match object.
|
||||
# 3.3 doesn't even have the logic and returns nothing for str
|
||||
# and classes that inherit from object.
|
||||
user_def = inspect._signature_get_user_defined_method
|
||||
if (inspect.isclass(obj)
|
||||
and not user_def(type(obj), '__init__')
|
||||
and not user_def(type(obj), '__new__')
|
||||
and (obj.__init__ != object.__init__
|
||||
or obj.__new__ != object.__new__)):
|
||||
raise ValueError
|
||||
|
||||
try:
|
||||
return inspect.signature(obj)
|
||||
except (RuntimeError, TypeError):
|
||||
|
||||
@@ -32,7 +32,7 @@ def _iter_nodes_for_param(param_name):
|
||||
argument = name.parent
|
||||
if argument.type == 'argument' \
|
||||
and argument.children[0] == '*' * param_name.star_count:
|
||||
# No support for Python <= 3.4 here, but they are end-of-life
|
||||
# No support for Python 2.7 here, but they are end-of-life
|
||||
# anyway
|
||||
trailer = search_ancestor(argument, 'trailer')
|
||||
if trailer is not None: # Make sure we're in a function
|
||||
|
||||
@@ -107,7 +107,7 @@ class PushBackIterator(object):
|
||||
def ignored(*exceptions):
|
||||
"""
|
||||
Value manager that ignores all of the specified exceptions. This will
|
||||
be in the standard library starting with Python 3.4.
|
||||
be in the standard library starting with Python 3.5.
|
||||
"""
|
||||
try:
|
||||
yield
|
||||
|
||||
7
setup.py
7
setup.py
@@ -33,16 +33,16 @@ setup(name='jedi',
|
||||
keywords='python completion refactoring vim',
|
||||
long_description=readme,
|
||||
packages=find_packages(exclude=['test', 'test.*']),
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
|
||||
install_requires=install_requires,
|
||||
extras_require={
|
||||
'testing': [
|
||||
# Pytest 5 doesn't support Python 2 and Python 3.4 anymore.
|
||||
# Pytest 5 doesn't support Python 2 anymore.
|
||||
'pytest>=3.9.0,<5.0.0',
|
||||
# docopt for sith doctests
|
||||
'docopt',
|
||||
# coloroma for colored debug output
|
||||
'colorama==0.4.1', # Pinned so it works for Python 3.4
|
||||
'colorama',
|
||||
],
|
||||
'qa': [
|
||||
'flake8==3.7.9',
|
||||
@@ -60,7 +60,6 @@ setup(name='jedi',
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.4',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
|
||||
@@ -473,7 +473,7 @@ def test_func():
|
||||
#? int()
|
||||
tuple({1})[0]
|
||||
|
||||
# python >= 3.4
|
||||
# python > 2.7
|
||||
# -----------------
|
||||
# PEP 3132 Extended Iterable Unpacking (star unpacking)
|
||||
# -----------------
|
||||
|
||||
@@ -242,7 +242,7 @@ def x():
|
||||
# yield from
|
||||
# -----------------
|
||||
|
||||
# python >= 3.4
|
||||
# python > 2.7
|
||||
|
||||
def yield_from():
|
||||
yield from iter([1])
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
""" Pep-0484 type hinting """
|
||||
|
||||
# python >= 3.4
|
||||
# python > 2.7
|
||||
|
||||
|
||||
class A():
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
"""
|
||||
|
||||
@@ -130,7 +130,7 @@ def test_p(monkeypatch):
|
||||
#? ['setattr']
|
||||
monkeypatch.setatt
|
||||
|
||||
# python > 3.4
|
||||
# python > 2.7
|
||||
|
||||
#? ['capsysbinary']
|
||||
def test_p(capsysbin
|
||||
|
||||
@@ -359,7 +359,7 @@ class Test(metaclass=Meta):
|
||||
# Enum
|
||||
# -----------------
|
||||
|
||||
# python >= 3.4
|
||||
# python > 2.7
|
||||
import enum
|
||||
|
||||
class X(enum.Enum):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# python >= 3.4
|
||||
# python > 2.7
|
||||
from stub_folder import with_stub, stub_only, with_stub_folder, stub_only_folder
|
||||
|
||||
# -------------------------
|
||||
|
||||
@@ -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'
|
||||
]
|
||||
|
||||
|
||||
Binary file not shown.
BIN
test/examples/init_extension_module/__init__.cpython-38-x86_64-linux-gnu.so
Executable file
BIN
test/examples/init_extension_module/__init__.cpython-38-x86_64-linux-gnu.so
Executable file
Binary file not shown.
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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'
|
||||
]
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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):
|
||||
|
||||
2
tox.ini
2
tox.ini
@@ -5,7 +5,6 @@ extras = testing
|
||||
deps =
|
||||
# for testing the typing module
|
||||
py27: typing
|
||||
py34: typing
|
||||
# numpydoc for typing scipy stack
|
||||
numpydoc
|
||||
# sphinx, a dependency of numpydoc, dropped Python 2 support in version 2.0
|
||||
@@ -23,7 +22,6 @@ setenv =
|
||||
# To test Jedi in different versions than the same Python version, set a
|
||||
# different test environment.
|
||||
env27: JEDI_TEST_ENVIRONMENT=27
|
||||
env34: JEDI_TEST_ENVIRONMENT=34
|
||||
env35: JEDI_TEST_ENVIRONMENT=35
|
||||
env36: JEDI_TEST_ENVIRONMENT=36
|
||||
env37: JEDI_TEST_ENVIRONMENT=37
|
||||
|
||||
Reference in New Issue
Block a user