From 167f1c4c973c1f3d11c5543f95ab814b95cad364 Mon Sep 17 00:00:00 2001 From: Hel Gibbons Date: Mon, 10 Mar 2025 15:53:11 +0000 Subject: [PATCH] compatibility changes for microdot 2.x --- examples/cosmic_unicorn/cosmic_paint/cosmic_paint.py | 5 ++--- examples/galactic_unicorn/galactic_paint/galactic_paint.py | 5 ++--- examples/stellar_unicorn/stellar_paint/stellar_paint.py | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/examples/cosmic_unicorn/cosmic_paint/cosmic_paint.py b/examples/cosmic_unicorn/cosmic_paint/cosmic_paint.py index 2c00624..30a17f9 100644 --- a/examples/cosmic_unicorn/cosmic_paint/cosmic_paint.py +++ b/examples/cosmic_unicorn/cosmic_paint/cosmic_paint.py @@ -1,6 +1,5 @@ import os -from microdot_asyncio import Microdot, send_file -from microdot_asyncio_websocket import with_websocket +from microdot import Microdot, send_file, websocket from phew import connect_to_wifi from cosmic import CosmicUnicorn from picographics import PicoGraphics, DISPLAY_COSMIC_UNICORN as DISPLAY @@ -75,7 +74,7 @@ def flood_fill(x, y, r, g, b): @server.route('/paint') -@with_websocket +@websocket.with_websocket async def echo(request, ws): while True: data = await ws.receive() diff --git a/examples/galactic_unicorn/galactic_paint/galactic_paint.py b/examples/galactic_unicorn/galactic_paint/galactic_paint.py index a77ce6c..91e034c 100644 --- a/examples/galactic_unicorn/galactic_paint/galactic_paint.py +++ b/examples/galactic_unicorn/galactic_paint/galactic_paint.py @@ -1,6 +1,5 @@ import os -from microdot_asyncio import Microdot, send_file -from microdot_asyncio_websocket import with_websocket +from microdot import Microdot, send_file, websocket from phew import connect_to_wifi from galactic import GalacticUnicorn from picographics import PicoGraphics, DISPLAY_GALACTIC_UNICORN as DISPLAY @@ -75,7 +74,7 @@ def flood_fill(x, y, r, g, b): @server.route('/paint') -@with_websocket +@websocket.with_websocket async def echo(request, ws): while True: data = await ws.receive() diff --git a/examples/stellar_unicorn/stellar_paint/stellar_paint.py b/examples/stellar_unicorn/stellar_paint/stellar_paint.py index 15d4422..6b72083 100644 --- a/examples/stellar_unicorn/stellar_paint/stellar_paint.py +++ b/examples/stellar_unicorn/stellar_paint/stellar_paint.py @@ -1,6 +1,5 @@ import os -from microdot_asyncio import Microdot, send_file -from microdot_asyncio_websocket import with_websocket +from microdot import Microdot, send_file, websocket from phew import connect_to_wifi from stellar import StellarUnicorn from picographics import PicoGraphics, DISPLAY_STELLAR_UNICORN as DISPLAY @@ -75,7 +74,7 @@ def flood_fill(x, y, r, g, b): @server.route('/paint') -@with_websocket +@websocket.with_websocket async def echo(request, ws): while True: data = await ws.receive()