stegololz commented on code in PR #73288: URL: https://github.com/apache/airflow/pull/73288#discussion_r4060234308
########## providers/sftp/src/airflow/providers/sftp/pools/sftp.py: ########## @@ -21,14 +21,31 @@ from contextlib import asynccontextmanager, suppress from dataclasses import dataclass, field from threading import Lock -from typing import TYPE_CHECKING from weakref import WeakKeyDictionary +import asyncssh + from airflow.providers.sftp.hooks.sftp import SFTPHookAsync from airflow.utils.log.logging_mixin import LoggingMixin -if TYPE_CHECKING: - import asyncssh +#: SFTP status codes that report a broken or desynchronised transport. +_TRANSPORT_SFTP_ERRORS: tuple[type[asyncssh.SFTPError], ...] = ( + asyncssh.SFTPNoConnection, + asyncssh.SFTPConnectionLost, + asyncssh.SFTPBadMessage, Review Comment: done -- 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]
