unrealon 2.0.28__py3-none-any.whl → 2.0.30__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unrealon
3
- Version: 2.0.28
3
+ Version: 2.0.30
4
4
  Summary: Enterprise-grade web scraping platform with AI-powered automation and real-time orchestration capabilities
5
5
  Author-email: UnrealOn Team <team@unrealon.com>
6
6
  License: MIT
@@ -125,17 +125,17 @@ unrealon_driver/managers/threading.py,sha256=djw5cSC99dfBKmep3IJ_8IgxQceMXtNvCp5
125
125
  unrealon_driver/managers/update.py,sha256=-hohVxGXpj5bZ6ZTQN6NH1RK9Pd6GVzCMtu3GS2SdcQ,3582
126
126
  unrealon_driver/utils/__init__.py,sha256=2Sz3eats5q4O2fDmefDuJt8M_zkN6xrS-9xXntWZWFc,168
127
127
  unrealon_driver/utils/time.py,sha256=Oxk1eicKeZl8ZWbf7gu1Ll716k6CpXmVj67FHSnPIsA,184
128
- unrealon_installer/__init__.py,sha256=JxA2hKat5E6R6nt-batuAc-2Cr0nO2M0XW0vOFU_xy0,333
128
+ unrealon_installer/__init__.py,sha256=C07m5dnhmUTOj8DmMNvG7soD55WZvnXdV2YRAvd6ehI,456
129
129
  unrealon_installer/browser_fixes.py,sha256=f67T41e4vfOpDAu1hiDEZ5-BLJ663Bl7oWiHD83rR6E,8081
130
130
  unrealon_installer/core.py,sha256=VvAi7iNBFUrJFUkANQ0gv4tyYCaf-cgtUboXVnrjr50,3826
131
- unrealon_installer/platform.py,sha256=FNZKAtU8xQwK-Jh_8aNQchM_RSu9nXd3bd1ytmLTSS0,3948
131
+ unrealon_installer/platform.py,sha256=40XrpEN7lI1nALK06JF7wJ_fRhl0IQE70crW44KrC5Y,5595
132
132
  unrealon_installer/templates.py,sha256=PBGfKWlrhtd92h2c68RhtXgICATmHkGObRn6nT0e2Jg,1920
133
133
  unrealon_installer/batch_templates/quick_run.bat.j2,sha256=B5_vNI7qbds-uHA3rQGx77cle19wKRgerCDHafLaQwc,554
134
134
  unrealon_installer/batch_templates/start.bat.j2,sha256=_4M-iKJzcVuh7ORkJWcOE7Yd8X7gyCa5FMKwRhyRW2k,6529
135
135
  unrealon_installer/batch_templates/test.bat.j2,sha256=eq_Bj-zN6jUZWLwgzPtYDCr4YbgjseMSIfDPYT5ODFw,1348
136
- unrealon-2.0.28.dist-info/LICENSE,sha256=eEH8mWZW49YMpl4Sh5MtKqkZ8aVTzKQXiNPEnvL14ns,1070
137
- unrealon-2.0.28.dist-info/METADATA,sha256=NHZvMXSGUrNUa-EcuEZaRFc9oCaPdsv239huf84KT3E,15718
138
- unrealon-2.0.28.dist-info/WHEEL,sha256=pL8R0wFFS65tNSRnaOVrsw9EOkOqxLrlUPenUYnJKNo,91
139
- unrealon-2.0.28.dist-info/entry_points.txt,sha256=tBJgozewpyuXznEYIsLwfE1s16VRjy3Wizhuyh26zb4,153
140
- unrealon-2.0.28.dist-info/top_level.txt,sha256=qN6Q72fe4_i8mTOhYcO3fhGa3g4dmBgvZOsqmK4j8D8,66
141
- unrealon-2.0.28.dist-info/RECORD,,
136
+ unrealon-2.0.30.dist-info/LICENSE,sha256=eEH8mWZW49YMpl4Sh5MtKqkZ8aVTzKQXiNPEnvL14ns,1070
137
+ unrealon-2.0.30.dist-info/METADATA,sha256=cBav4tUsDNfGdkExbAr2q5Y6Gz0p02NZjGMxIGey5Xc,15718
138
+ unrealon-2.0.30.dist-info/WHEEL,sha256=pL8R0wFFS65tNSRnaOVrsw9EOkOqxLrlUPenUYnJKNo,91
139
+ unrealon-2.0.30.dist-info/entry_points.txt,sha256=tBJgozewpyuXznEYIsLwfE1s16VRjy3Wizhuyh26zb4,153
140
+ unrealon-2.0.30.dist-info/top_level.txt,sha256=qN6Q72fe4_i8mTOhYcO3fhGa3g4dmBgvZOsqmK4j8D8,66
141
+ unrealon-2.0.30.dist-info/RECORD,,
@@ -6,6 +6,7 @@ One function installs everything. Simple and reliable.
6
6
 
7
7
  from .core import install_parser
8
8
  from .browser_fixes import fix_browsers, diagnose_browsers, get_browser_status
9
+ from .platform import apply_platform_fixes, cleanup_asyncio_resources
9
10
 
10
11
  __version__ = "2.0.0"
11
- __all__ = ["install_parser", "fix_browsers", "diagnose_browsers", "get_browser_status"]
12
+ __all__ = ["install_parser", "fix_browsers", "diagnose_browsers", "get_browser_status", "apply_platform_fixes", "cleanup_asyncio_resources"]
@@ -33,18 +33,26 @@ def _apply_windows_fixes():
33
33
  """Windows-specific fixes."""
34
34
  fixes = []
35
35
 
36
- # Asyncio event loop policy - CRITICAL for Windows
36
+ # AGGRESSIVE Windows asyncio fixes
37
37
  if sys.version_info >= (3, 8):
38
38
  try:
39
+ # Close any existing event loop first
40
+ try:
41
+ current_loop = asyncio.get_event_loop()
42
+ if current_loop and not current_loop.is_closed():
43
+ current_loop.close()
44
+ except Exception:
45
+ pass
46
+
39
47
  # Force ProactorEventLoopPolicy to avoid pipe issues
40
48
  policy = asyncio.WindowsProactorEventLoopPolicy()
41
49
  asyncio.set_event_loop_policy(policy)
42
50
 
43
- # Also set a new event loop to ensure clean state
51
+ # Create and set a completely new event loop
44
52
  loop = asyncio.new_event_loop()
45
53
  asyncio.set_event_loop(loop)
46
54
 
47
- fixes.append("ProactorEventLoop + new loop")
55
+ fixes.append("ProactorEventLoop + clean loop")
48
56
  except Exception as e:
49
57
  logger.warning(f"Failed to set Windows event loop policy: {e}")
50
58
  # Fallback: try to at least set the policy
@@ -63,11 +71,22 @@ def _apply_windows_fixes():
63
71
  except Exception:
64
72
  pass
65
73
 
66
- # Suppress asyncio warnings that are common on Windows
74
+ # AGGRESSIVE warning suppression for Windows
67
75
  warnings.filterwarnings("ignore", category=ResourceWarning)
76
+ warnings.filterwarnings("ignore", category=DeprecationWarning, module="asyncio")
68
77
  warnings.filterwarnings("ignore", message=".*unclosed transport.*")
69
78
  warnings.filterwarnings("ignore", message=".*I/O operation on closed pipe.*")
70
- fixes.append("Windows warnings suppression")
79
+ warnings.filterwarnings("ignore", message=".*unclosed.*")
80
+ warnings.filterwarnings("ignore", message=".*BaseSubprocessTransport.*")
81
+ warnings.filterwarnings("ignore", message=".*ProactorBasePipeTransport.*")
82
+
83
+ # Set asyncio debug mode to False to reduce noise
84
+ try:
85
+ asyncio.get_event_loop().set_debug(False)
86
+ except Exception:
87
+ pass
88
+
89
+ fixes.append("Aggressive Windows warnings suppression")
71
90
 
72
91
  return fixes
73
92
 
@@ -135,3 +154,33 @@ def check_system_requirements():
135
154
  'python_version': sys.version_info >= (3, 9),
136
155
  'platform_supported': platform.system() in ['Windows', 'Darwin', 'Linux']
137
156
  }
157
+
158
+
159
+ def cleanup_asyncio_resources():
160
+ """Force cleanup of all asyncio resources. Call this at program exit on Windows."""
161
+ if platform.system() != "Windows":
162
+ return
163
+
164
+ try:
165
+ # Get current loop and close all pending tasks
166
+ loop = asyncio.get_event_loop()
167
+ if loop and not loop.is_closed():
168
+ # Cancel all pending tasks
169
+ pending = asyncio.all_tasks(loop)
170
+ for task in pending:
171
+ task.cancel()
172
+
173
+ # Wait for tasks to finish cancellation
174
+ if pending:
175
+ loop.run_until_complete(asyncio.gather(*pending, return_exceptions=True))
176
+
177
+ # Close the loop
178
+ loop.close()
179
+
180
+ except Exception:
181
+ # Ignore all cleanup errors
182
+ pass
183
+
184
+ # Force garbage collection to clean up any remaining references
185
+ import gc
186
+ gc.collect()