From: Stefan Behnel Date: Wed, 24 Nov 2010 18:21:42 +0000 (+0100) Subject: fix error handling in sequential cython runs X-Git-Tag: 0.14.alpha0~93 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bc9cdf449a03363a49041a2e7a02e94e346589c3;p=cython.git fix error handling in sequential cython runs --- diff --git a/Cython/Compiler/Errors.py b/Cython/Compiler/Errors.py index 0f3031b8..5e7a6d87 100644 --- a/Cython/Compiler/Errors.py +++ b/Cython/Compiler/Errors.py @@ -201,3 +201,11 @@ def release_errors(ignore=False): def held_errors(): 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[:] diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py index 2e283d8d..fcc1d68f 100644 --- a/Cython/Compiler/Main.py +++ b/Cython/Compiler/Main.py @@ -510,6 +510,7 @@ class Context(object): return ".".join(names) def setup_errors(self, options, result): + Errors.reset() # clear any remaining error state if options.use_listing_file: result.listing_file = Utils.replace_suffix(source, ".lis") path = result.listing_file