SledgeHammer01 commented on PR #41073: URL: https://github.com/apache/airflow/pull/41073#issuecomment-2254873962
> Instead of having a giant try-except block, it would be much preferred to do a short feature detection before hand, and run one of the options depending on the detection result. I'm not quite sure what you mean. Can you explain further? Basically, the issue is known unreliability with `TemporaryDirectory` under Windows which occurs within the context of `contextLib::stack`. All the code for POSIX/Windows is 100% identical (except for `preexec_fn` not being supported on Windows. `TemporaryDirectory` tear down doesn't occur until the context exits and the context tear down occurs and that's when the exception occurs on Windows. And all the logic for the method occurs inside of the context which is basically the enter/exit of `Popen`. Also, PLEASE keep in mind, that the reason for so many commits on a "trivial" fix is because we're limited to Python 3.8. If you check the earlier commits, there ARE slightly nicer ways to do this, but unfortunately, those are not supported until Python 3.10+. Are you suggesting to essentially write a `run_command_posix` and a `run_command_windows` that's a 100% copy & paste except for the retry loop? I did consider that, but personally ruled it out as a maintenance headache. People who want to run Airflow on Windows is a small community and thus Windows support is a low priority. Having two versions would mean people would have to update test / both versions. -- 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]
