From f5e594970a49833721cc23abd80f48a184e2a697 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 21 Mar 2016 10:38:42 +0100 Subject: [PATCH 1/5] Enhance docs about debugging --- jedi/api/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jedi/api/__init__.py b/jedi/api/__init__.py index 4e05f3e1..c48a0a09 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**. """ @@ -722,6 +725,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 From 97178dd92b77f3790f9d8cf82e53b50ae9ffaf01 Mon Sep 17 00:00:00 2001 From: Rick van Hattem Date: Thu, 31 Mar 2016 03:27:43 +0200 Subject: [PATCH 2/5] enabled python 3.5 support --- .travis.yml | 1 + tox.ini | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 876af276..e8295ae9 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 diff --git a/tox.ini b/tox.ini index 526092fc..d7ae5a3b 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 From 4afc74f1c7b44a1baecfe5b33c43db2b57aa797f Mon Sep 17 00:00:00 2001 From: Rick van Hattem Date: Thu, 31 Mar 2016 03:38:32 +0200 Subject: [PATCH 3/5] fixing python 3.2 and 3.5 issues --- .travis.yml | 4 +++- tox.ini | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e8295ae9..188c99f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,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: @@ -24,3 +25,4 @@ after_script: pip install --quiet --use-mirrors coveralls; coveralls; fi + diff --git a/tox.ini b/tox.ini index d7ae5a3b..4211ff44 100644 --- a/tox.ini +++ b/tox.ini @@ -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 From 5cb969d21199bd63f9789fcde669aed1b2151213 Mon Sep 17 00:00:00 2001 From: Dmitry Sadovnychyi Date: Sat, 4 Jun 2016 17:44:29 +0800 Subject: [PATCH 4/5] Use utf-8 instead of iso-8859-1 as a default encoding --- jedi/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jedi/common.py b/jedi/common.py index 0e9afd11..911227f7 100644 --- a/jedi/common.py +++ b/jedi/common.py @@ -134,7 +134,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 From 1404b7bcea1d9c346037a423234037be13f09593 Mon Sep 17 00:00:00 2001 From: Dmitry Sadovnychyi Date: Sat, 4 Jun 2016 17:49:28 +0800 Subject: [PATCH 5/5] Update AUTHORS.txt --- AUTHORS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.txt b/AUTHORS.txt index bc258d6b..afde43ad 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -34,5 +34,6 @@ Phillip Berndt (@phillipberndt) Ian Lee (@IanLee1521) Farkhad Khatamov (@hatamov) Kevin Kelley (@kelleyk) +Dmytro Sadovnychyi (@sadovnychyi) Note: (@user) means a github user name.