Skip to content

Commit fadaf6e

Browse files
Upgrade MicroPython to 2.2.1 and 1.1.1. (#1072)
* Use staging simulator on non-production deploys. Staging is using 2.2.1-based simulator. * Update typeshed for frozenset - microbit-foundation/micropython-microbit-stubs#85 * Add issue template for future upgrades. Upstream releases: https://github.com/bbcmicrobit/micropython/releases/tag/v1.1.1 https://github.com/microbit-foundation/micropython-microbit-v2/releases/tag/v2.1.1 We'll run with this on beta for a day or two then push live. Closes #1071 Closes #1001
1 parent 40ff6f6 commit fadaf6e

13 files changed

+27394
-27206
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Upgrade MicroPython
3+
about: Template for MicroPython upgrades
4+
---
5+
6+
## New MicroPython releases
7+
8+
**Link new releases here**
9+
10+
## Todo
11+
12+
Simulator:
13+
14+
- [ ] Review changelogs and diff to determine simulator changes, stubs changes any other documentation changes
15+
- [ ] Raise educational content impact to Foundation education team (likely already in hand or low priority)
16+
- [ ] Update simulator as required
17+
- [ ] Run through simulator examples in simulator demo.html
18+
- [ ] Test simulator in Python Editor (locally)
19+
- [ ] Merge simulator changes
20+
21+
Editor:
22+
23+
- [ ] Update stubs as required
24+
- [ ] Update MicroPython hex files and version metadata in the editor
25+
- [ ] PR with updated sim (via staging) and stubs
26+
- [ ] Release stubs
27+
- [ ] Test and merge PR
28+
29+
Now or later:
30+
31+
- [ ] Release simulator
32+
- [ ] Update and publish simulator versioning CloudFront function
33+
- [ ] Release editor

src/micropython/main/microbit-micropython-v2.hex

Lines changed: 16185 additions & 16038 deletions
Large diffs are not rendered by default.

src/micropython/main/typeshed.en.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

src/micropython/main/typeshed.es-es.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

src/micropython/main/typeshed.fr.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

src/micropython/main/typeshed.ja.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

src/micropython/main/typeshed.ko.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

src/micropython/main/typeshed.nl.json

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

src/micropython/main/typeshed.zh-cn.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

src/micropython/main/typeshed.zh-tw.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

src/micropython/microbit-micropython-v1.hex

Lines changed: 11148 additions & 11144 deletions
Large diffs are not rendered by default.

src/micropython/micropython.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const v2Main = {
1212
name: "MicroPython (micro:bit V2)",
1313
url: microPythonV2HexUrl,
1414
boardId: microbitBoardId.V2,
15-
version: "2.1.0",
16-
web: "https://github.com/microbit-foundation/micropython-microbit-v2/releases/tag/v2.1.0",
15+
version: "2.1.1",
16+
web: "https://github.com/microbit-foundation/micropython-microbit-v2/releases/tag/v2.1.1",
1717
};
1818

1919
export const microPythonConfig = {
@@ -22,8 +22,8 @@ export const microPythonConfig = {
2222
name: "MicroPython (micro:bit V1)",
2323
url: microPythonV1HexUrl,
2424
boardId: microbitBoardId.V1,
25-
version: "1.1.0",
26-
web: "https://github.com/bbcmicrobit/micropython/releases/tag/v1.1.0",
25+
version: "1.1.1",
26+
web: "https://github.com/bbcmicrobit/micropython/releases/tag/v1.1.1",
2727
},
2828
v2Main,
2929
],

src/simulator/Simulator.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { useResizeObserverContentRect } from "../common/use-resize-observer";
1818
import { topBarHeight } from "../deployment/misc";
1919
import { DeviceContextProvider } from "../device/device-hooks";
2020
import { SimulatorDeviceConnection } from "../device/simulator";
21+
import { stage } from "../environment";
2122
import { useLogging } from "../logging/logging-hooks";
2223
import SimulatorActionBar from "./SimulatorActionBar";
2324
import SimulatorSplitView from "./SimulatorSplitView";
@@ -43,10 +44,13 @@ const Simulator = ({
4344
minWidth,
4445
simFocus,
4546
}: SimulatorProps) => {
46-
const version = "0.1";
47-
const url = `https://python-simulator.usermbit.org/v/${version}/simulator.html`;
47+
const production =
48+
"https://python-simulator.usermbit.org/v/0.1/simulator.html";
49+
const staging =
50+
"https://python-simulator.usermbit.org/staging/simulator.html";
51+
const url = stage === "PRODUCTION" ? production : staging;
4852
// For testing with sim branches:
49-
//const branch = "whatever";
53+
//const branch = "upgrade-mpy";
5054
//const url = `https://review-python-simulator.usermbit.org/${branch}/simulator.html`;
5155

5256
const ref = useRef<HTMLIFrameElement>(null);

0 commit comments

Comments
 (0)