Commit 37724ccc authored by Stefan Behnel's avatar Stefan Behnel

fix 'cimport cython' in string code fragments

parent 0f9fb5fc
......@@ -26,7 +26,7 @@ class StringParseContext(Main.Context):
self.module_name = name
def find_module(self, module_name, relative_to = None, pos = None, need_pxd = 1):
if module_name != self.module_name:
if module_name not in (self.module_name, 'cython'):
raise AssertionError("Not yet supporting any cimports/includes from string code snippets")
return ModuleScope(module_name, parent_module = None, context = self)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment