Skip to content

Commit 2e069d0

Browse files
committed
docs/reference/micropython2_migration: Add migration guide.
This is just scaffolding for now, but the idea is that there should be an addition to this file for every commit that uses the `MICROPY_PREVIEW_VERSION_2` macro. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
1 parent 42d5c2b commit 2e069d0

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

docs/reference/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ implementation and the best practices to use them.
3131
asm_thumb2_index.rst
3232
filesystem.rst
3333
pyboard.py.rst
34+
micropython2_migration.rst
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
.. _micropython2_migration:
2+
3+
MicroPython 2.0 Migration Guide
4+
===============================
5+
6+
MicroPython 2.0 is the (currently in development, not yet available) next major
7+
release of MicroPython.
8+
9+
After maintaining API compatibility for almost a decade with the ``1.x`` series, in
10+
order to unblock some project-wide improvements MicroPython 2.0 will introduce a
11+
small number of breaking API changes that will require some programs to be
12+
updated. This guide explains how to update your Python code to accommodate these
13+
changes.
14+
15+
This document is a work-in-progress. As more work is done on MicroPython 2.0,
16+
more items will be added to the lists below.
17+
18+
**Note:** There are currently no MicroPython 2.0 firmware builds available for
19+
download. You can build it yourself by enabling the ``MICROPY_PREVIEW_VERSION_2``
20+
config option. As it gets closer to being ready for release, builds will be
21+
provided for both ``1.x.y`` and ``2.0.0-preview``.
22+
23+
Hardware and peripherals
24+
------------------------
25+
26+
Overview
27+
~~~~~~~~
28+
29+
The goal is to improve consistency in the :mod:`machine` APIs across different
30+
ports, making it easier to write code, documentation, and tutorials that work on
31+
any supported microcontroller.
32+
33+
This means that some ports' APIs need to change to match other ports.
34+
35+
Changes
36+
~~~~~~~
37+
38+
*None yet*
39+
40+
OS & filesystem
41+
---------------
42+
43+
Overview
44+
~~~~~~~~
45+
46+
The primary goal is to support the ability to execute :term:`.mpy files <.mpy
47+
file>` directly from the filesystem without first copying them into RAM. This
48+
improves code deployment time and reduces memory overhead and fragmentation.
49+
50+
Additionally, a further goal is to support a more flexible way of configuring
51+
partitions, filesystem types, and options like USB mass storage.
52+
53+
Changes
54+
~~~~~~~
55+
56+
*None yet*
57+
58+
CPython compatibility
59+
---------------------
60+
61+
Overview
62+
~~~~~~~~
63+
64+
The goal is to improve compatibility with CPython by removing MicroPython
65+
extensions from CPython APIs. In most cases this means moving existing
66+
MicroPython-specific functions or classes to new modules.
67+
68+
This makes it easier to write code that works on both CPython and MicroPython,
69+
which is useful for development and testing.
70+
71+
Changes
72+
~~~~~~~
73+
74+
*None yet*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy