Skip to content

Commit ec6fbfc

Browse files
remove __package__, __file__, __spec__ in locals()
1 parent ad1cea6 commit ec6fbfc

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

Lib/asyncio/__main__.py

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

215215
repl_locals = {'asyncio': asyncio}
216-
for key in {'__name__', '__package__',
217-
'__loader__', '__spec__',
218-
'__builtins__', '__file__'}:
216+
for key in {'__name__',
217+
'__loader__',
218+
'__builtins__'}:
219219
repl_locals[key] = locals()[key]
220220

221221
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)