summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2012-11-28 21:15:28 +0100
committerStefan Behnel <stefan_ml@behnel.de>2012-11-28 21:15:28 +0100
commit37724cccf7258445d4d5b710519fbf4bcc2df7dc (patch)
treef4d11979ff34b291af7353e25744a152cdd80de2
parent0f9fb5fcfd6a6dad08f01c435ed843f06ec37f70 (diff)
downloadcython-37724cccf7258445d4d5b710519fbf4bcc2df7dc.tar.gz
fix 'cimport cython' in string code fragments
-rw-r--r--Cython/Compiler/TreeFragment.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Compiler/TreeFragment.py b/Cython/Compiler/TreeFragment.py
index 29ff12ded..983295983 100644
--- a/Cython/Compiler/TreeFragment.py
+++ b/Cython/Compiler/TreeFragment.py
@@ -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)