python-trio / python-trio/trio

Does it make any sense for trio to support micropython?

Open
#351 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.3k
Forks
431
Avg merge
2d 17h
Merged PRs (30d)
6

Description

I don't really know anything about micropython, but @pfalcon recently brought to my attention that they have their own incompatible variant of asyncio, uasyncio, which makes interesting choices like leaving out Futures altogether.

This leads me to wonder: how well trio would work on micropython? I'm not thinking of any ridiculously spendthrift data structures... we do currently splurge on a sortedcontainers.SortedDict for tracking timeouts instead of a traditional heap, in order to get O(1) removal of stale entries, but that's a pretty self-contained bit of code and certainly not visible to users. OTOH there are probably another thousand things I'm not thinking of that would make microcontroller devs gasp in horror :-). Anyway, it'd be interesting to know what would be required to make it work, or why concretely it couldn't work, so maybe we can collect any notes on that here in this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are identified. Start by comparing Trio's stated dependencies and implementation assumptions with MicroPython and its uasyncio variant, including the SortedDict timeout-tracking concern; done means documenting concrete compatibility requirements or blockers.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.