forked from VimPlug/jedi
Drop support for EOL Python 3.3 (#1019)
This commit is contained in:
@@ -8,7 +8,6 @@ python:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
- JEDI_TEST_ENVIRONMENT=27
|
- JEDI_TEST_ENVIRONMENT=27
|
||||||
- JEDI_TEST_ENVIRONMENT=33
|
|
||||||
- JEDI_TEST_ENVIRONMENT=34
|
- JEDI_TEST_ENVIRONMENT=34
|
||||||
- JEDI_TEST_ENVIRONMENT=35
|
- JEDI_TEST_ENVIRONMENT=35
|
||||||
- JEDI_TEST_ENVIRONMENT=36
|
- JEDI_TEST_ENVIRONMENT=36
|
||||||
@@ -39,7 +38,6 @@ before_install:
|
|||||||
- ./travis_install.sh
|
- ./travis_install.sh
|
||||||
# Need to add the path to the Python versions in the end. This might add
|
# Need to add the path to the Python versions in the end. This might add
|
||||||
# something twice, but it doesn't really matter, because they are appended.
|
# something twice, but it doesn't really matter, because they are appended.
|
||||||
- export PATH=$PATH:/opt/python/3.3/bin
|
|
||||||
- export PATH=$PATH:/opt/python/3.5/bin
|
- export PATH=$PATH:/opt/python/3.5/bin
|
||||||
# 3.6 was not installed manually, but already is on the system. However
|
# 3.6 was not installed manually, but already is on the system. However
|
||||||
# it's not on path (unless 3.6 is selected).
|
# it's not on path (unless 3.6 is selected).
|
||||||
|
|||||||
+2
-2
@@ -111,8 +111,8 @@ understands, see: `Features
|
|||||||
<https://jedi.readthedocs.org/en/latest/docs/features.html>`_. A list of
|
<https://jedi.readthedocs.org/en/latest/docs/features.html>`_. A list of
|
||||||
caveats can be found on the same page.
|
caveats can be found on the same page.
|
||||||
|
|
||||||
You can run Jedi on CPython 2.7 or 3.3+ but it should also
|
You can run Jedi on CPython 2.7 or 3.4+ but it should also
|
||||||
understand/parse code older than those versions. Additonally you should be able
|
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>`_
|
to use `Virtualenvs <https://jedi.readthedocs.org/en/latest/docs/api.html#environments>`_
|
||||||
very well.
|
very well.
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,6 @@ environment:
|
|||||||
- TOXENV: py27
|
- TOXENV: py27
|
||||||
PYTHON_PATH: C:\Python27
|
PYTHON_PATH: C:\Python27
|
||||||
JEDI_TEST_ENVIRONMENT: 27
|
JEDI_TEST_ENVIRONMENT: 27
|
||||||
- TOXENV: py27
|
|
||||||
PYTHON_PATH: C:\Python27
|
|
||||||
JEDI_TEST_ENVIRONMENT: 33
|
|
||||||
- TOXENV: py27
|
- TOXENV: py27
|
||||||
PYTHON_PATH: C:\Python27
|
PYTHON_PATH: C:\Python27
|
||||||
JEDI_TEST_ENVIRONMENT: 34
|
JEDI_TEST_ENVIRONMENT: 34
|
||||||
@@ -19,9 +16,6 @@ environment:
|
|||||||
- TOXENV: py34
|
- TOXENV: py34
|
||||||
PYTHON_PATH: C:\Python34
|
PYTHON_PATH: C:\Python34
|
||||||
JEDI_TEST_ENVIRONMENT: 27
|
JEDI_TEST_ENVIRONMENT: 27
|
||||||
- TOXENV: py34
|
|
||||||
PYTHON_PATH: C:\Python34
|
|
||||||
JEDI_TEST_ENVIRONMENT: 33
|
|
||||||
- TOXENV: py34
|
- TOXENV: py34
|
||||||
PYTHON_PATH: C:\Python34
|
PYTHON_PATH: C:\Python34
|
||||||
JEDI_TEST_ENVIRONMENT: 34
|
JEDI_TEST_ENVIRONMENT: 34
|
||||||
@@ -35,9 +29,6 @@ environment:
|
|||||||
- TOXENV: py35
|
- TOXENV: py35
|
||||||
PYTHON_PATH: C:\Python35
|
PYTHON_PATH: C:\Python35
|
||||||
JEDI_TEST_ENVIRONMENT: 27
|
JEDI_TEST_ENVIRONMENT: 27
|
||||||
- TOXENV: py35
|
|
||||||
PYTHON_PATH: C:\Python35
|
|
||||||
JEDI_TEST_ENVIRONMENT: 33
|
|
||||||
- TOXENV: py35
|
- TOXENV: py35
|
||||||
PYTHON_PATH: C:\Python35
|
PYTHON_PATH: C:\Python35
|
||||||
JEDI_TEST_ENVIRONMENT: 34
|
JEDI_TEST_ENVIRONMENT: 34
|
||||||
@@ -51,9 +42,6 @@ environment:
|
|||||||
- TOXENV: py36
|
- TOXENV: py36
|
||||||
PYTHON_PATH: C:\Python36
|
PYTHON_PATH: C:\Python36
|
||||||
JEDI_TEST_ENVIRONMENT: 27
|
JEDI_TEST_ENVIRONMENT: 27
|
||||||
- TOXENV: py36
|
|
||||||
PYTHON_PATH: C:\Python36
|
|
||||||
JEDI_TEST_ENVIRONMENT: 33
|
|
||||||
- TOXENV: py36
|
- TOXENV: py36
|
||||||
PYTHON_PATH: C:\Python36
|
PYTHON_PATH: C:\Python36
|
||||||
JEDI_TEST_ENVIRONMENT: 34
|
JEDI_TEST_ENVIRONMENT: 34
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ make it work.
|
|||||||
General Features
|
General Features
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
- Python 2.7 and 3.3+ support
|
- Python 2.7 and 3.4+ support
|
||||||
- Ignores syntax errors and wrong indentation
|
- Ignores syntax errors and wrong indentation
|
||||||
- Can deal with complex module / function / class structures
|
- Can deal with complex module / function / class structures
|
||||||
- Great Virtualenv support
|
- Great Virtualenv support
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ except ImportError:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
is_py3 = sys.version_info[0] >= 3
|
is_py3 = sys.version_info[0] >= 3
|
||||||
is_py33 = is_py3 and sys.version_info[1] >= 3
|
|
||||||
is_py34 = is_py3 and sys.version_info[1] >= 4
|
|
||||||
is_py35 = is_py3 and sys.version_info[1] >= 5
|
is_py35 = is_py3 and sys.version_info[1] >= 5
|
||||||
py_version = int(str(sys.version_info[0]) + str(sys.version_info[1]))
|
py_version = int(str(sys.version_info[0]) + str(sys.version_info[1]))
|
||||||
|
|
||||||
@@ -116,7 +114,7 @@ def find_module_py33(string, path=None, loader=None, full_name=None, is_global_s
|
|||||||
return module_file, module_path, is_package
|
return module_file, module_path, is_package
|
||||||
|
|
||||||
|
|
||||||
def find_module_pre_py33(string, path=None, full_name=None, is_global_search=True):
|
def find_module_pre_py34(string, path=None, full_name=None, is_global_search=True):
|
||||||
# This import is here, because in other places it will raise a
|
# This import is here, because in other places it will raise a
|
||||||
# DeprecationWarning.
|
# DeprecationWarning.
|
||||||
import imp
|
import imp
|
||||||
@@ -151,8 +149,7 @@ def find_module_pre_py33(string, path=None, full_name=None, is_global_search=Tru
|
|||||||
raise ImportError("No module named {}".format(string))
|
raise ImportError("No module named {}".format(string))
|
||||||
|
|
||||||
|
|
||||||
find_module = find_module_py33 if is_py33 else find_module_pre_py33
|
find_module = find_module_py34 if is_py3 else find_module_pre_py34
|
||||||
find_module = find_module_py34 if is_py34 else find_module
|
|
||||||
find_module.__doc__ = """
|
find_module.__doc__ = """
|
||||||
Provides information about a module.
|
Provides information about a module.
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from textwrap import dedent
|
|||||||
import operator as op
|
import operator as op
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
from jedi._compatibility import unicode, is_py3, is_py34, builtins, \
|
from jedi._compatibility import unicode, is_py3, builtins, \
|
||||||
py_version, force_unicode, print_to_stderr
|
py_version, force_unicode, print_to_stderr
|
||||||
from jedi.evaluate.compiled.getattr_static import getattr_static
|
from jedi.evaluate.compiled.getattr_static import getattr_static
|
||||||
|
|
||||||
@@ -31,10 +31,9 @@ NOT_CLASS_TYPES = (
|
|||||||
if is_py3:
|
if is_py3:
|
||||||
NOT_CLASS_TYPES += (
|
NOT_CLASS_TYPES += (
|
||||||
types.MappingProxyType,
|
types.MappingProxyType,
|
||||||
types.SimpleNamespace
|
types.SimpleNamespace,
|
||||||
|
types.DynamicClassAttribute,
|
||||||
)
|
)
|
||||||
if is_py34:
|
|
||||||
NOT_CLASS_TYPES += (types.DynamicClassAttribute,)
|
|
||||||
|
|
||||||
|
|
||||||
# Those types don't exist in typing.
|
# Those types don't exist in typing.
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ setup(name='jedi',
|
|||||||
keywords='python completion refactoring vim',
|
keywords='python completion refactoring vim',
|
||||||
long_description=readme,
|
long_description=readme,
|
||||||
packages=find_packages(exclude=['test', 'test.*']),
|
packages=find_packages(exclude=['test', 'test.*']),
|
||||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*',
|
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
|
||||||
install_requires=install_requires,
|
install_requires=install_requires,
|
||||||
extras_require={'dev': ['docopt']},
|
extras_require={'dev': ['docopt']},
|
||||||
package_data={'jedi': ['evaluate/compiled/fake/*.pym']},
|
package_data={'jedi': ['evaluate/compiled/fake/*.pym']},
|
||||||
@@ -43,7 +43,6 @@ setup(name='jedi',
|
|||||||
'Programming Language :: Python :: 2',
|
'Programming Language :: Python :: 2',
|
||||||
'Programming Language :: Python :: 2.7',
|
'Programming Language :: Python :: 2.7',
|
||||||
'Programming Language :: Python :: 3',
|
'Programming Language :: Python :: 3',
|
||||||
'Programming Language :: Python :: 3.3',
|
|
||||||
'Programming Language :: Python :: 3.4',
|
'Programming Language :: Python :: 3.4',
|
||||||
'Programming Language :: Python :: 3.5',
|
'Programming Language :: Python :: 3.5',
|
||||||
'Programming Language :: Python :: 3.6',
|
'Programming Language :: Python :: 3.6',
|
||||||
|
|||||||
@@ -437,7 +437,7 @@ def test_func():
|
|||||||
#? int()
|
#? int()
|
||||||
tuple({1})[0]
|
tuple({1})[0]
|
||||||
|
|
||||||
# python >= 3.3
|
# python >= 3.4
|
||||||
# -----------------
|
# -----------------
|
||||||
# PEP 3132 Extended Iterable Unpacking (star unpacking)
|
# PEP 3132 Extended Iterable Unpacking (star unpacking)
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ def x():
|
|||||||
# yield from
|
# yield from
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|
||||||
# python >= 3.3
|
# python >= 3.4
|
||||||
|
|
||||||
def yield_from():
|
def yield_from():
|
||||||
yield from iter([1])
|
yield from iter([1])
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
""" Pep-0484 type hinting """
|
""" Pep-0484 type hinting """
|
||||||
|
|
||||||
# python >= 3.2
|
# python >= 3.4
|
||||||
|
|
||||||
|
|
||||||
class A():
|
class A():
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ for key in x.keys():
|
|||||||
for value in x.values():
|
for value in x.values():
|
||||||
#? int()
|
#? int()
|
||||||
value
|
value
|
||||||
# python >= 3.2
|
# python >= 3.4
|
||||||
|
|
||||||
class TestDefaultDict(typing.DefaultDict[str, int]):
|
class TestDefaultDict(typing.DefaultDict[str, int]):
|
||||||
def setdud(self):
|
def setdud(self):
|
||||||
@@ -271,7 +271,7 @@ for key in x.keys():
|
|||||||
for value in x.values():
|
for value in x.values():
|
||||||
#? int()
|
#? int()
|
||||||
value
|
value
|
||||||
# python >= 3.2
|
# python >= 3.4
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import pytest
|
|||||||
|
|
||||||
from ..helpers import TestCase
|
from ..helpers import TestCase
|
||||||
from jedi import cache
|
from jedi import cache
|
||||||
from jedi._compatibility import is_py33
|
from jedi._compatibility import is_py3
|
||||||
|
|
||||||
|
|
||||||
def assert_signature(Script, source, expected_name, expected_index=0, line=None, column=None):
|
def assert_signature(Script, source, expected_name, expected_index=0, line=None, column=None):
|
||||||
@@ -247,7 +247,7 @@ def _params(Script, source, line=None, column=None):
|
|||||||
|
|
||||||
|
|
||||||
def test_param_name(Script):
|
def test_param_name(Script):
|
||||||
if not is_py33:
|
if not is_py3:
|
||||||
p = _params(Script, '''int(''')
|
p = _params(Script, '''int(''')
|
||||||
# int is defined as: `int(x[, base])`
|
# int is defined as: `int(x[, base])`
|
||||||
assert p[0].name == 'x'
|
assert p[0].name == 'x'
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = py27, py33, py34, py35, py36
|
envlist = py27, py34, py35, py36
|
||||||
[testenv]
|
[testenv]
|
||||||
deps =
|
deps =
|
||||||
pytest>=2.3.5, < 3.3
|
pytest>=2.3.5
|
||||||
pytest-cache
|
pytest-cache
|
||||||
# docopt for sith doctests
|
# docopt for sith doctests
|
||||||
docopt
|
docopt
|
||||||
@@ -19,7 +19,6 @@ setenv =
|
|||||||
# To test Jedi in different versions than the same Python version, set a
|
# To test Jedi in different versions than the same Python version, set a
|
||||||
# different test environment.
|
# different test environment.
|
||||||
env27: JEDI_TEST_ENVIRONMENT=27
|
env27: JEDI_TEST_ENVIRONMENT=27
|
||||||
env33: JEDI_TEST_ENVIRONMENT=33
|
|
||||||
env34: JEDI_TEST_ENVIRONMENT=34
|
env34: JEDI_TEST_ENVIRONMENT=34
|
||||||
env35: JEDI_TEST_ENVIRONMENT=35
|
env35: JEDI_TEST_ENVIRONMENT=35
|
||||||
env36: JEDI_TEST_ENVIRONMENT=36
|
env36: JEDI_TEST_ENVIRONMENT=36
|
||||||
@@ -33,10 +32,6 @@ deps =
|
|||||||
# numpydoc for typing scipy stack
|
# numpydoc for typing scipy stack
|
||||||
numpydoc
|
numpydoc
|
||||||
{[testenv]deps}
|
{[testenv]deps}
|
||||||
[testenv:py33]
|
|
||||||
deps =
|
|
||||||
typing
|
|
||||||
{[testenv]deps}
|
|
||||||
[testenv:py34]
|
[testenv:py34]
|
||||||
deps =
|
deps =
|
||||||
typing
|
typing
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ set -e
|
|||||||
sudo chown root: /opt/python/3.6/bin/python
|
sudo chown root: /opt/python/3.6/bin/python
|
||||||
sudo chown root: /opt/python/3.6.3/bin/python
|
sudo chown root: /opt/python/3.6.3/bin/python
|
||||||
|
|
||||||
if [[ $JEDI_TEST_ENVIRONMENT == "33" ]]; then
|
|
||||||
VERSION=3.3
|
|
||||||
DOWNLOAD=1
|
|
||||||
fi
|
|
||||||
if [[ $JEDI_TEST_ENVIRONMENT == "35" ]]; then
|
if [[ $JEDI_TEST_ENVIRONMENT == "35" ]]; then
|
||||||
VERSION=3.5
|
VERSION=3.5
|
||||||
DOWNLOAD=1
|
DOWNLOAD=1
|
||||||
|
|||||||
Reference in New Issue
Block a user