[Bf-committers] Can we please stop breaking APIs?

Campbell Barton ideasman42 at gmail.com
Mon Jul 18 11:52:30 CEST 2011


On Mon, Jul 18, 2011 at 5:08 PM, Matt Ebb <matt at mke3.net> wrote:
> On Mon, Jul 18, 2011 at 5:03 PM, Campbell Barton <ideasman42 at gmail.com>wrote:
>
>> @Matt, read you're mail and agree with you're suggestions on
>> deprecation, but for this to work we need some better way to notify of
>> deprecated api usage.
>> it worries me a bit that mac and win users (even script devs) don't
>> use the console so much anymore, of course they should not have to...
>> but for the moment deprecation warnings are just prints, so its
>> something we need to address.
>>
>
> Agreed. Is there any way that a deprecation warning could be hooked up to
> blender's reports system, to give a little warning in the reports area of
> the header? I can't remember precisely right now but doesn't it already
> report on python errors there?
>
>
> Matt

It reports on errors but not warnings, it may be possible to get it to
catch warnings too, will need to look into that.

Committed a deprecation checker which prints deprecations & their age in days.

`make test_deprecated` - runs the test, output:

---snip

python3 source/tests/check_deprecated.py
scanning in '/dsk/data/src/blender/blender' for '*DEPRECATED* YYYY/MM/DD info'
    scanned 2837 files

All deprecations...
   datetime.datetime(2011, 7, 17, 0, 0), days-old(02),
/dsk/data/src/blender/blender/source/blender/python/generic/bgl.c:117
- bgl.Buffer.list

---snip

done!


More information about the Bf-committers mailing list