← index #6154Issue #919
Related · high · value 2.379
QUERY · ISSUE

MicroPython compatability issue with CPython

openby redradistopened 2020-06-15updated 2024-08-28
docs

Hi all,

I am wondering why MicroPython have so many inconsistencies with standard CPython ?

Do you plan to make it fully compatible with CPython ?

We need it because it split ecosystem and decrease compatible between libraries for MicroPython and CPython

CANDIDATE · ISSUE

Conventions for MicroPython->CPython compatibility modules

closedby pfalconopened 2014-10-19updated 2015-01-01
rfc

The implementation of this probably belongs to micropython-lib, but as we have more people here, I post RFC here.

So, as we go forward, uPy offers more and more features which are not compatible with CPython. But we surely want to remain good members of Python community, and provide a compatibility layer to run MicroPython-optimized programs on other Python implementations. We had beginnings of that for a long time - https://github.com/micropython/micropython/blob/master/examples/micropython.py , and this RFC is to set conventions and guidelines how to go forward with this.

My proposals:

  1. Host such compatibility modules in micropython-lib repo.
  2. To distinguish them from native uPy modules, have their dir names prefixed with "cpython-".
  3. For PyPi, stick with existing convention of "micropython-" prefix, which them will be followed by "cpython-" infix.

As an example, CPython compatibility shim for MicroPython's "micropython" module will be possible to install from PyPi as "micropython-cpython-micropython".

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied