Skip to content

Commit 6aac0f0

Browse files
Carreaumeeseeksmachine
authored andcommitted
Backport PR ipython#14738: Ensure local NS is dict.
1 parent 339351d commit 6aac0f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

IPython/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def embed_kernel(module=None, local_ns=None, **kwargs):
9595
if module is None:
9696
module = caller_module
9797
if local_ns is None:
98-
local_ns = caller_locals
98+
local_ns = dict(**caller_locals)
9999

100100
# Only import .zmq when we really need it
101101
from ipykernel.embed import embed_kernel as real_embed_kernel

0 commit comments

Comments
 (0)