@@ -29,12 +29,12 @@ def safe_print(*args, **kwargs):
2929 Detects non-UTF8 sessions (like cp1252) and strips emojis to prevent mojibake.
3030 """
3131 from omnipkg .i18n import _
32-
32+
3333 # CRITICAL WINDOWS FIX: Force proper output handling
3434 if sys .platform == "win32" :
3535 # Always flush on Windows to prevent buffer corruption
3636 kwargs ["flush" ] = True
37-
37+
3838 # Ensure stdout/stderr are properly flushed before printing
3939 try :
4040 sys .stdout .flush ()
@@ -43,17 +43,17 @@ def safe_print(*args, **kwargs):
4343 pass
4444 elif "flush" not in kwargs :
4545 kwargs ["flush" ] = True
46-
46+
4747 try :
4848 _builtin_print (* args , ** kwargs )
49-
49+
5050 # CRITICAL: Force additional flush on Windows after print
5151 if sys .platform == "win32" :
5252 try :
5353 sys .stdout .flush ()
5454 except :
5555 pass
56-
56+
5757 except UnicodeEncodeError :
5858 try :
5959 safe_args = []
@@ -76,14 +76,14 @@ def safe_print(*args, **kwargs):
7676 else :
7777 safe_args .append (arg )
7878 _builtin_print (* safe_args , ** kwargs )
79-
79+
8080 # CRITICAL: Force flush after fallback print too
8181 if sys .platform == "win32" :
8282 try :
8383 sys .stdout .flush ()
8484 except :
8585 pass
86-
86+
8787 except Exception :
8888 _builtin_print ("[omnipkg: Encoding Error - Shell might not support UTF-8]" , flush = True )
8989 if sys .platform == "win32" :
@@ -374,7 +374,7 @@ class ProcessCorruptedException(Exception):
374374
375375class UVFailureDetector :
376376 """Detects UV dependency resolution failures."""
377-
377+
378378 FAILURE_PATTERNS = [
379379 "No solution found when resolving dependencies" ,
380380 "ResolutionImpossible" ,
0 commit comments