airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Iuliia Volkova (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AIRFLOW-2845) Remove asserts from the contrib code (change to legal exceptions)
Date Fri, 03 Aug 2018 20:48:00 GMT

     [ https://issues.apache.org/jira/browse/AIRFLOW-2845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Iuliia Volkova updated AIRFLOW-2845:
------------------------------------
    Description: 
Hi guys.  `asserts` is used in Airflow contrib package code .  And from point of view
for which purposes asserts are really is, it's not correct.

If we look at documentation we could find information what asserts is debug tool: [https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement] and
also it is could be disabled globally by default. 

If you do not mind, I will be happy to prepare PR for remove asserts from the contrib module
with changing it to raising errors with correct Exceptions and messages and not just "Assertion
Error".

I talk only about src (not about asserts in tests). 

 

  was:
Hi guys. A lot of `asserts` is used in Airflow code .  And from point of view for which
purposes asserts are really is, it's not correct.

If we look at documentation we could find information what asserts is debug tool: [https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement] and
also it is could be disabled globally by default. 

If you do not mind, I will be happy to prepare PR for remove asserts from the contrib module
with changing it to raising errors with correct Exceptions and messages and not just "Assertion
Error".

I talk only about src (not about asserts in tests). 

 


> Remove asserts from the contrib code (change to legal exceptions) 
> ------------------------------------------------------------------
>
>                 Key: AIRFLOW-2845
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2845
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: contrib
>    Affects Versions: 1.10.1
>            Reporter: Iuliia Volkova
>            Assignee: Iuliia Volkova
>            Priority: Minor
>              Labels: easyfix
>             Fix For: 1.9.0
>
>
> Hi guys.  `asserts` is used in Airflow contrib package code .  And from point of
view for which purposes asserts are really is, it's not correct.
> If we look at documentation we could find information what asserts is debug tool: [https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement] and
also it is could be disabled globally by default. 
> If you do not mind, I will be happy to prepare PR for remove asserts from the contrib module
with changing it to raising errors with correct Exceptions and messages and not just "Assertion
Error".
> I talk only about src (not about asserts in tests). 
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message