Browse Source

updated doc comment for deprecations utility

Rafał Pitoń 8 years ago
parent
commit
b49ad62bea
1 changed files with 17 additions and 0 deletions
  1. 17 0
      misago/core/deprecations.py

+ 17 - 0
misago/core/deprecations.py

@@ -1,3 +1,20 @@
+"""
+Utility module useful for refactors,
+
+Defines utility function for easy raising of warnings in deprecated functions.
+
+This function is set to use stacklevel 3 as default making following code in test.py:
+
+def depreacted_function():
+    warn("This function is deprecated")
+
+
+def other_function():
+    deprecated_function()
+
+
+Will raise warning about 1st line in other_function calling deprecated function.
+"""
 import warnings
 import warnings