##// END OF EJS Templates
Backport PR #8614: Safely encode paths in IPython.utils.path.compress_user...
Backport PR #8614: Safely encode paths in IPython.utils.path.compress_user This is a minor bugfix that resolves an issue on Python 2 on Windows systems with non-ascii home folders. On these systems, when IPython tries to show a tooltip for a function from a non-ascii location, a `UnicodeDecodeError` is triggered. This appears to be related to issue #8543. I think this is a safe bugfix, as the old behavior is clearly incorrect on Python 2, and the change does nothing on Python 3. I have given it a few test runs. The relevant line is 85. I apologize for the other (unnecessary) line changes; Atom stripped the trailing tabs automatically.

File last commit:

r16114:15cc5a8e
r21521:a4080c85
Show More
embed_no_division.py
6 lines | 291 B | text/x-python | PythonLexer
/ tools / tests / embed / embed_no_division.py
"""This tests that future compiler flags are passed to the embedded IPython."""
from IPython import embed
import __future__
embed(banner1='', header='check 1/2 == 0 in Python 2')
embed(banner1='', header='check 1/2 == 0.5 in Python 2',
compile_flags=__future__.division.compiler_flag)