← index #5046Issue #919
Off-topic · high · value 0.335
QUERY · ISSUE

RFC: MICROPY_PY_BUILTINS_NEXT2 always set to (0) ?

openby pmp-popened 2019-08-27updated 2022-12-22
rfc

Current settings for all ports break cpython script compatibility on next()

https://docs.python.org/3.5/library/functions.html#next

because
MICROPY_PY_BUILTINS_NEXT2 is never defined to 1 except in coverage and defaults to 0
https://github.com/micropython/micropython/blob/master/py/mpconfig.h#L910

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