airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] mik-laj commented on a change in pull request #6306: [AIRFLOW-5632] Rename ComputeEngine operators
Date Sun, 13 Oct 2019 12:57:00 GMT
mik-laj commented on a change in pull request #6306: [AIRFLOW-5632] Rename ComputeEngine operators
URL: https://github.com/apache/airflow/pull/6306#discussion_r334276990
 
 

 ##########
 File path: airflow/contrib/hooks/gcp_compute_hook.py
 ##########
 @@ -16,14 +16,30 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-"""This module is deprecated. Please use `airflow.gcp.hooks.compute`."""
+"""This module is deprecated. Please use `airflow.gcp.hooks.compute.ComputeEngineHook`."""
 
 import warnings
 
 # pylint: disable=unused-import
-from airflow.gcp.hooks.compute import GceHook, GceOperationStatus  # noqa
+from airflow.gcp.hooks.compute import ComputeEngineHook  # noqa
 
 warnings.warn(
-    "This module is deprecated. Please use `airflow.gcp.hooks.compute`.",
+    "This module is deprecated. airflow.gcp.hooks.compute.ComputeEngineHook`",
     DeprecationWarning, stacklevel=2
 )
+
+
+class GceHook(ComputeEngineHook):
+    """
+    This module is deprecated.
+    Please use `airflow.gcp.hooks.compute.ComputeEngineHook`.
+    """
+
+    def __init__(self, *args, **kwargs):
+        warnings.warn(
+            """This class is deprecated.
+            Please use `airflow.gcp.hooks.compute.ComputeEngineHook`.""",
+            DeprecationWarning,
 
 Review comment:
   Can you add stacklevel argument?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message