From 9a8d1a345f48b7aa85e6a6da5841b65ee1f8de63 2019-12-28 10:00:57 From: Matthias Bussonnier Date: 2019-12-28 10:00:57 Subject: [PATCH] Reintroduce compatibility functions for a few release; Leaving time for Cython to clean that up. Closes #12068 --- diff --git a/IPython/utils/py3compat.py b/IPython/utils/py3compat.py index b8ad4e6..5e1a81a 100644 --- a/IPython/utils/py3compat.py +++ b/IPython/utils/py3compat.py @@ -185,3 +185,10 @@ def u_format(s): PY2 = not PY3 PYPY = platform.python_implementation() == "PyPy" +# Cython still rely on that as a Dec 28 2019 +# See https://github.com/cython/cython/pull/3291 and +# https://github.com/ipython/ipython/issues/12068 +def no_code(x, encoding=None): + return x +unicode_to_str = cast_bytes_py2 = no_code +