Re: [PR] FTPHook methods should not change working directory [airflow]

2024-05-29 Thread via GitHub
collinmcnulty commented on PR #35105: URL: https://github.com/apache/airflow/pull/35105#issuecomment-2137934827 This is actually a change in behavior in `list_directory`. Now, the full filepath `folder/filename` is printed instead of just the `filename` -- This is an automated message fro

Re: [PR] FTPHook methods should not change working directory [airflow]

2023-10-30 Thread via GitHub
hussein-awala merged PR #35105: URL: https://github.com/apache/airflow/pull/35105 -- 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: commits-unsubscr...@ai

Re: [PR] FTPHook methods should not change working directory [airflow]

2023-10-29 Thread via GitHub
makrushin-evgenii commented on code in PR #35105: URL: https://github.com/apache/airflow/pull/35105#discussion_r1375457211 ## airflow/providers/ftp/hooks/ftp.py: ## @@ -88,9 +90,10 @@ def list_directory(self, path: str) -> list[str]: :param path: full path to the remote

Re: [PR] FTPHook methods should not change working directory [airflow]

2023-10-24 Thread via GitHub
potiuk commented on PR #35105: URL: https://github.com/apache/airflow/pull/35105#issuecomment-1776827295 @hussein-awala ? -- 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

Re: [PR] FTPHook methods should not change working directory [airflow]

2023-10-23 Thread via GitHub
potiuk commented on code in PR #35105: URL: https://github.com/apache/airflow/pull/35105#discussion_r1368827812 ## airflow/providers/ftp/hooks/ftp.py: ## @@ -213,9 +205,8 @@ def store_file( input_handle = open(local_full_path_or_buffer, "rb") else:

Re: [PR] FTPHook methods should not change working directory [airflow]

2023-10-23 Thread via GitHub
potiuk commented on code in PR #35105: URL: https://github.com/apache/airflow/pull/35105#discussion_r1368826522 ## airflow/providers/ftp/hooks/ftp.py: ## @@ -213,9 +205,8 @@ def store_file( input_handle = open(local_full_path_or_buffer, "rb") else:

Re: [PR] FTPHook methods should not change working directory [airflow]

2023-10-23 Thread via GitHub
makrushin-evgenii commented on code in PR #35105: URL: https://github.com/apache/airflow/pull/35105#discussion_r1368585748 ## airflow/providers/ftp/hooks/ftp.py: ## @@ -213,9 +205,8 @@ def store_file( input_handle = open(local_full_path_or_buffer, "rb") els

Re: [PR] FTPHook methods should not change working directory [airflow]

2023-10-23 Thread via GitHub
makrushin-evgenii commented on code in PR #35105: URL: https://github.com/apache/airflow/pull/35105#discussion_r1368574855 ## airflow/providers/ftp/hooks/ftp.py: ## @@ -213,9 +205,8 @@ def store_file( input_handle = open(local_full_path_or_buffer, "rb") els

Re: [PR] FTPHook methods should not change working directory [airflow]

2023-10-23 Thread via GitHub
uranusjr commented on code in PR #35105: URL: https://github.com/apache/airflow/pull/35105#discussion_r1368307114 ## airflow/providers/ftp/hooks/ftp.py: ## @@ -213,9 +205,8 @@ def store_file( input_handle = open(local_full_path_or_buffer, "rb") else:

Re: [PR] FTPHook methods should not change working directory [airflow]

2023-10-22 Thread via GitHub
makrushin-evgenii commented on code in PR #35105: URL: https://github.com/apache/airflow/pull/35105#discussion_r1367952109 ## airflow/providers/ftp/hooks/ftp.py: ## @@ -182,10 +185,12 @@ def write_to_file_with_progress(data): callback = output_handle.write

Re: [PR] FTPHook methods should not change working directory [airflow]

2023-10-22 Thread via GitHub
potiuk commented on PR #35105: URL: https://github.com/apache/airflow/pull/35105#issuecomment-1774179104 Much nicer indeed (after fixing static checks). BTW. Highly recommend installing pre-commit, it will even fix your static checks for you automatically. -- This is an automated message

Re: [PR] FTPHook methods should not change working directory [airflow]

2023-10-22 Thread via GitHub
makrushin-evgenii commented on code in PR #35105: URL: https://github.com/apache/airflow/pull/35105#discussion_r1367953107 ## airflow/providers/ftp/hooks/ftp.py: ## @@ -214,8 +219,10 @@ def store_file( else: input_handle = local_full_path_or_buffer

Re: [PR] FTPHook methods should not change working directory [airflow]

2023-10-22 Thread via GitHub
makrushin-evgenii commented on code in PR #35105: URL: https://github.com/apache/airflow/pull/35105#discussion_r1367952109 ## airflow/providers/ftp/hooks/ftp.py: ## @@ -182,10 +185,12 @@ def write_to_file_with_progress(data): callback = output_handle.write

Re: [PR] FTPHook methods should not change working directory [airflow]

2023-10-22 Thread via GitHub
makrushin-evgenii commented on code in PR #35105: URL: https://github.com/apache/airflow/pull/35105#discussion_r1367947149 ## airflow/providers/ftp/hooks/ftp.py: ## @@ -88,9 +90,10 @@ def list_directory(self, path: str) -> list[str]: :param path: full path to the remote

Re: [PR] FTPHook methods should not change working directory [airflow]

2023-10-22 Thread via GitHub
makrushin-evgenii commented on PR #35105: URL: https://github.com/apache/airflow/pull/35105#issuecomment-1774071950 > This should be idone via try/finally I don't seem to understand your proposal. Are you expecting this? ```python remote_path, remote_file_name = os.path.split(re

Re: [PR] FTPHook methods should not change working directory [airflow]

2023-10-22 Thread via GitHub
hussein-awala commented on code in PR #35105: URL: https://github.com/apache/airflow/pull/35105#discussion_r1367884193 ## airflow/providers/ftp/hooks/ftp.py: ## @@ -77,8 +77,10 @@ def describe_directory(self, path: str) -> dict: :param path: full path to the remote dire

Re: [PR] FTPHook methods should not change working directory [airflow]

2023-10-21 Thread via GitHub
potiuk commented on PR #35105: URL: https://github.com/apache/airflow/pull/35105#issuecomment-1773933323 This should be idone via try/finally or (better) following context_manager (and tests shoudl be fixed) -- This is an automated message from the Apache Git Service. To respond to the me

[PR] FTPHook methods should not change working directory [airflow]

2023-10-21 Thread via GitHub
makrushin-evgenii opened a new pull request, #35105: URL: https://github.com/apache/airflow/pull/35105 This methods change current directory. And second call with same directory will raise `no such file or directory` error. So I add `cwd` call to change to origin directory closes: #3