Commit bc9cdf44 authored by Stefan Behnel's avatar Stefan Behnel

fix error handling in sequential cython runs

parent bda5bac1
...@@ -201,3 +201,11 @@ def release_errors(ignore=False): ...@@ -201,3 +201,11 @@ def release_errors(ignore=False):
def held_errors(): def held_errors():
return error_stack[-1] return error_stack[-1]
# this module needs a redesign to support parallel cythonisation, but
# for now, the following works at least in sequential compiler runs
def reset():
_warn_once_seen.clear()
del error_stack[:]
...@@ -510,6 +510,7 @@ class Context(object): ...@@ -510,6 +510,7 @@ class Context(object):
return ".".join(names) return ".".join(names)
def setup_errors(self, options, result): def setup_errors(self, options, result):
Errors.reset() # clear any remaining error state
if options.use_listing_file: if options.use_listing_file:
result.listing_file = Utils.replace_suffix(source, ".lis") result.listing_file = Utils.replace_suffix(source, ".lis")
path = result.listing_file path = result.listing_file
......
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