issue #590: teach importer to handle self-replacing modules
parent
d71d0ea2f9
commit
8f940e2ccb
@ -0,0 +1,6 @@
|
||||
# issue #590: this module imports a module that replaces itself in sys.modules
|
||||
# during initialization.
|
||||
import simple_pkg.replaces_self
|
||||
|
||||
def subtract_one(n):
|
||||
return simple_pkg.replaces_self.subtract_one(n)
|
@ -0,0 +1,4 @@
|
||||
# issue #590: this module replaces itself in sys.modules during initialization.
|
||||
import sys
|
||||
import simple_pkg.b
|
||||
sys.modules[__name__] = simple_pkg.b
|
Loading…
Reference in New Issue