Skip to content

Commit f04fb06

Browse files
committed
Bump to version 2026.1.1 and carefully re-check the new example apps.
1 parent e228dc7 commit f04fb06

File tree

25 files changed

+76
-60
lines changed

25 files changed

+76
-60
lines changed

docs/beginning-pyscript.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ module, and a `<link>` to some PyScript specific CSS, in the document's
118118
<meta charset="utf-8" />
119119
<meta name="viewport" content="width=device-width,initial-scale=1" />
120120
<title>🦜 Polyglot - Piratical PyScript</title>
121-
<link rel="stylesheet" href="https://pyscript.net/releases/2025.11.2/core.css">
122-
<script type="module" src="https://pyscript.net/releases/2025.11.2/core.js"></script>
121+
<link rel="stylesheet" href="https://pyscript.net/releases/2026.1.1/core.css">
122+
<script type="module" src="https://pyscript.net/releases/2026.1.1/core.js"></script>
123123
</head>
124124
<body>
125125

@@ -165,8 +165,8 @@ In the end, our HTML should look like this:
165165
<meta charset="utf-8" />
166166
<meta name="viewport" content="width=device-width,initial-scale=1" />
167167
<title>🦜 Polyglot - Piratical PyScript</title>
168-
<link rel="stylesheet" href="https://pyscript.net/releases/2025.11.2/core.css">
169-
<script type="module" src="https://pyscript.net/releases/2025.11.2/core.js"></script>
168+
<link rel="stylesheet" href="https://pyscript.net/releases/2026.1.1/core.css">
169+
<script type="module" src="https://pyscript.net/releases/2026.1.1/core.js"></script>
170170
</head>
171171
<body>
172172
<h1>Polyglot 🦜 💬 🇬🇧 ➡️ 🏴‍☠️</h1>
@@ -308,7 +308,7 @@ To run PyScript offline, without the need of a CDN or internet connection, read
308308
the [offline guide](user-guide/offline.md) section of the user guide.
309309

310310
We also provide an `offline.zip` file with
311-
[each release](https://pyscript.net/releases/2025.11.2/). This file contains
311+
[each release](https://pyscript.net/releases/2026.1.1/). This file contains
312312
everything you need for an offline version of PyScript: PyScript itself,
313313
versions of Pyodide and MicroPython, and an index.html page from which you
314314
could create your offline-first PyScript work.

docs/example-apps/bouncing-ball/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width,initial-scale=1.0">
66
<title>PyGame-CE Bouncing Ball</title>
7-
<link rel="stylesheet" href="https://pyscript.net/releases/2025.11.2/core.css">
8-
<script type="module" src="https://pyscript.net/releases/2025.11.2/core.js"></script>
7+
<link rel="stylesheet" href="https://pyscript.net/releases/2026.1.1/core.css">
8+
<script type="module" src="https://pyscript.net/releases/2026.1.1/core.js"></script>
99
<style>
1010
body {
1111
font-family: system-ui, sans-serif;

docs/example-apps/colour-picker/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width,initial-scale=1" />
66
<title>Interactive Colour Picker</title>
7-
<link rel="stylesheet" href="https://pyscript.net/releases/2025.11.2/core.css">
8-
<script type="module" src="https://pyscript.net/releases/2025.11.2/core.js"></script>
7+
<link rel="stylesheet" href="https://pyscript.net/releases/2026.1.1/core.css">
8+
<script type="module" src="https://pyscript.net/releases/2026.1.1/core.js"></script>
99
<style>
1010
body {
1111
font-family: system-ui, -apple-system, sans-serif;

docs/example-apps/colour-picker/main.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def update_display(hex_colour):
4848
Update the colour display with the given hex colour.
4949
"""
5050
display = page["#colour-display"]
51-
display.style.backgroundColor = hex_colour
51+
display.style["background-color"] = hex_colour
5252
display.content = hex_colour
5353

5454

@@ -91,11 +91,12 @@ def render_history():
9191
Render colour history.
9292
"""
9393
container = page["#history-colours"]
94-
container.clear()
94+
container.replaceChildren()
9595
for colour in _HISTORY:
96-
colour_div = div(Class="history-colour", title=colour)
97-
colour_div.style["backgroundColor"] = colour
96+
colour_div = div(classes="history-colour", title=colour)
97+
colour_div.style["background-color"] = colour
9898
colour_div.dataset.colour = colour
99+
when("click", colour_div)(handle_history_click)
99100
container.append(colour_div)
100101

101102

@@ -154,7 +155,6 @@ def handle_preset_click(event):
154155
update_controls(r, g, b)
155156

156157

157-
@when("click", ".history-colour")
158158
def handle_history_click(event):
159159
"""
160160
Handle clicks on history colours.

docs/example-apps/display-demo/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<meta name="viewport" content="width=device-width,initial-scale=1" />
66
<title>Display Demo</title>
77
<link rel="stylesheet"
8-
href="https://pyscript.net/releases/2025.11.2/core.css">
8+
href="https://pyscript.net/releases/2026.1.1/core.css">
99
<script type="module"
10-
src="https://pyscript.net/releases/2025.11.2/core.js"></script>
10+
src="https://pyscript.net/releases/2026.1.1/core.js"></script>
1111
<style>
1212
body {
1313
font-family: system-ui, -apple-system, sans-serif;

docs/example-apps/note-taker/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width,initial-scale=1" />
66
<title>Note Taker</title>
7-
<link rel="stylesheet" href="https://pyscript.net/releases/2025.11.2/core.css">
8-
<script type="module" src="https://pyscript.net/releases/2025.11.2/core.js"></script>
7+
<link rel="stylesheet" href="https://pyscript.net/releases/2026.1.1/core.css">
8+
<script type="module" src="https://pyscript.net/releases/2026.1.1/core.js"></script>
99
<style>
1010
body {
1111
font-family: system-ui, sans-serif;

docs/example-apps/photobooth/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width,initial-scale=1" />
66
<title>Photobooth</title>
7-
<link rel="stylesheet" href="https://pyscript.net/releases/2025.11.2/core.css">
8-
<script type="module" src="https://pyscript.net/releases/2025.11.2/core.js"></script>
7+
<link rel="stylesheet" href="https://pyscript.net/releases/2026.1.1/core.css">
8+
<script type="module" src="https://pyscript.net/releases/2026.1.1/core.js"></script>
99
<style>
1010
body {
1111
font-family: system-ui, sans-serif;

docs/example-apps/photobooth/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,13 @@ def capture_photo(event):
3737
"""
3838
Capture a still frame from the video stream and display it in the canvas.
3939
"""
40+
print("YES!")
4041
video = page["#camera"]
4142
canvas = page["#photo"]
4243
# Get the canvas 2D context.
4344
ctx = canvas.getContext("2d")
44-
# Draw the current video frame onto the canvas.
45-
ctx.drawImage(video, 0, 0, 400, 300)
45+
# Draw the current video frame onto the canvas from the raw video element.
46+
ctx.drawImage(video._dom_element, 0, 0, 400, 300)
4647
# Update status.
4748
status = page["#status"]
4849
status.content = "Photo captured!"

docs/example-apps/pirate-translator/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width,initial-scale=1" />
66
<title>🦜 Polyglot - Piratical PyScript</title>
7-
<link rel="stylesheet" href="https://pyscript.net/releases/2025.11.2/core.css">
8-
<script type="module" src="https://pyscript.net/releases/2025.11.2/core.js"></script>
7+
<link rel="stylesheet" href="https://pyscript.net/releases/2026.1.1/core.css">
8+
<script type="module" src="https://pyscript.net/releases/2026.1.1/core.js"></script>
99
</head>
1010
<body>
1111
<h1>Polyglot 🦜 💬 🇬🇧 ➡️ 🏴‍☠️</h1>

docs/example-apps/prime-worker/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width,initial-scale=1" />
66
<title>Prime Numbers with Workers</title>
7-
<link rel="stylesheet" href="https://pyscript.net/releases/2025.11.2/core.css">
8-
<script type="module" src="https://pyscript.net/releases/2025.11.2/core.js"></script>
7+
<link rel="stylesheet" href="https://pyscript.net/releases/2026.1.1/core.css">
8+
<script type="module" src="https://pyscript.net/releases/2026.1.1/core.js"></script>
99
<style>
1010
body {
1111
font-family: system-ui, sans-serif;

0 commit comments

Comments
 (0)