From caee8a40f937e550f9b2e6f52b5c3349d740644a 2020-09-04 22:40:04 From: rchiodo Date: 2020-09-04 22:40:04 Subject: [PATCH] Missed a spot --- diff --git a/IPython/core/magics/code.py b/IPython/core/magics/code.py index 5713406..095c91e 100644 --- a/IPython/core/magics/code.py +++ b/IPython/core/magics/code.py @@ -513,7 +513,7 @@ class CodeMagics(Magics): self.shell.hooks.editor(filename) # and make a new macro object, to replace the old one - with open(filename) as mfile: + with Path(filename).open() as mfile: mvalue = mfile.read() self.shell.user_ns[mname] = Macro(mvalue)