fastled 1.2.45__py3-none-any.whl → 1.2.47__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/__init__.py CHANGED
@@ -13,7 +13,7 @@ from .types import BuildMode, CompileResult, CompileServerError
13
13
  # IMPORTANT! There's a bug in github which will REJECT any version update
14
14
  # that has any other change in the repo. Please bump the version as the
15
15
  # ONLY change in a commit, or else the pypi update and the release will fail.
16
- __version__ = "1.2.45"
16
+ __version__ = "1.2.47"
17
17
 
18
18
  DOCKER_FILE = (
19
19
  "https://raw.githubusercontent.com/zackees/fastled-wasm/refs/heads/main/Dockerfile"
@@ -211,7 +211,6 @@ class Test:
211
211
  __all__ = [
212
212
  "Api",
213
213
  "Test",
214
- "Build",
215
214
  "CompileServer",
216
215
  "CompileResult",
217
216
  "CompileServerError",
fastled/docker_manager.py CHANGED
@@ -18,6 +18,7 @@ import docker
18
18
  from appdirs import user_data_dir
19
19
  from disklru import DiskLRUCache
20
20
  from docker.client import DockerClient
21
+ from docker.errors import DockerException, NotFound
21
22
  from docker.models.containers import Container
22
23
  from docker.models.images import Image
23
24
  from filelock import FileLock
@@ -57,7 +58,9 @@ def get_lock(image_name: str) -> FileLock:
57
58
  print(CONFIG_DIR)
58
59
  if not lock_file.parent.exists():
59
60
  lock_file.parent.mkdir(parents=True, exist_ok=True)
60
- return FileLock(str(lock_file))
61
+ out: FileLock
62
+ out = FileLock(str(lock_file)) # type: ignore
63
+ return out
61
64
 
62
65
 
63
66
  class RunningContainer:
@@ -181,10 +184,6 @@ class DockerManager:
181
184
  )
182
185
  return False
183
186
 
184
- except subprocess.CalledProcessError as e:
185
- print(f"Error occurred: {e}")
186
- return False
187
-
188
187
  except subprocess.CalledProcessError as e:
189
188
  print(f"Failed to switch to Linux containers: {e}")
190
189
  if e.stdout:
@@ -199,6 +198,7 @@ class DockerManager:
199
198
  @staticmethod
200
199
  def is_running() -> bool:
201
200
  """Check if Docker is running by pinging the Docker daemon."""
201
+
202
202
  if not DockerManager.is_docker_installed():
203
203
  return False
204
204
  try:
@@ -207,7 +207,7 @@ class DockerManager:
207
207
  client.ping()
208
208
  print("Docker is running.")
209
209
  return True
210
- except docker.errors.DockerException as e:
210
+ except DockerException as e:
211
211
  print(f"Docker is not running: {str(e)}")
212
212
  return False
213
213
  except Exception as e:
@@ -289,8 +289,10 @@ class DockerManager:
289
289
  remote_image_hash = remote_image.id
290
290
 
291
291
  try:
292
+ local_image_id = local_image.id
293
+ assert local_image_id is not None
292
294
  remote_image_hash_from_local_image = DISK_CACHE.get(
293
- local_image.id
295
+ local_image_id
294
296
  )
295
297
  except KeyboardInterrupt:
296
298
  raise
@@ -455,14 +457,14 @@ class DockerManager:
455
457
  if remove_previous:
456
458
  print(f"Removing existing container {container_name}...")
457
459
  container.remove(force=True)
458
- raise docker.errors.NotFound("Container removed due to remove_previous")
460
+ raise NotFound("Container removed due to remove_previous")
459
461
  # Check if configuration matches
460
462
  elif not self._container_configs_match(container, command, volumes, ports):
461
463
  print(
462
464
  f"Container {container_name} exists but with different configuration. Removing and recreating..."
463
465
  )
464
466
  container.remove(force=True)
465
- raise docker.errors.NotFound("Container removed due to config mismatch")
467
+ raise NotFound("Container removed due to config mismatch")
466
468
  print(f"Container {container_name} found with matching configuration.")
467
469
 
468
470
  # Existing container with matching config - handle various states
@@ -492,7 +494,7 @@ class DockerManager:
492
494
  print(f"Starting existing container {container_name}.")
493
495
  self.first_run = True
494
496
  container.start()
495
- except docker.errors.NotFound:
497
+ except NotFound:
496
498
  print(f"Creating and starting {container_name}")
497
499
  out_msg = f"# Running in container: {command}"
498
500
  msg_len = len(out_msg)
@@ -524,7 +526,7 @@ class DockerManager:
524
526
  try:
525
527
  container: Container = self.client.containers.get(container_name)
526
528
  container.remove(force=True)
527
- except docker.errors.NotFound:
529
+ except NotFound:
528
530
  pass
529
531
  start_time = time.time()
530
532
  try:
@@ -615,7 +617,7 @@ class DockerManager:
615
617
  """
616
618
  try:
617
619
  return self.client.containers.get(container_name)
618
- except docker.errors.NotFound:
620
+ except NotFound:
619
621
  return None
620
622
 
621
623
  def is_container_running(self, container_name: str) -> bool:
@@ -625,7 +627,7 @@ class DockerManager:
625
627
  try:
626
628
  container = self.client.containers.get(container_name)
627
629
  return container.status == "running"
628
- except docker.errors.NotFound:
630
+ except NotFound:
629
631
  print(f"Container {container_name} not found.")
630
632
  return False
631
633
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: fastled
3
- Version: 1.2.45
3
+ Version: 1.2.47
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -294,7 +294,6 @@ A: `delay()` will block `loop()` which blocks the main thread of the browser. Th
294
294
  Q: How can I get the compiled size of my FastLED sketch smaller?
295
295
  A: A big chunk of space is being used by unnecessary javascript `emscripten` bundling. The wasm_compiler_settings.py file in the FastLED repo can tweak this.
296
296
 
297
-
298
297
  # Revisions
299
298
 
300
299
  * 1.2.31 - Bunch of fixes and ease of use while compiling code in the repo.
@@ -1,10 +1,10 @@
1
- fastled/__init__.py,sha256=vc-7xbETDyY_73bU9OqZ1Iv61JJy6QWjpfyv8JaCfO4,6747
1
+ fastled/__init__.py,sha256=U3Gw3jcI7Y0q5FfZWerEW7YIlRROxHenWMV-iR4ospY,6734
2
2
  fastled/app.py,sha256=BrkBKyDjvWR-zn6T0k7OV-Y9mosS6IH40WcfZ1ZacUY,3982
3
3
  fastled/cli.py,sha256=FjVr31ht0UPlAcmX-84NwfAGMQHTkrCe4o744jCAxiw,375
4
4
  fastled/client_server.py,sha256=Q_-ALIbp474gY1zkYHoaU36eVSIa87nRcSB6IZOoaCg,14315
5
5
  fastled/compile_server.py,sha256=ul3eiZNX2wwmInooo3PJC3_kNpdejYVDIo94G3sV9HQ,2941
6
6
  fastled/compile_server_impl.py,sha256=xhC7WBlIfvghgpxAP8VwBeM13NuTA99cI47prODW-IU,9927
7
- fastled/docker_manager.py,sha256=U_ESwZ32btC0Y-83m5V7d11HBHw2IH0RmoYw9ips8BA,30055
7
+ fastled/docker_manager.py,sha256=10ZBypMerNJajccUZA6Xrow4UR_apT-QoyZLzZaBxcQ,30053
8
8
  fastled/filewatcher.py,sha256=XjFTo6NvEaosGTPr2Uhj91aqmtFdYHzJfxPzjBTMkKA,7086
9
9
  fastled/interactive_srcs.py,sha256=F5nHdJc60xsnmOtnKhngE9JytqGn56PmYw_MVSIX1ac,138
10
10
  fastled/keyboard.py,sha256=vyYxE98WCXjvMpcUJd0YXPVvt7TzvBmifLYI-K7jtKg,3524
@@ -26,9 +26,9 @@ fastled/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8,54
26
26
  fastled/site/build.py,sha256=l4RajIk0bApiAifT1lyLjIZi9lpPtSba4cnwWP5UOKc,14064
27
27
  fastled/test/can_run_local_docker_tests.py,sha256=LEuUbHctRhNNFWcvnz2kEGmjDJeXO4c3kNpizm3yVJs,400
28
28
  fastled/test/examples.py,sha256=GfaHeY1E8izBl6ZqDVjz--RHLyVR4NRnQ5pBesCFJFY,1673
29
- fastled-1.2.45.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
30
- fastled-1.2.45.dist-info/METADATA,sha256=UK3u_lWB3RzmNN_WpgdUJ3A_pFoRiarYJXgCNpQGgBY,21263
31
- fastled-1.2.45.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
32
- fastled-1.2.45.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
33
- fastled-1.2.45.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
34
- fastled-1.2.45.dist-info/RECORD,,
29
+ fastled-1.2.47.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
30
+ fastled-1.2.47.dist-info/METADATA,sha256=XfgT7ScSqJJk6sNGn4ej6C8i9pDyVqyBRGCio7Zii1A,21262
31
+ fastled-1.2.47.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
32
+ fastled-1.2.47.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
33
+ fastled-1.2.47.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
34
+ fastled-1.2.47.dist-info/RECORD,,