Skip to content

Commit ccf5da4

Browse files
authored
Backport PR ipython#14738 on branch 8.x (Ensure local NS is dict.) (ipython#14740)
Backport PR ipython#14738: Ensure local NS is dict.
2 parents 339351d + 6aac0f0 commit ccf5da4

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)