← index #4923PR #8448
Related · medium · value 4.918
QUERY · ISSUE

BUG: sys.modules['sys'] not pointing __import__('sys')

openby pmp-popened 2019-07-16updated 2019-07-16

Probably the same reason as :
https://github.com/micropython/micropython/issues/4427

CANDIDATE · PULL REQUEST

py/builtinimport: Alias sys to usys if import weak links aren't enabled.

mergedby dpgeorgeopened 2022-03-25updated 2022-03-28
py-core

The sys module should always be available (if it's compiled in), eg to
change sys.path for importing. So provide an explicit alias from "sys" to
"usys" so that "import sys" can always work.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied