docs: Documentation version don't match image contents
I'm developing with a Raspberry Pi Pico (RP2040) and a nightly image of v1.20.0
>>> sys.version
3.4.0; MicroPython v1.20.0-494-g72ef2e629 on 2023-09-27
Downloaded from:
- https://micropython.org/download/RPI_PICO/
I've come across two cases so far when the documentation does not match what's actually on the UF2 images.
Examples:
sys.atexit
This function is referenced by the documentation for 1.20.0 and latest- https://docs.micropython.org/en/v1.20.0/library/sys.html#sys.atexit
- https://docs.micropython.org/en/latest/library/sys.html#sys.atexit
However, it is not defined
import sys sys.__dict__ {'__name__': 'sys', 'argv': [], 'version': '3.4.0; MicroPython v1.20.0-494-g72ef2e629 on 2023-09-27', 'version_info': (3, 4, 0), 'implementation': (name='micropython', version=(1, 20, 0), _machine='Raspberry Pi Pico with RP2040', _mpy=4358), 'platform': 'rp2', 'byteorder': 'little', 'maxsize': 2147483647, 'exit': <function>, 'stdin': <io.FileIO 0>, 'stdout': <io.FileIO 1>, 'stderr': <io.FileIO 2>, 'modules': {'font10': <module 'font10' from 'font10.py'>, 'rp2': <module 'rp2' from 'rp2.py'>}, 'print_exception': <function>}ustruct
This module isn't defined in the documentation for 1.20.0 or latest, however, it can still be imported. My current assumption is that ustruct points to struct and they are not separate modules, but this is not reflected in the documentation.- https://docs.micropython.org/en/latest/search.html?q=ustruct&check_keywords=yes&area=default
- https://docs.micropython.org/en/v1.20.0/search.html?q=ustruct&check_keywords=yes&area=default
>>> import ustruct >>> print(ustruct.__dict__) {'__name__': 'struct', 'calcsize': <function>, 'pack': <function>, 'pack_into': <function>, 'unpack': <function>, 'unpack_from': <function>} >>> import struct >>> print(struct.__dict__) {'__name__': 'struct', 'calcsize': <function>, 'pack': <function>, 'pack_into': <function>, 'unpack': <function>, 'unpack_from': <function>}
Pico type only determined by which type of Pico firmware image installed?
Micropython only knows model of Pico by which firmware is installed? I tested this, and it is true, you can load non-wifi image on a Pico W, and a Pico W image to Pico (original). And the query of model descriptor is wrong, for example...
import sys
sys.implementation._machine
Raspberry Pi Pico W on RPI2040
Even though the actual hardware is NOT Pico W? This can't be the indented result, right? As noted above the reverse is true as well. The official Pico W documentation notes the actual method to determine the Pico model type, Pico vs. PicoW. Is this a bug?
Reference [url]https://datasheets.raspberrypi.com/picow/connecting-to-the-internet-with-pico-w.pdf[/url], page , how to determine model type of Pico is in section 2.4.