mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 14:54:47 +08:00
Merge pull request #387 from ColinDuquesnoy/py34
UnicodeError with Python 3.4
This commit is contained in:
@@ -4,6 +4,7 @@ env:
|
|||||||
- TOXENV=py27
|
- TOXENV=py27
|
||||||
- TOXENV=py32
|
- TOXENV=py32
|
||||||
- TOXENV=py33
|
- TOXENV=py33
|
||||||
|
- TOXENV=py34
|
||||||
- TOXENV=pypy
|
- TOXENV=pypy
|
||||||
- TOXENV=cov
|
- TOXENV=cov
|
||||||
- TOXENV=sith
|
- TOXENV=sith
|
||||||
@@ -14,6 +15,12 @@ matrix:
|
|||||||
- env: TOXENV=pypy
|
- env: TOXENV=pypy
|
||||||
install:
|
install:
|
||||||
- pip install --quiet --use-mirrors tox
|
- pip install --quiet --use-mirrors tox
|
||||||
|
# install python 3.4 from PPA since Travis does not have python 3.4 yet
|
||||||
|
- if [ "$TOXENV" = "py34" ]; then
|
||||||
|
sudo apt-add-repository -y ppa:fkrull/deadsnakes;
|
||||||
|
sudo apt-get update;
|
||||||
|
sudo apt-get install python3.4;
|
||||||
|
fi
|
||||||
script:
|
script:
|
||||||
- tox
|
- tox
|
||||||
after_script:
|
after_script:
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ def find_module_py33(string, path=None):
|
|||||||
module_file = None
|
module_file = None
|
||||||
else:
|
else:
|
||||||
module_path = loader.get_filename(string)
|
module_path = loader.get_filename(string)
|
||||||
mode = 'rb' if module_path.endswith(".pyc") else 'r'
|
module_ext = os.path.splitext(module_path)[1]
|
||||||
|
mode = 'rb' if module_ext in ['.pyc', '.so', '.pyd'] else 'r'
|
||||||
module_file = open(module_path, mode)
|
module_file = open(module_path, mode)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
# ExtensionLoader has not attribute get_filename, instead it has a
|
# ExtensionLoader has not attribute get_filename, instead it has a
|
||||||
|
|||||||
Reference in New Issue
Block a user