fastled 1.4.27__py3-none-any.whl → 1.4.29__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 +57 -15
- {fastled-1.4.27.dist-info → fastled-1.4.29.dist-info}/METADATA +1 -1
- {fastled-1.4.27.dist-info → fastled-1.4.29.dist-info}/RECORD +9 -9
- {fastled-1.4.27.dist-info → fastled-1.4.29.dist-info}/WHEEL +0 -0
- {fastled-1.4.27.dist-info → fastled-1.4.29.dist-info}/entry_points.txt +0 -0
- {fastled-1.4.27.dist-info → fastled-1.4.29.dist-info}/licenses/LICENSE +0 -0
- {fastled-1.4.27.dist-info → fastled-1.4.29.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.29"
|
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,48 @@ 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
|
-
)
|
385
|
-
|
386
|
-
|
387
|
-
|
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:
|
400
|
+
if browser_definitely_closed:
|
401
|
+
print(
|
402
|
+
f'[PYTHON] Browser has been closed because "{error_message}" matched one of the error phrases or browser state indicates closed, shutting down gracefully...'
|
403
|
+
)
|
404
|
+
elif browser_state_indicates_closed:
|
405
|
+
print(
|
406
|
+
"[PYTHON] Browser state indicates closed, shutting down gracefully..."
|
407
|
+
)
|
388
408
|
self._should_exit.set()
|
389
409
|
break
|
390
410
|
else:
|
391
|
-
|
411
|
+
# For other errors, just log and continue - don't shut down
|
412
|
+
print(f"[PYTHON] Recoverable error in browser tracking: {e}")
|
413
|
+
# Add a small delay to prevent tight error loops
|
414
|
+
await asyncio.sleep(1.0)
|
392
415
|
continue
|
393
416
|
|
394
417
|
async def wait_for_close(self) -> None:
|
@@ -428,12 +451,31 @@ class PlaywrightBrowser:
|
|
428
451
|
self.browser = None
|
429
452
|
|
430
453
|
if self.playwright:
|
431
|
-
|
432
|
-
|
454
|
+
# The playwright context manager may not have a stop() method in all versions
|
455
|
+
# Try stop() first, fall back to __aexit__ if needed
|
456
|
+
try:
|
457
|
+
if hasattr(self.playwright, "stop"):
|
458
|
+
await self.playwright.stop()
|
459
|
+
else:
|
460
|
+
# For async context managers, use __aexit__
|
461
|
+
await self.playwright.__aexit__(None, None, None)
|
462
|
+
except Exception as stop_error:
|
463
|
+
print(
|
464
|
+
f"[PYTHON] Warning: Could not properly stop playwright: {stop_error}"
|
465
|
+
)
|
466
|
+
# Try alternative cleanup methods
|
467
|
+
try:
|
468
|
+
if hasattr(self.playwright, "__aexit__"):
|
469
|
+
await self.playwright.__aexit__(None, None, None)
|
470
|
+
except Exception:
|
471
|
+
pass # Ignore secondary cleanup failures
|
472
|
+
finally:
|
473
|
+
self.playwright = None
|
433
474
|
except KeyboardInterrupt:
|
434
475
|
print("[PYTHON] Keyboard interrupt detected, closing Playwright browser")
|
435
476
|
self._should_exit.set()
|
436
477
|
import _thread
|
478
|
+
|
437
479
|
_thread.interrupt_main()
|
438
480
|
except Exception as e:
|
439
481
|
print(f"[PYTHON] Error closing Playwright browser: {e}")
|
@@ -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=BhMJ4-HBEDFT1L33HMiHtXnXxXsyzCwgIwkSRBEmt2g,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=XZsL66wZETiRAdRPpJQE29j2Awy1EReJCPoAy-8H4qs,30713
|
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.29.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
|
46
|
+
fastled-1.4.29.dist-info/METADATA,sha256=tu9nTnfgfRUHAN7XM_mCtji7aMD2oX7Uuf8agWa03oI,32441
|
47
|
+
fastled-1.4.29.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
48
|
+
fastled-1.4.29.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
|
49
|
+
fastled-1.4.29.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
|
50
|
+
fastled-1.4.29.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|