amoghrajesh commented on code in PR #70130:
URL: https://github.com/apache/airflow/pull/70130#discussion_r3615162643


##########
providers/databricks/tests/conftest.py:
##########
@@ -16,4 +16,18 @@
 # under the License.
 from __future__ import annotations
 
+import os
+import sys
+
+if os.name == "nt":
+    from types import ModuleType
+
+    fcntl_mock = ModuleType("fcntl")
+    fcntl_mock.LOCK_SH = 1
+    fcntl_mock.LOCK_EX = 2
+    fcntl_mock.LOCK_NB = 4
+    fcntl_mock.LOCK_UN = 8
+    fcntl_mock.flock = lambda fd, operation: None
+    sys.modules["fcntl"] = fcntl_mock

Review Comment:
   What does this do?



##########
shared/observability/src/airflow_shared/observability/metrics/stats.py:
##########
@@ -48,7 +48,8 @@ def _reset_backend_after_fork() -> None:
     _backend = None
 
 
-os.register_at_fork(after_in_child=_reset_backend_after_fork)
+if hasattr(os, "register_at_fork"):
+    os.register_at_fork(after_in_child=_reset_backend_after_fork)

Review Comment:
   Same here.



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

Reply via email to