diff --git a/.travis.yml b/.travis.yml index 876af276..188c99f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ env: - TOXENV=py32 - TOXENV=py33 - TOXENV=py34 + - TOXENV=py35 - TOXENV=pypy - TOXENV=cov - TOXENV=sith @@ -14,8 +15,9 @@ matrix: - env: TOXENV=cov - env: TOXENV=sith - env: TOXENV=pypy +python: 3.5 install: - - pip install --quiet --use-mirrors tox + - pip install --quiet tox 'virtualenv<14.0.0' 'pip<8.0.0' script: - tox after_script: @@ -23,3 +25,4 @@ after_script: pip install --quiet --use-mirrors coveralls; coveralls; fi + diff --git a/AUTHORS.txt b/AUTHORS.txt index 076e8cc9..9e7f9800 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -37,5 +37,6 @@ Kevin Kelley (@kelleyk) Sid Shanker (@squidarth) Reinoud Elhorst (@reinhrst) Guido van Rossum (@gvanrossum) +Dmytro Sadovnychyi (@sadovnychyi) Note: (@user) means a github user name. diff --git a/jedi/api/__init__.py b/jedi/api/__init__.py index e057c5f1..02dd735c 100644 --- a/jedi/api/__init__.py +++ b/jedi/api/__init__.py @@ -3,6 +3,9 @@ The API basically only provides one class. You can create a :class:`Script` and use its methods. Additionally you can add a debug function with :func:`set_debug_function`. +Alternatively, if you don't need a custom function and are happy with printing +debug messages to stdout, simply call :func:`set_debug_function` without +arguments. .. warning:: Please, note that Jedi is **not thread safe**. """ @@ -529,6 +532,8 @@ def set_debug_function(func_cb=debug.print_to_stdout, warnings=True, """ Define a callback debug function to get all the debug messages. + If you don't specify any arguments, debug messages will be printed to stdout. + :param func_cb: The callback function for debug messages, with n params. """ debug.debug_function = func_cb diff --git a/jedi/common.py b/jedi/common.py index fc3151af..3655c0bd 100644 --- a/jedi/common.py +++ b/jedi/common.py @@ -135,7 +135,7 @@ def source_to_unicode(source, encoding=None): return possible_encoding.group(1) else: # the default if nothing else has been set -> PEP 263 - return encoding if encoding is not None else 'iso-8859-1' + return encoding if encoding is not None else 'utf-8' if isinstance(source, unicode): # only cast str/bytes diff --git a/tox.ini b/tox.ini index 526092fc..4211ff44 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py26, py27, py32, py33, py34 +envlist = py26, py27, py32, py33, py34, py35 [testenv] deps = pytest>=2.3.5 @@ -18,6 +18,11 @@ commands = deps = unittest2 {[testenv]deps} +[testenv:py32] +deps = + pip<8.0.0 + virtualenv<14.0.0 + {[testenv]deps} [testenv:cov] deps = coverage