You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/02/06 00:22:02 UTC

[GitHub] [airflow] mik-laj commented on issue #14097: Typo in Sensor: GCSObjectsWtihPrefixExistenceSensor (should be GCSObjectsWithPrefixExistenceSensor)

mik-laj commented on issue #14097:
URL: https://github.com/apache/airflow/issues/14097#issuecomment-774357371


   You should change the name and then add the code below for backward compatibility.
   ```
   class GCSObjectsWtihPrefixExistenceSensor(GCSObjectsWithPrefixExistenceSensor):
       """
       This class is deprecated.
       Please use `airflow.providers.google.cloud.sensors.gcs.GCSObjectsWithPrefixExistenceSensor`.
       """
   
       def __init__(self, *args, **kwargs):
           warnings.warn(
               """This class is deprecated.
               Please use `airflow.providers.google.cloud.sensors.gcs.GCSObjectsWithPrefixExistenceSensor`.""",
               DeprecationWarning,
               stacklevel=3,
           )
           super().__init__(*args, **kwargs)
   ```
   It is also worth adding tests. To do it, update the [`deprecated_classes.py`](https://github.com/apache/airflow/blob/master/tests/deprecated_classes.py) file.
   


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