adafruit / Adafruit_CircuitPython_asyncio

CIrcuitPython subset of CPython asyncio library
MIT License
28 stars 16 forks source link

chore: move CancelledError and InvalidStateError to tasks #55

Closed imnotjames closed 1 year ago

imnotjames commented 1 year ago

this moves CancelledError and creates InvalidStateError within tasks to support #54 & https://github.com/adafruit/circuitpython/pull/8576 -- and done in a way so that if we were to include these in _asyncio that we use the C exceptions better

This is being done in a separate PR so that the CircuitPython tests that run will get the expected CancelledError and operate as expected.

Open to other suggestions, though!

dhalbert commented 1 year ago

@imnotjames Do you want to merge all your PR's at the same time? I approved but did not merge because I don't know how you want to stage the changes.

imnotjames commented 1 year ago

Tests would be ideal first if possible, but not for any particular reason. If we want to close them out then this one is fine on its own.

Everything else not in draft can be any order.

imnotjames commented 1 year ago

Given there seems to be more to hash out on the testing side of things, this can probably be merged in now which unblocks changes in the C code