hussein-awala commented on PR #38948:
URL: https://github.com/apache/airflow/pull/38948#issuecomment-2054123990

   > AFAIK it is exact the opposite, default values assigned exactly once, as 
well as module imports exactly once, if do not count manual reload through 
importlib or clear sys.modules
   >
   > The problem with callable on default arguments that if it becomes mutable 
it will have all side effects of mutable.
   >
   > In the current proposal this function will call each time when new object 
of this dataclass instantiated
   
   I agree with this, but running the method at import time is often (if not 
always) not recommended, I added a `lru_cache` as TP suggested. WDYT?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to