On Mon, Oct 26, 2009 at 13:42, mdipierro <
mdip...@cs.depaul.edu> wrote:
>
> Good point. web2py can do this
>
> import logging
> logging.warn('something is deprecated')
>
> I could redefine
>
> SQLDB=lambda *a,**b: logging.warn(...) and DAL(*a,**b)
>
> this would already produce lots of logs. I would not do it for SQLXyy
> because that would make even more logs.
> Pros/Cons?
>
> On Oct 26, 10:37 am, Renato-ES-Brazil <
caliari.ren...@gmail.com>
> wrote:
>> Massimo,
>>
>> About the question of "backward compatibility", maybe there will come
>> a time that one of the principles Python and web2py are broken,
>> specifically this: "There should be only one way of doing things".
>>
>> Or not? :-)
>>
>> Example (extracted from manual):
>>
>> "For backward compatibility SQLDB=DAL and SQLField=Field. We encourage
>> you to use the new syntax DAL and Field, instead of the old syntax."
>>
>> I think would be interesting display warnings in some log file about
>> the deprecated methods used in some app. What do you think? Is web2py
>> already capable of doing that?
>>
>> Thanks. :-)
> >
>