Micropython fork wars

Posted on ptk 05 kwietnia 2019 in micropython

If you ecounter following problem:

    TypeError: function takes 2 positional arguments but 3 were given

while trying to use uasyncio and micropython - then to save your time, learn a bit about current situation in project:

There is fork war between Micropython and former Micropython developer - Pfalcon which started fork of Micropython - Pycopy.

If you use stock Micropython and install uasyncio from upip, then you have problem, because PyPi package is authored by Pfalcon and is compatible with his fork, and not compatible with Micropython from http://micropython.org.

There is no visible warning about it and realizing that costed me about day of googling.

Why?

The bone of contention is this PR. Pfalcon created this PR, others disagree with him. He made fork and claims that micropython is useless without this change and it give him moral right to make incompatible changes to uasyncio published at PyPi.

What to do?

if you want to use micropython.org

Then you should use uasyncio from vanilla micropython-lib. How? By copy files to and thru. Not very convenient.

if you want to use upip.install("micropython-lib")

Then, due to fact that Pfalcon hijacked micropython-uasyncio, you need to use his Pycopy. Which is not bad, in fact there is soome activity on his repository while there is no commits on original micropython github.

But if you use ESP32, then you need to compile it's firmware yourself, as there is no downloadable images available on Pycopy repo. Which is not so hard and I'll try to upload my image here.