From 94eb76c46b1058a8980573538e39cb988fceb56f Mon Sep 17 00:00:00 2001 From: Dwayne Bailey Date: Wed, 23 Nov 2016 16:21:35 +0000 Subject: [PATCH] Setup warning configuration and document guidelines --- setup.cfg | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/setup.cfg b/setup.cfg index 9f0830a762c..f20685e7a99 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,6 +4,36 @@ addopts=--tb=short --strict tests norecursedirs=.git _build tmp* requirements commands/* markers= cmd: Django admin commands. +# https://docs.python.org/2/library/warnings.html#the-warnings-filter +filterwarnings = + # Error by default + error + ## Deprecation related issues: + ## * Not clean: + ## - default - in our own code till they are fixed (we can see what we + ## need to fix, but builds don't break) + ## - ignore - in other's code (no noise please, clean ours first) + ## * Clean: + ## - error - in our own code (don't regress) + ## - default - in other's code if they are not fixed. Be specific about + ## what module so we don't allow other brokenness in (able to watch + ## others fixing their code, don't hide it) + ## - error - if we have no occurances in our's or other's code (keep it + ## clean - should essentially not be listed and falls to default error + ## behaviour) + # + # Sadly can't use RemovedInDjango20Warning directly + # Not Clean + default:.*settings.MIDDLEWARE_CLASSES is deprecated.* + default:.*use_for_related_fields.* + # Clean + default:.*assignment_tag.*::.*socialaccount + ## Other + # allauth - these two are deprecated, unused in our code but trigger a + # false positive. Likely because of Django template loader simply also + # loading the deprecated module. + ignore:.*account_tags.* + ignore:.*socialaccount_tags.* [pydocstyle] inherit=false