Here is a quick vote on using asserts in Airflow code.

It is distilled from the discussion
https://lists.apache.org/list.html?dev@airflow.apache.org.

Here are the two options:

*[+1]*  Allow using asserts in some specific cases.*
*[-1]**: Forbid using asserts.*

The voting will last till Monday 4 pm CET. The committers have binding
votes, but everyone is encouraged to call advisory - non-binding - votes as
well.

Consider that my +1 (binding) vote.


* [+1] The case are clearly "strictly meant for developers" assertions
(None fields mainly) - which are more like type annotations and can be
stripped away when optimising. If those asserts are stripped out, another
exception will be thrown out shortly. If we agree to that we will add some
clear rules for those asserts  in CONTRIBUTING.md and make it part of code
review process to check if assertions are "proper".

** [-1] Forbidding using asserts is mainly due to ambiguities when to
use/when to not use asserts. If we agree to that, we will forbid using
asserts via pre-commits and remove all assertions in our code.

J.
-- 

Jarek Potiuk
Polidea <https://www.polidea.com/> | Principal Software Engineer

M: +48 660 796 129 <+48660796129>
[image: Polidea] <https://www.polidea.com/>

Reply via email to