You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Jarek Potiuk (Jira)" <ji...@apache.org> on 2019/12/10 23:00:04 UTC

[jira] [Created] (AIRFLOW-6226) warning.catch_warning should not be use in our code

Jarek Potiuk created AIRFLOW-6226:
-------------------------------------

             Summary: warning.catch_warning should not be use in our code 
                 Key: AIRFLOW-6226
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-6226
             Project: Apache Airflow
          Issue Type: Bug
          Components: ci
    Affects Versions: 1.10.6, 2.0.0
            Reporter: Jarek Potiuk


Sometime we use warning.catch_warnings in our code directly.

As explained in [https://blog.ionelmc.ro/2013/06/26/testing-python-warnings/] warnings are cached in "__warningregistry__" and if warning is emitted, it is not emited for the second time.

 

Therefore warning.catch_warnings should never be used directly in our test code.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)