ashb commented on a change in pull request #12069:
URL: https://github.com/apache/airflow/pull/12069#discussion_r516818592



##########
File path: airflow/plugins_manager.py
##########
@@ -40,11 +43,29 @@
 import_errors = {}
 
 
+PY37 = sys.version_info >= (3, 7)
+
+
 class AirflowPluginException(Exception):
     pass
 
 
-class AirflowPlugin(object):
+class _MetaPluginClass(type):
+    def __new__(cls, name, bases, props):
+        if props.get('operators', []) or props.get('sensors', []):
+            warnings.warn(
+                "Registering operator or sensors in plugins is deprecated -- 
these should be treated like "
+                "'plain' python modules, and imported normally in DAGs. 
Airflow 2.0 has removed the ability "
+                "to register these types in plugins",

Review comment:
       http://airflow.apache.org/docs/stable/howto/custom-operator.html exists 
on 1.10 already, and is a page all about this, so I'll use that instead. 




----------------------------------------------------------------
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.

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


Reply via email to