You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[v3-1-test] Fix: Prevent AttributeError crash in prek when run inside container (#57497) (#57649)
* Revert virtualenv connections/variables access and logging as test are failing
Revert virtualenv connections/variables access and logging as tests are failing in https://github.com/apache/airflow/actions/runs/18896380254. The issue here is that it's a socket initialisation error that occurs when CommsDecoder tries to create a socket from stdin (file descriptor 0) in subprocess environments where stdin is not a socket.
This reverts commit fb8b590 (PR #57213) which allowed virtualenv code to access connections/variables and send logs via supervisor comms reinitialization.
* Address review: Use built-in print as fallback
---------
(cherry picked from commit 5002660)
Co-authored-by: Gurram Sai Ganesh <[email protected]>
Co-authored-by: Ankit Chaurasia <[email protected]>
"[info]Running mypy with --warn-unused-ignores to display unused ignores, unset environment variable: SHOW_UNUSED_MYPY_WARNINGS to runoff this behaviour"
142
-
)
150
+
ifconsole:
151
+
console.print(
152
+
"[info]Running mypy with --warn-unused-ignores to display unused ignores, unset environment variable: SHOW_UNUSED_MYPY_WARNINGS to runoff this behaviour"
153
+
)
154
+
else:
155
+
print(
156
+
"info: Running mypy with --warn-unused-ignores to display unused ignores, unset environment variable: SHOW_UNUSED_MYPY_WARNINGS to runoff this behaviour"
157
+
)
143
158
mypy_cmd_parts.append("--warn-unused-ignores")
144
-
145
159
ifshow_unreachable_warnings=="true":
146
-
console.print(
147
-
"[info]Running mypy with --warn-unreachable to display unreachable code, unset environment variable: SHOW_UNREACHABLE_MYPY_WARNINGS to runoff this behaviour"
148
-
)
160
+
ifconsole:
161
+
console.print(
162
+
"[info]Running mypy with --warn-unreachable to display unreachable code, unset environment variable: SHOW_UNREACHABLE_MYPY_WARNINGS to runoff this behaviour"
163
+
)
164
+
else:
165
+
print(
166
+
"info: Running mypy with --warn-unreachable to display unreachable code, unset environment variable: SHOW_UNREACHABLE_MYPY_WARNINGS to runoff this behaviour"
0 commit comments