Skip to content

Conversation

@dhalbert
Copy link
Contributor

I meant to merge this in long ago. These are changes from the merge of MicroPython v1.22 to CircuitPython. They were in the frozen version of asyncio, which was also used for testing. But they were not merged into the library, to avoid version skew issues at the time. Now they should be merged.

Changes:

  • Incorporate upstream changes, including fixing state of cur_task and other things.
  • Remove ThreadSafeFlag: it's in MicroPython, but not in CPython. If we need something like this, put it back later.
  • Add get_running_loop()
  • Use await instead of yield.
  • Restore gather to be async.
  • Make comments be more CircuitPython-centric.
  • Add CIRCUITPY-CHANGE annotations to note code changes from MicroPython, to ease later merges.

I tested this merge against current CircuitPython, and it passes all the tests.

Because this makes incompatible changes to the API, it should be 2.0.0.

@dhalbert dhalbert requested a review from a team January 31, 2025 17:42
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@dhalbert dhalbert merged commit b74b18e into main Feb 4, 2025
2 checks passed
@dhalbert dhalbert deleted the v1.22-merge branch February 4, 2025 18:29
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants