phi-friday commented on PR #41039: URL: https://github.com/apache/airflow/pull/41039#issuecomment-2252753700
> > The warning `RemovedInAirflow3Warning` is consistently occurring. What can I modify to get it to pass... > > https://github.com/apache/airflow/blob/main/contributing-docs/testing/unit_tests.rst#handling-warnings The warning seems to be occurring in a place that seems unrelated to the area I modified. I'm not sure where to look, so can you give me a little hint? ```shell self = <airflow.utils.decorators._autostacklevel_warn object at 0xf74179d49cd0> message = '`soft_fail` is deprecated and will be removed in a future version. Please provide skip_policy=SkipPolicy.skip_on_soft_error instead.' category = <class 'airflow.exceptions.RemovedInAirflow3Warning'>, stacklevel = 3 source = None def warn(self, message, category=None, stacklevel=1, source=None): > self.warnings.warn(message, category, stacklevel + 2, source) E airflow.exceptions.RemovedInAirflow3Warning: `soft_fail` is deprecated and will be removed in a future version. Please provide skip_policy=SkipPolicy.skip_on_soft_error instead. airflow/utils/decorators.py:114: RemovedInAirflow3Warning _________ TestSFTPSensor.test_sftp_failure[True-AirflowSkipException] __________ self = <tests.providers.sftp.sensors.test_sftp.TestSFTPSensor object at 0xf7414ac87100> sftp_hook_mock = <MagicMock name='SFTPHook' id='271858442834320'> soft_fail = True expected_exception = <class 'airflow.exceptions.AirflowSkipException'> @pytest.mark.parametrize( "soft_fail, expected_exception", ((False, OSError), (True, AirflowSkipException)) ) @patch("airflow.providers.sftp.sensors.sftp.SFTPHook") def test_sftp_failure(self, sftp_hook_mock, soft_fail: bool, expected_exception): sftp_hook_mock.return_value.get_mod_time.side_effect = OSError(SFTP_FAILURE, "SFTP failure") > sftp_sensor = SFTPSensor( task_id="unit_test", path="/path/to/file/1970-01-01.txt", soft_fail=soft_fail ) tests/providers/sftp/sensors/test_sftp.py:61: ``` -- 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]
