fastled 1.4.26__py3-none-any.whl → 1.4.28__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.
- fastled/__version__.py +1 -1
- fastled/client_server.py +1 -1
- fastled/playwright/playwright_browser.py +69 -23
- {fastled-1.4.26.dist-info → fastled-1.4.28.dist-info}/METADATA +1 -1
- {fastled-1.4.26.dist-info → fastled-1.4.28.dist-info}/RECORD +9 -9
- {fastled-1.4.26.dist-info → fastled-1.4.28.dist-info}/WHEEL +0 -0
- {fastled-1.4.26.dist-info → fastled-1.4.28.dist-info}/entry_points.txt +0 -0
- {fastled-1.4.26.dist-info → fastled-1.4.28.dist-info}/licenses/LICENSE +0 -0
- {fastled-1.4.26.dist-info → fastled-1.4.28.dist-info}/top_level.txt +0 -0
fastled/__version__.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# IMPORTANT! There's a bug in github which will REJECT any version update
|
2
2
|
# that has any other change in the repo. Please bump the version as the
|
3
3
|
# ONLY change in a commit, or else the pypi update and the release will fail.
|
4
|
-
__version__ = "1.4.
|
4
|
+
__version__ = "1.4.28"
|
5
5
|
|
6
6
|
__version_url_latest__ = "https://raw.githubusercontent.com/zackees/fastled-wasm/refs/heads/main/src/fastled/__version__.py"
|
fastled/client_server.py
CHANGED
@@ -100,7 +100,7 @@ def _run_web_compiler(
|
|
100
100
|
|
101
101
|
# Guard: libfastled compilation requires volume source mapping
|
102
102
|
if not allow_libcompile:
|
103
|
-
print("⚠️ libfastled compilation disabled
|
103
|
+
print("⚠️ libfastled compilation disabled.")
|
104
104
|
|
105
105
|
start = time.time()
|
106
106
|
web_result = web_compile(
|
@@ -370,25 +370,43 @@ class PlaywrightBrowser:
|
|
370
370
|
|
371
371
|
except Exception as e:
|
372
372
|
error_message = str(e)
|
373
|
-
#
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
"context",
|
373
|
+
# Be EXTREMELY conservative about browser close detection
|
374
|
+
# Only trigger shutdown on very specific errors that definitively indicate browser closure
|
375
|
+
browser_definitely_closed = any(
|
376
|
+
phrase in error_message.lower()
|
377
|
+
for phrase in [
|
379
378
|
"browser has been closed",
|
380
|
-
"page.evaluate",
|
381
|
-
"browser closed",
|
382
379
|
"target closed",
|
380
|
+
"connection closed",
|
381
|
+
"target page, probably because the page has been closed",
|
382
|
+
"execution context was destroyed",
|
383
|
+
"page has been closed",
|
384
|
+
"browser context has been closed",
|
383
385
|
]
|
384
|
-
)
|
386
|
+
)
|
387
|
+
|
388
|
+
# Also check actual browser state before deciding to shut down
|
389
|
+
browser_state_indicates_closed = False
|
390
|
+
try:
|
391
|
+
if self.browser and hasattr(self.browser, "is_closed"):
|
392
|
+
browser_state_indicates_closed = self.browser.is_closed()
|
393
|
+
elif self.context and hasattr(self.context, "closed"):
|
394
|
+
browser_state_indicates_closed = self.context.closed
|
395
|
+
except Exception:
|
396
|
+
# If we can't check the state, don't assume it's closed
|
397
|
+
browser_state_indicates_closed = False
|
398
|
+
|
399
|
+
if browser_definitely_closed or browser_state_indicates_closed:
|
385
400
|
print(
|
386
|
-
"[PYTHON] Browser has been closed, shutting down gracefully..."
|
401
|
+
f"[PYTHON] Browser has been closed because {error_message} matched one of the error phrases, shutting down gracefully..."
|
387
402
|
)
|
388
403
|
self._should_exit.set()
|
389
404
|
break
|
390
405
|
else:
|
391
|
-
|
406
|
+
# For other errors, just log and continue - don't shut down
|
407
|
+
print(f"[PYTHON] Recoverable error in browser tracking: {e}")
|
408
|
+
# Add a small delay to prevent tight error loops
|
409
|
+
await asyncio.sleep(1.0)
|
392
410
|
continue
|
393
411
|
|
394
412
|
async def wait_for_close(self) -> None:
|
@@ -413,21 +431,49 @@ class PlaywrightBrowser:
|
|
413
431
|
# Signal all tracking loops to exit
|
414
432
|
self._should_exit.set()
|
415
433
|
|
416
|
-
|
417
|
-
await self.page.close()
|
418
|
-
self.page = None
|
434
|
+
try:
|
419
435
|
|
420
|
-
|
421
|
-
|
422
|
-
|
436
|
+
if self.page:
|
437
|
+
await self.page.close()
|
438
|
+
self.page = None
|
439
|
+
|
440
|
+
if self.context:
|
441
|
+
await self.context.close()
|
442
|
+
self.context = None
|
423
443
|
|
424
|
-
|
425
|
-
|
426
|
-
|
444
|
+
if self.browser:
|
445
|
+
await self.browser.close()
|
446
|
+
self.browser = None
|
427
447
|
|
428
|
-
|
429
|
-
|
430
|
-
|
448
|
+
if self.playwright:
|
449
|
+
# The playwright context manager may not have a stop() method in all versions
|
450
|
+
# Try stop() first, fall back to __aexit__ if needed
|
451
|
+
try:
|
452
|
+
if hasattr(self.playwright, "stop"):
|
453
|
+
await self.playwright.stop()
|
454
|
+
else:
|
455
|
+
# For async context managers, use __aexit__
|
456
|
+
await self.playwright.__aexit__(None, None, None)
|
457
|
+
except Exception as stop_error:
|
458
|
+
print(
|
459
|
+
f"[PYTHON] Warning: Could not properly stop playwright: {stop_error}"
|
460
|
+
)
|
461
|
+
# Try alternative cleanup methods
|
462
|
+
try:
|
463
|
+
if hasattr(self.playwright, "__aexit__"):
|
464
|
+
await self.playwright.__aexit__(None, None, None)
|
465
|
+
except Exception:
|
466
|
+
pass # Ignore secondary cleanup failures
|
467
|
+
finally:
|
468
|
+
self.playwright = None
|
469
|
+
except KeyboardInterrupt:
|
470
|
+
print("[PYTHON] Keyboard interrupt detected, closing Playwright browser")
|
471
|
+
self._should_exit.set()
|
472
|
+
import _thread
|
473
|
+
|
474
|
+
_thread.interrupt_main()
|
475
|
+
except Exception as e:
|
476
|
+
print(f"[PYTHON] Error closing Playwright browser: {e}")
|
431
477
|
|
432
478
|
|
433
479
|
def run_playwright_browser(
|
@@ -1,12 +1,12 @@
|
|
1
1
|
fastled/__init__.py,sha256=dahiY41HLLotTjqmpVJmXSwUEp8NKqoZ57jt55hBLa4,7667
|
2
2
|
fastled/__main__.py,sha256=OcKv2ER1_iQAsZzLIUb3C8hRC9L2clNOhCrjpshrlf4,336
|
3
|
-
fastled/__version__.py,sha256=
|
3
|
+
fastled/__version__.py,sha256=R_jBeip2SPph7BQvvpbR7NbckrhbipPZ6J0JSt0t0rs,373
|
4
4
|
fastled/app.py,sha256=yZP_UbLLyteBkiYJQQLvqHmH14xwrayGKbL7jtjY6g4,6225
|
5
5
|
fastled/args.py,sha256=uYNM4ALYaB6vj4q4ypfvrgK7tNCEgvC_MBAyGyIeEx8,3885
|
6
6
|
fastled/cli.py,sha256=drgR2AOxVrj3QEz58iiKscYAumbbin2vIV-k91VCOAA,561
|
7
7
|
fastled/cli_test.py,sha256=W-1nODZrip_JU6BEbYhxOa4ckxduOsiX8zIoRkTyxv4,550
|
8
8
|
fastled/cli_test_interactive.py,sha256=BjNhveZOk5aCffHbcrxPQQjWmAuj4ClVKKcKX5eY6yM,542
|
9
|
-
fastled/client_server.py,sha256=
|
9
|
+
fastled/client_server.py,sha256=uGUZkK8Qvw_Y5sPQ6j1OYMrlb7zbmPYk547yYxum70c,23097
|
10
10
|
fastled/compile_server.py,sha256=iGUjteXKp5Dlp7mxAE4eD4s0NWgApRIp4ZjtcAN2iZY,3124
|
11
11
|
fastled/compile_server_impl.py,sha256=iCwNCs7YxypUuVPmY4979mOgoH9OiuAJa1a1bmpG1cc,12567
|
12
12
|
fastled/docker_manager.py,sha256=c0-DBA4_YtCl2XgtohL6uKtW0TK6vkHO0o2vympZShg,41089
|
@@ -37,14 +37,14 @@ fastled/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8,54
|
|
37
37
|
fastled/assets/localhost-key.pem,sha256=Q-CNO_UoOd8fFNN4ljcnqwUeCMhzTplRjLO2x0pYRlU,1704
|
38
38
|
fastled/assets/localhost.pem,sha256=QTwUtTwjYWbm9m3pHW2IlK2nFZJ8b0pppxPjhgVZqQo,1619
|
39
39
|
fastled/playwright/chrome_extension_downloader.py,sha256=48YyQrsuK1TVXPuAvRGzqkQJnx0991Ka6OVUo1A58zU,7079
|
40
|
-
fastled/playwright/playwright_browser.py,sha256=
|
40
|
+
fastled/playwright/playwright_browser.py,sha256=xAM0A5IkegDdwkzQBENhCvuckiemW4h3s8qx9Yjq61Y,30400
|
41
41
|
fastled/site/build.py,sha256=2YKU_UWKlJdGnjdbAbaL0co6kceFMSTVYwH1KCmgPZA,13987
|
42
42
|
fastled/site/examples.py,sha256=s6vj2zJc6BfKlnbwXr1QWY1mzuDBMt6j5MEBOWjO_U8,155
|
43
43
|
fastled/test/can_run_local_docker_tests.py,sha256=LEuUbHctRhNNFWcvnz2kEGmjDJeXO4c3kNpizm3yVJs,400
|
44
44
|
fastled/test/examples.py,sha256=GfaHeY1E8izBl6ZqDVjz--RHLyVR4NRnQ5pBesCFJFY,1673
|
45
|
-
fastled-1.4.
|
46
|
-
fastled-1.4.
|
47
|
-
fastled-1.4.
|
48
|
-
fastled-1.4.
|
49
|
-
fastled-1.4.
|
50
|
-
fastled-1.4.
|
45
|
+
fastled-1.4.28.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
|
46
|
+
fastled-1.4.28.dist-info/METADATA,sha256=oSBhYFJIEPFqWN5jX_OgJGtzFWUCSjZ-UANtpexSyDw,32441
|
47
|
+
fastled-1.4.28.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
48
|
+
fastled-1.4.28.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
|
49
|
+
fastled-1.4.28.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
|
50
|
+
fastled-1.4.28.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|