[Bf-python] proposal for updating rna/ python names of properties

Campbell Barton ideasman42 at gmail.com
Tue Jul 9 00:34:15 CEST 2013


On Tue, Jul 9, 2013 at 4:01 AM, Dan Eicher <dan at eu.phorio.us> wrote:
> Hi,
>
> Technically I think it wouldn't be too hard to have makesrna add the code to
> throw a DeprecationWarning exception, just need a new flag and a bit of code
> to insert into the generated function.
>
> The main problem I see is DeprecationWarning and PendingDeprecationWarning
> are 'ignored by default' so it'll probably still be a big surprise when
> depreciated functions/attributes are removed unless the dev goes to all the
> trouble to turn on 'warnings as errors'. From what I can tell a lot of
> addons aren't known to be broken until the actual blender release that
> breaks them, not a whole lot of pre-release testing going on there, so more
> than likely they won't 'break' until the depreciated feature is removed from
> blender for good.
>
> Not that I'm saying this isn't a good idea (like it myself actually) just
> that python's way of ignoring depreciation exceptions by default kind of
> defeats the purpose.
>
> Dan

We can do this without much trouble, (add a flag, raise warning on access),
The annoying thing here is that we would need to store a reference to
the new property somewhere, however we could resolve that by including
it in the new property to use in the deprecated description, which
would be printed along with the warning.

This means it would also show up in the API docs and tooltip.



More information about the Bf-python mailing list