deprecations.rst 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. .. _deprecations:
  2. Deprecation Policy
  3. ==================
  4. A release of FlaskBB may deprecate existing features and begin emitting
  5. :class:`~flaskbb.deprecation.FlaskBBDeprecation` warnings.
  6. These warnings are on by default and will announce for the first time each
  7. deprecated usage is detected. If you want to ignore these warnings, this
  8. behavior can be modified by setting ``DEPRECATION_LEVEL`` in your configuration
  9. file or setting ``FLASKBB_DEPRECATION_LEVEL`` in your environment to a level
  10. from the builtin warnings module.
  11. For more details on interacting with warnings see
  12. `the official documentation on warnings <https://docs.python.org/3/library/warnings.html>`_.
  13. .. note::
  14. If you are developing on FlaskBB the level for FlaskBBDeprecation warnings
  15. is always set to ``error`` when running tests to ensure that deprecated
  16. behavior isn't being relied upon. If you absolutely need to downgrade to a
  17. non-exception level, use pytest's recwarn fixture and set the level with
  18. warnings.simplefilter
  19. -- Insert Details of deprecation timeline --
  20. I suggest following something like Django's policy of at least 2 feature
  21. versions. But semvar suggests that backwards incompatible changes are a major
  22. version bump. :shrug:
  23. Deprecation Helpers
  24. ~~~~~~~~~~~~~~~~~~~
  25. FlaskBB also publicly provides tools for handling deprecations as well and are
  26. open to use by plugins or other extensions to FlaskBB.
  27. .. module:: flaskbb.deprecation
  28. .. autoclass:: FlaskBBWarning
  29. .. autoclass:: FlaskBBDeprecation
  30. .. autoclass:: RemovedInFlaskBB3
  31. .. autofunction:: deprecated