Skip to content

Commit 1c6541b

Browse files
committed
Merge from 2.3: Fix for spyder-ide#2239 and other minor fixes
2 parents 148df40 + 263ce67 commit 1c6541b

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

spyderlib/config.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def is_ubuntu():
149149
SANS_SERIF = ['Ubuntu'] + SANS_SERIF
150150
MONOSPACE = ['Ubuntu Mono'] + MONOSPACE
151151
BIG = 13
152-
MEDIUM = SMALL = 10
152+
MEDIUM = SMALL = 11
153153
else:
154154
BIG = 12
155155
MEDIUM = SMALL = 9
@@ -713,7 +713,7 @@ def is_ubuntu():
713713
# 2. If you want to *remove* options that are no longer needed in our codebase,
714714
# you need to do a MAJOR update in version, e.g. from 3.0.0 to 4.0.0
715715
# 3. You don't need to touch this value if you're just adding a new option
716-
CONF_VERSION = '16.0.0'
716+
CONF_VERSION = '16.1.0'
717717

718718
# XXX: Previously we had load=(not DEV) here but DEV was set to *False*.
719719
# Check if it *really* needs to be updated or not

spyderlib/plugins/inspector.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@
4343
else:
4444
IPythonControlWidget = None # analysis:ignore
4545

46-
# Check for Sphinx presence to activate rich text mode
47-
if programs.is_module_installed('sphinx', '>=0.6.6'):
48-
sphinx_version = programs.get_module_version('sphinx')
46+
# Check if we can import Sphinx to activate rich text mode
47+
try:
4948
from spyderlib.utils.inspector.sphinxify import (CSS_PATH, sphinxify,
5049
warning, generate_context,
5150
usage)
52-
else:
51+
sphinx_version = programs.get_module_version('sphinx')
52+
except ImportError:
5353
sphinxify = sphinx_version = None # analysis:ignore
5454

5555
# To add sphinx dependency to the Dependencies dialog

spyderlib/pygments_patch.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def apply():
2020

2121
# Patching IPython's patch of RegLexer (Oh God!!)
2222
from pygments.lexer import _TokenType, Text, Error
23+
from spyderlib.py3compat import to_text_string
2324
try:
2425
from IPython.qt.console.pygments_highlighter import RegexLexer
2526
except ImportError:
@@ -69,7 +70,7 @@ def get_tokens_unprocessed(self, text, stack=('root',)):
6970
pos += 1
7071
statestack = ['root']
7172
statetokens = tokendefs['root']
72-
yield pos, Text, u'\n'
73+
yield pos, Text, to_text_string('\n')
7374
continue
7475
yield pos, Error, text[pos]
7576
pos += 1

0 commit comments

Comments
 (0)