Skip to content

Upgrade MicroPython to 2.2.1 and 1.1.1. #1072

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/micropython-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Upgrade MicroPython
about: Template for MicroPython upgrades
---

## New MicroPython releases

**Link new releases here**

## Todo

Simulator:

- [ ] Review changelogs and diff to determine simulator changes, stubs changes any other documentation changes
- [ ] Raise educational content impact to Foundation education team (likely already in hand or low priority)
- [ ] Update simulator as required
- [ ] Run through simulator examples in simulator demo.html
- [ ] Test simulator in Python Editor (locally)
- [ ] Merge simulator changes

Editor:

- [ ] Update stubs as required
- [ ] Update MicroPython hex files and version metadata in the editor
- [ ] PR with updated sim (via staging) and stubs
- [ ] Release stubs
- [ ] Test and merge PR

Now or later:

- [ ] Release simulator
- [ ] Update and publish simulator versioning CloudFront function
- [ ] Release editor
32,223 changes: 16,185 additions & 16,038 deletions src/micropython/main/microbit-micropython-v2.hex

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/micropython/main/typeshed.en.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/micropython/main/typeshed.es-es.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/micropython/main/typeshed.fr.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/micropython/main/typeshed.ja.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/micropython/main/typeshed.ko.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/micropython/main/typeshed.nl.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/micropython/main/typeshed.zh-cn.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/micropython/main/typeshed.zh-tw.json

Large diffs are not rendered by default.

22,292 changes: 11,148 additions & 11,144 deletions src/micropython/microbit-micropython-v1.hex

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/micropython/micropython.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const v2Main = {
name: "MicroPython (micro:bit V2)",
url: microPythonV2HexUrl,
boardId: microbitBoardId.V2,
version: "2.1.0",
web: "https://github.com/microbit-foundation/micropython-microbit-v2/releases/tag/v2.1.0",
version: "2.1.1",
web: "https://github.com/microbit-foundation/micropython-microbit-v2/releases/tag/v2.1.1",
};

export const microPythonConfig = {
Expand All @@ -22,8 +22,8 @@ export const microPythonConfig = {
name: "MicroPython (micro:bit V1)",
url: microPythonV1HexUrl,
boardId: microbitBoardId.V1,
version: "1.1.0",
web: "https://github.com/bbcmicrobit/micropython/releases/tag/v1.1.0",
version: "1.1.1",
web: "https://github.com/bbcmicrobit/micropython/releases/tag/v1.1.1",
},
v2Main,
],
Expand Down
10 changes: 7 additions & 3 deletions src/simulator/Simulator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { useResizeObserverContentRect } from "../common/use-resize-observer";
import { topBarHeight } from "../deployment/misc";
import { DeviceContextProvider } from "../device/device-hooks";
import { SimulatorDeviceConnection } from "../device/simulator";
import { stage } from "../environment";
import { useLogging } from "../logging/logging-hooks";
import SimulatorActionBar from "./SimulatorActionBar";
import SimulatorSplitView from "./SimulatorSplitView";
Expand All @@ -43,10 +44,13 @@ const Simulator = ({
minWidth,
simFocus,
}: SimulatorProps) => {
const version = "0.1";
const url = `https://python-simulator.usermbit.org/v/${version}/simulator.html`;
const production =
"https://python-simulator.usermbit.org/v/0.1/simulator.html";
const staging =
"https://python-simulator.usermbit.org/staging/simulator.html";
const url = stage === "PRODUCTION" ? production : staging;
// For testing with sim branches:
//const branch = "whatever";
//const branch = "upgrade-mpy";
//const url = `https://review-python-simulator.usermbit.org/${branch}/simulator.html`;

const ref = useRef<HTMLIFrameElement>(null);
Expand Down