[Bf-python] The road to deprecation
Sybren A. Stüvel
sybren at stuvel.eu
Sat Dec 20 12:18:52 CET 2014
Hi folks,
Is there any way, at the moment, to deprecate parts of the Python API? I've
always been a fan of the following:
1. Method calls, property access etc. can be annotated as "deprecated".
2. In version N, we start displaying a warning when deprecated functionality
is used. This warning also mentions version N+1 as the version in which
it will stop working.
3. In version N+1, turn the warning into an error.
4. In version N+2, remove the functionality altogether.
How N, N+1 and N+2 map to Blender versions is another discussion. I'm just
wondering whether such a system exists in Blender, and if not, if people would
find it interesting.
The "root cause" for this, is the Scene.frame_current property. It's currently
writable, but its documentation tells you to call Scene.set_frame() instead.
This made me think about deprecating writing to Scene.frame_current, hence
this email.
Best,
--
Sybren A. Stüvel
http://stuvelfoto.nl/
http://stuvel.eu/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20141220/498857e1/attachment.sig>
More information about the Bf-python
mailing list