Skip to content

Deprecation framework (draft)

John Vandenberg edited this page Nov 11, 2016 · 1 revision

A draft for technical aspects of https://github.com/coala/cEPs/issues/30

Functionality deprecations

Code deprecation

Code deprecation should be using warnings.warn with DeprecationWarning.

warnings.warn is a layer on top of logging, that allows configuration per class of warning.

Users do not need to see code deprecation messages, and DeprecationWarning messages are by default ignored, and thus not pushed into the logging layer.

The test runner should run the tests with DeprecationWarning emitted, so that developers are forced to see them.

coala can add a layer above warnings.warn which takes adds higher level deprecation functions like forced deprecation policy/schedule. e.g. it could require that deprecation warnings are fixed before a nominated date/version, after which the test runner will stop ignoring it and show an exception.

Clone this wiki locally