From bdc28356603ae869d846026b752963f5a920bd72 Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Tue, 10 Nov 2026 23:28:21 -0600 Subject: [PATCH] PyScript template: pydevices v0.7.9, with the web canvas and input files The template fetched pydevices v0.7.0, so it missed the multimer dispatch and Web Audio fixes in v0.7.9. pyscript.json now reads every file from v0.7.9. psdisplay there imports displaydev/_webcanvas.py and _webinput.py, and the Web Audio module imports audiodev/bytequeue.py, so all three are added to the file list. I served the page in Playwright's Chromium: PyScript starts, the status line reads "Running displaydev in Pyodide. Click the canvas to paint.", the three new files and psdisplay are fetched from v0.7.9, and nothing is requested from v0.7.0. The unit tests pass with the URL check moved to v0.7.9. --- pyscript.json | 47 ++++++++++++++++++++++-------------------- tests/test_template.py | 2 +- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/pyscript.json b/pyscript.json index 59a30ff..384d58c 100644 --- a/pyscript.json +++ b/pyscript.json @@ -1,26 +1,29 @@ { "files": { - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/events.py": "./events.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/keys.py": "./keys.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/boarddev.py": "./boarddev.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/displaydev/__init__.py": "./displaydev/__init__.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/displaydev/_domkeys.py": "./displaydev/_domkeys.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/displaydev/_desktop.py": "./displaydev/_desktop.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/displaydev/psdisplay.py": "./displaydev/psdisplay.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/board_configs/psdisplay/board_config.py": "./board_config.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/board_configs/psdisplay/board_peripherals.py": "./board_peripherals.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/audiodev/__init__.py": "./audiodev/__init__.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/audiodev/web_audio.py": "./audiodev/web_audio.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/audiodev/accel.py": "./audiodev/accel.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/appdev/__init__.py": "./appdev/__init__.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/appdev/app.py": "./appdev/app.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/appdev/devices.py": "./appdev/devices.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/multimer/__init__.py": "./multimer/__init__.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/multimer/_asyncio_loader.py": "./multimer/_asyncio_loader.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/multimer/_dispatch.py": "./multimer/_dispatch.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/multimer/_hostloop.py": "./multimer/_hostloop.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/multimer/_inputhook.py": "./multimer/_inputhook.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/multimer/_src_asyncio.py": "./multimer/_src_asyncio.py", - "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.0/lib/multimer/_ticks.py": "./multimer/_ticks.py" + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/events.py": "./events.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/keys.py": "./keys.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/boarddev.py": "./boarddev.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/displaydev/__init__.py": "./displaydev/__init__.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/displaydev/_domkeys.py": "./displaydev/_domkeys.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/displaydev/_webcanvas.py": "./displaydev/_webcanvas.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/displaydev/_webinput.py": "./displaydev/_webinput.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/displaydev/_desktop.py": "./displaydev/_desktop.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/displaydev/psdisplay.py": "./displaydev/psdisplay.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/board_configs/psdisplay/board_config.py": "./board_config.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/board_configs/psdisplay/board_peripherals.py": "./board_peripherals.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/audiodev/__init__.py": "./audiodev/__init__.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/audiodev/web_audio.py": "./audiodev/web_audio.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/audiodev/bytequeue.py": "./audiodev/bytequeue.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/audiodev/accel.py": "./audiodev/accel.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/appdev/__init__.py": "./appdev/__init__.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/appdev/app.py": "./appdev/app.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/appdev/devices.py": "./appdev/devices.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/multimer/__init__.py": "./multimer/__init__.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/multimer/_asyncio_loader.py": "./multimer/_asyncio_loader.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/multimer/_dispatch.py": "./multimer/_dispatch.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/multimer/_hostloop.py": "./multimer/_hostloop.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/multimer/_inputhook.py": "./multimer/_inputhook.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/multimer/_src_asyncio.py": "./multimer/_src_asyncio.py", + "https://raw.githubusercontent.com/PyDevices/pydevices/v0.7.9/lib/multimer/_ticks.py": "./multimer/_ticks.py" } } diff --git a/tests/test_template.py b/tests/test_template.py index 5f97561..0736ada 100644 --- a/tests/test_template.py +++ b/tests/test_template.py @@ -57,7 +57,7 @@ def test_product_sources_are_pinned_to_canonical_repo(self): config = json.loads((ROOT / "pyscript.json").read_text(encoding="utf-8")) urls = tuple(config["files"]) self.assertTrue(urls) - self.assertTrue(all("PyDevices/pydevices/v0.7.0/" in url for url in urls)) + self.assertTrue(all("PyDevices/pydevices/v0.7.9/" in url for url in urls)) self.assertIn("./boarddev.py", config["files"].values()) self.assertIn("./appdev/__init__.py", config["files"].values()) # psdisplay's board_peripherals imports audiodev at module level