Skip to content

Commit

Permalink
Merge 58da7c3 into 6748faa
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed May 19, 2018
2 parents 6748faa + 58da7c3 commit 71f815d
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 68 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Expand Up @@ -2,14 +2,12 @@ language: python
sudo: true
python:
- 2.7
- 3.3
- 3.4
- 3.5
- 3.6

env:
- JEDI_TEST_ENVIRONMENT=27
- JEDI_TEST_ENVIRONMENT=33
- JEDI_TEST_ENVIRONMENT=34
- JEDI_TEST_ENVIRONMENT=35
- JEDI_TEST_ENVIRONMENT=36
Expand Down Expand Up @@ -40,7 +38,6 @@ before_install:
- ./travis_install.sh
# 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.
- export PATH=$PATH:/opt/python/3.3/bin
- export PATH=$PATH:/opt/python/3.5/bin
# 3.6 was not installed manually, but already is on the system. However
# it's not on path (unless 3.6 is selected).
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Expand Up @@ -111,8 +111,8 @@ 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.3+ but it should also
understand/parse code older than those versions. Additonally you should be able
You can run Jedi on CPython 2.7 or 3.4+ 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.

Expand Down
28 changes: 0 additions & 28 deletions appveyor.yml
Expand Up @@ -3,9 +3,6 @@ environment:
- TOXENV: py27
PYTHON_PATH: C:\Python27
JEDI_TEST_ENVIRONMENT: 27
- TOXENV: py27
PYTHON_PATH: C:\Python27
JEDI_TEST_ENVIRONMENT: 33
- TOXENV: py27
PYTHON_PATH: C:\Python27
JEDI_TEST_ENVIRONMENT: 34
Expand All @@ -16,28 +13,9 @@ environment:
PYTHON_PATH: C:\Python27
JEDI_TEST_ENVIRONMENT: 36

- TOXENV: py33
PYTHON_PATH: C:\Python33
JEDI_TEST_ENVIRONMENT: 27
- TOXENV: py33
PYTHON_PATH: C:\Python33
JEDI_TEST_ENVIRONMENT: 33
- TOXENV: py33
PYTHON_PATH: C:\Python33
JEDI_TEST_ENVIRONMENT: 34
- TOXENV: py33
PYTHON_PATH: C:\Python33
JEDI_TEST_ENVIRONMENT: 35
- TOXENV: py33
PYTHON_PATH: C:\Python33
JEDI_TEST_ENVIRONMENT: 36

- TOXENV: py34
PYTHON_PATH: C:\Python34
JEDI_TEST_ENVIRONMENT: 27
- TOXENV: py34
PYTHON_PATH: C:\Python34
JEDI_TEST_ENVIRONMENT: 33
- TOXENV: py34
PYTHON_PATH: C:\Python34
JEDI_TEST_ENVIRONMENT: 34
Expand All @@ -51,9 +29,6 @@ environment:
- TOXENV: py35
PYTHON_PATH: C:\Python35
JEDI_TEST_ENVIRONMENT: 27
- TOXENV: py35
PYTHON_PATH: C:\Python35
JEDI_TEST_ENVIRONMENT: 33
- TOXENV: py35
PYTHON_PATH: C:\Python35
JEDI_TEST_ENVIRONMENT: 34
Expand All @@ -67,9 +42,6 @@ environment:
- TOXENV: py36
PYTHON_PATH: C:\Python36
JEDI_TEST_ENVIRONMENT: 27
- TOXENV: py36
PYTHON_PATH: C:\Python36
JEDI_TEST_ENVIRONMENT: 33
- TOXENV: py36
PYTHON_PATH: C:\Python36
JEDI_TEST_ENVIRONMENT: 34
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/features.rst
Expand Up @@ -20,7 +20,7 @@ make it work.
General Features
----------------

- Python 2.7 and 3.3+ support
- Python 2.7 and 3.4+ support
- Ignores syntax errors and wrong indentation
- Can deal with complex module / function / class structures
- Great Virtualenv support
Expand Down
7 changes: 2 additions & 5 deletions jedi/_compatibility.py
Expand Up @@ -17,8 +17,6 @@
pass

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
py_version = int(str(sys.version_info[0]) + str(sys.version_info[1]))

Expand Down Expand Up @@ -105,7 +103,7 @@ def find_module_py33(string, path=None, loader=None, full_name=None):
return module_file, module_path, is_package


def find_module_pre_py33(string, path=None, full_name=None):
def find_module_pre_py34(string, path=None, full_name=None):
# This import is here, because in other places it will raise a
# DeprecationWarning.
import imp
Expand Down Expand Up @@ -140,8 +138,7 @@ def find_module_pre_py33(string, path=None, full_name=None):
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_py34 else find_module
find_module = find_module_py34 if is_py3 else find_module_pre_py34
find_module.__doc__ = """
Provides information about a module.
Expand Down
7 changes: 3 additions & 4 deletions jedi/evaluate/compiled/access.py
Expand Up @@ -6,7 +6,7 @@
from collections import namedtuple

from jedi import debug
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
from jedi.evaluate.compiled.getattr_static import getattr_static
from jedi.evaluate.utils import dotted_from_fs_path
Expand All @@ -33,10 +33,9 @@
if is_py3:
NOT_CLASS_TYPES += (
types.MappingProxyType,
types.SimpleNamespace
types.SimpleNamespace,
types.DynamicClassAttribute,
)
if is_py34:
NOT_CLASS_TYPES += (types.DynamicClassAttribute,)


# Those types don't exist in typing.
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Expand Up @@ -33,7 +33,7 @@
keywords='python completion refactoring vim',
long_description=readme,
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,
extras_require={'dev': ['docopt']},
package_data={'jedi': ['evaluate/compiled/fake/*.pym']},
Expand All @@ -47,7 +47,6 @@
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
Expand Down
2 changes: 1 addition & 1 deletion test/completion/arrays.py
Expand Up @@ -437,7 +437,7 @@ def test_func():
#? int()
tuple({1})[0]

# python >= 3.3
# python >= 3.4
# -----------------
# PEP 3132 Extended Iterable Unpacking (star unpacking)
# -----------------
Expand Down
2 changes: 1 addition & 1 deletion test/completion/generators.py
Expand Up @@ -212,7 +212,7 @@ def x():
# yield from
# -----------------

# python >= 3.3
# python >= 3.4

def yield_from():
yield from iter([1])
Expand Down
2 changes: 1 addition & 1 deletion test/completion/pep0484_basic.py
@@ -1,6 +1,6 @@
""" Pep-0484 type hinting """

# python >= 3.2
# python >= 3.4


class A():
Expand Down
2 changes: 1 addition & 1 deletion test/completion/pep0484_typing.py
Expand Up @@ -240,7 +240,7 @@ def testdict(x):
for value in x.values():
#? int()
value
# python >= 3.2
# python >= 3.4
"""
docstrings have some auto-import, annotations can use all of Python's
import logic
Expand Down
4 changes: 2 additions & 2 deletions test/test_api/test_call_signatures.py
Expand Up @@ -6,7 +6,7 @@

from ..helpers import TestCase
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):
Expand Down Expand Up @@ -247,7 +247,7 @@ def _params(Script, source, line=None, column=None):


def test_param_name(Script):
if not is_py33:
if not is_py3:
p = _params(Script, '''int(''')
# int is defined as: `int(x[, base])`
assert p[0].name == 'x'
Expand Down
15 changes: 2 additions & 13 deletions tox.ini
@@ -1,8 +1,8 @@
[tox]
envlist = py27, py33, py34, py35, py36
envlist = py27, py34, py35, py36
[testenv]
deps =
pytest>=2.3.5, < 3.3
pytest>=2.3.5
pytest-cache
# docopt for sith doctests
docopt
Expand All @@ -17,7 +17,6 @@ setenv =
# To test Jedi in different versions than the same Python version, set a
# different test environment.
env27: JEDI_TEST_ENVIRONMENT=27
env33: JEDI_TEST_ENVIRONMENT=33
env34: JEDI_TEST_ENVIRONMENT=34
env35: JEDI_TEST_ENVIRONMENT=35
env36: JEDI_TEST_ENVIRONMENT=36
Expand All @@ -30,30 +29,20 @@ commands =
deps =
# for testing the typing module
typing
# numpydoc for typing scipy stack
numpydoc
{[testenv]deps}
[testenv:py33]
deps =
typing
{[testenv]deps}
[testenv:py34]
deps =
typing
numpydoc
{[testenv]deps}
[testenv:py35]
deps =
numpydoc
{[testenv]deps}
[testenv:py36]
deps =
numpydoc
{[testenv]deps}
[testenv:cov]
deps =
coverage
numpydoc
{[testenv]deps}
commands =
coverage run --source jedi -m py.test
Expand Down
4 changes: 0 additions & 4 deletions travis_install.sh
Expand Up @@ -8,10 +8,6 @@ set -e
sudo chown root: /opt/python/3.6/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
VERSION=3.5
DOWNLOAD=1
Expand Down

0 comments on commit 71f815d

Please sign in to comment.