Page 1 of 1

Lost in the lib and doc

Posted: Fri Oct 16, 2020 11:14 am
by JumpZero

I wonder how Micropython-lib is accurate/up-to-date/organised related to the documentation
For instance:
I flashed the latest stable v1.13 on a ESP8266. From REPL I can do

Code: Select all

import umqtt.simple
(or umqtt.robust) and use it as expected. However if I want to read the code of that module to understand in depth how it works, it is in the github Micropython-lib but the code hasn’t changed in 3 years! As almost all others modules!..
In the documentation nothing about this module. Well, maybe the code is still the same. But what if it has changed?

Another instance: v1.13 comes with a new uasyncio module (as per announcement) but in the github Micropython-lib it hasn’t changed in 3 years.

So I’m lost, I would appreciate any clarification
Thanks in advance to you guys Micropython experts!

Re: Lost in the lib and doc

Posted: Fri Oct 16, 2020 1:27 pm
by pythoncoder
In general the code here micropython-lib is current and correct. Like much of the library the mqtt libraries have not been updated for a while but they are current.

You have hit a rare exception. The uasyncio in micropython-lib is version 2.0. This is obsolete and has recently been replaced by V3. This is now built in to MicroPython: the source is here.

Built-in modules don't appear in micropython-lib as their source is in the MicroPython source tree. Arguably uasyncio should be removed from micropython-lib, or marked as deprecated.

Re: Lost in the lib and doc

Posted: Fri Oct 16, 2020 2:19 pm
by JumpZero
Thanks for clarification @pythoncoder

Ok it makes sens the built-in modules aren't in the Micropython-lib but they are well documented in the doc so it's fine. And the modules in the lib are current.
And unfortunately I've hit uasyncio... :lol:

So I now feel on a stable base! Thanks again

Re: Lost in the lib and doc

Posted: Fri Oct 16, 2020 6:07 pm
by pythoncoder
If you are using uasyncio there is this tutorial which expands on the official docs.

Re: Lost in the lib and doc

Posted: Sat Oct 17, 2020 4:22 pm
by JumpZero
Hi Peter,

I actually already found your tutorial and also this one.
I have tested some exemples. I must say that I'm impressed by:
1 - The possibility to run simultaneous tasks, the computing power of so cheap hardware (almost computer no more microcontroller!)
2 - The quality and of your doc

Again thanks for sharing