title: Unable to suppress deprecation warnings
body: <p>In my Django application, when I import one third party library, I get this warning in the console:</p>
  
  <blockquote>
    <p>the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses</p>
  </blockquote>
  
  <p>If however I do the import inside Python shell, then everything is ok. I want to achive the same behaviour in Django. This is what I've tried based on answers in other OS threads:</p>
  
  <pre><code>import warnings
  from django.utils.deprecation import RemovedInDjango110Warning
  warnings.filterwarnings(action="ignore", category=RemovedInDjango110Warning)
  </code></pre>
  
  <p>The above code results in another error message, that says that RemovedInDjango110Warning does not exists. I also tried this:</p>
  
  <pre><code>import warnings
  
  def fxn():
      warnings.warn("deprecated", DeprecationWarning)
  
  with warnings.catch_warnings():
      warnings.simplefilter("ignore")
      fxn()
  
  from third_party_lib import some_module
  </code></pre>
  
  <p>But still I get the very same error message. So, it seems like all previous answers to this problem got outdated. And we need some fresh fix. Thanks!</p>
  
  <p>I also tried this:</p>
  
  <pre><code>import warnings
  
  with warnings.catch_warnings():
      warnings.filterwarnings("ignore",category=DeprecationWarning)
      from third_party_lib import some_module
  </code></pre>
  
  <p>But it has no effect.</p>