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.