[Cython] Message system refactoring

Vitja Makarov vitja.makarov at gmail.com
Mon Mar 21 12:01:11 CET 2011

2011/3/21 Dag Sverre Seljebotn <d.s.seljebotn at astro.uio.no>:
> On 03/21/2011 11:45 AM, Vitja Makarov wrote:
>> Now error/warning messages are stored in global variables at
>> Cython.Compiler.Errors
>> I think it's much better to move error handling into some object,
>> Main.Context for example.
>> Some benefits:
>>  - reduce use of global variables
>>  - allow more then one cython compiler instance at the time
>>  - make it much easy to implement -Werror
>>  - cython directives can affect message system (fast_fail, werror)
>>  - messages could be easily sorted
> +1. I assume the reason this is not done is simply because it would be a lot
> of work and the payback is less than spending time on other stuff.
> By attaching the error context to "env" and "code" one can avoid a lot of
> signature changes. I think transforms should take the context in their
> constructor.

It could be something like proxy object that takes compiler directives
into account and proxies messages to context.


More information about the cython-devel mailing list