Skip to content

Commit 83418f3

Browse files
remove __package__, __file__, __spec__ in locals()
1 parent 790cdae commit 83418f3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Lib/asyncio/__main__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ def interrupt(self) -> None:
191191
asyncio.set_event_loop(loop)
192192

193193
repl_locals = {'asyncio': asyncio}
194-
for key in {'__name__', '__package__',
195-
'__loader__', '__spec__',
196-
'__builtins__', '__file__'}:
194+
for key in {'__name__',
195+
'__loader__',
196+
'__builtins__'}:
197197
repl_locals[key] = locals()[key]
198198

199199
console = AsyncIOInteractiveConsole(repl_locals, loop)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Disable relative import in asyncio repl

0 commit comments

Comments
 (0)