IPython-5.8.0 is broken on python-3.8, due to changes to ast.Module:
In [1]: import pandas
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/usr/local/lib/python3.8/codeop.py in __call__(self, source, filename, symbol)
134
135 def __call__(self, source, filename, symbol):
--> 136 codeob = compile(source, filename, symbol, self.flags, 1)
137 for feature in _features:
138 if codeob.co_flags & feature.compiler_flag:
TypeError: required field "type_ignores" missing from Module
This issue has been addressed by upstream in newer versions [0].
Updating to a newer version of IPython will take a bit of time because
of the DEPS (more recent versions are required). For the time being
apply a minimal patch.
Run tested on amd64.
Comments/OK?
[0] https://github.com/ipython/ipython/pull/11593
diff --git Makefile Makefile
index 2d21abe1ddf..0a51ef87712 100644
--- Makefile
+++ Makefile
@@ -3,7 +3,7 @@
COMMENT = enhanced interactive Python shell
MODPY_EGG_VERSION = 5.8.0
-REVISION = 4
+REVISION = 5
DISTNAME = ipython-${MODPY_EGG_VERSION}
PKGNAME = ipython${MODPY_MAJOR_VERSION}-${MODPY_EGG_VERSION}
CATEGORIES = devel
diff --git patches/patch-IPython_core_interactiveshell_py
patches/patch-IPython_core_interactiveshell_py
new file mode 100644
index 00000000000..af8f7759a33
--- /dev/null
+++ patches/patch-IPython_core_interactiveshell_py
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+IPython is broken on python-3.8, due to changes to ast.Module. Taken from
+https://www.mail-archive.com/[email protected]/msg1715405.html
+
+Index: IPython/core/interactiveshell.py
+--- IPython/core/interactiveshell.py.orig
++++ IPython/core/interactiveshell.py
+@@ -2813,7 +2813,7 @@ class InteractiveShell(SingletonConfigurable):
+
+ try:
+ for i, node in enumerate(to_run_exec):
+- mod = ast.Module([node])
++ mod = ast.Module([node], [])
+ code = compiler(mod, cell_name, "exec")
+ if self.run_code(code, result):
+ return True