crossbario / txaio

Utilities to support code that runs unmodified on Twisted and asyncio
MIT License
58 stars 30 forks source link

Fix cancel handling in python 3.8/3.9. #175

Closed jameshilliard closed 3 years ago

jameshilliard commented 3 years ago

We need to explicitely catch asyncio.CancelledError as of python3.8 as it now inherits from BaseException instead of Exception.

As of python3.9 a message can be passed to Future.cancel(), add an optional kwarg for that and pass it to Future.cancel() when available.

Fixes: #166

om26er commented 3 years ago

It looks like the CI needs to be moved to GitHub actions on this one as well. I can probably help with that.

jameshilliard commented 3 years ago

Hmm, looks like it's already on github actions, I see this error however:

Error : .github#L1
actions/checkout@v2, actions/setup-python@v2, actions/checkout@v2, actions/setup-python@v2, actions/checkout@v2, and actions/setup-python@v2 are not allowed to be used in crossbario/txaio. Actions in this workflow must be: within a repository owned by crossbario.
jameshilliard commented 3 years ago

@om26er Get a chance to look at this?

om26er commented 3 years ago

@jameshilliard unfortunately I don't have the permissions to fix that.

So the error you posted seems similar to https://github.community/t/checkout-v2-error-actions-in-this-workflow-must-within-a-repository-owned-by-organization/136315 -- @oberstet should be able to fix that

oberstet commented 3 years ago

fwiw, I've changed the setting, but the failed jobs don't start, and I'm not sure what's actually going on / the status:

Bildschirmfoto von 2021-10-11 13-09-17 Bildschirmfoto von 2021-10-11 13-12-55

Bildschirmfoto von 2021-10-11 13-10-56 Bildschirmfoto von 2021-10-11 13-10-30

om26er commented 3 years ago

@oberstet You need to make the change at the organization level. Specifically on this page https://github.com/organizations/crossbario/settings/actions

Here is a related topic on github forums https://github.community/t/checkout-v2-error-actions-in-this-workflow-must-within-a-repository-owned-by-organization/136315/2

jameshilliard commented 2 years ago

@om26er @oberstet Think we could get a new release with this included sometime soon.

oberstet commented 2 years ago

@jameshilliard https://github.com/crossbario/txaio/issues/177