Skip to content

Commit c4bc980

Browse files
committed
Fix semantics of exec_module vs create_module
1 parent 09eedb1 commit c4bc980

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/julia/core.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def find_spec(self, fullname, path=None, target=None):
230230
filepath = os.path.join(os.path.dirname(__file__), filename)
231231
if os.path.isfile(filepath + ".py") or os.path.isdir(filepath):
232232
return
233-
return ModuleSpec(fullname, JuliaModuleLoader())
233+
return ModuleSpec(fullname, JuliaModuleLoader(), origin=filepath)
234234

235235

236236
class JuliaModuleLoader(Loader):
@@ -240,7 +240,10 @@ def julia(self):
240240
return julia
241241

242242
def exec_module(self, module):
243-
fullname = module.__name__
243+
pass
244+
245+
def create_module(self, spec):
246+
fullname = spec.name
244247
juliapath = remove_prefix(fullname, "julia.")
245248
if juliapath == 'Main':
246249
return sys.modules.setdefault(fullname,

0 commit comments

Comments
 (0)