dabla commented on issue #39413: URL: https://github.com/apache/airflow/issues/39413#issuecomment-2095961720
> Thanks for the investigation and feedback, @Taragolis and @dabla! > > Yes, everything still works despite the warning message. I created this issue just as a "preventive" measure because @potiuk wrote in the closing comment of #37937: > > > Having a warning is "good enough" for now. If we decide to do something more (for example allow such use to behave more "as expected") we can always add it later. > > What would you recommend if we need to inject some common logic into the constructor and the `execute` method of around 15 different (standard) operators? Or shall I patch the `TaskInsntance` and `BaseOperator` classes to insert the `__sentinel` property? In you example above, if you only have this "issue" of common logic with the PythonOpertor, then I would suggest you use the @task decorated method, there you could delegate to another non decorated method having all the common logic. Personally, I would not try to "mess" with native operators and start extending them. -- 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]
