Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.9 support? #64

Closed
jamespo opened this issue Apr 16, 2021 · 3 comments
Closed

3.9 support? #64

jamespo opened this issue Apr 16, 2021 · 3 comments

Comments

@jamespo
Copy link

jamespo commented Apr 16, 2021

Currently running the example with python 3.9.4 errors are thrown (presumably due to changes in asyncio):

Task exception was never retrieved
future: <Task finished name='Task-4' coro=<IMAP4ClientProtocol.welcome() done, defined at /home/james/dls/aioimaplib/aioimaplib/aioimaplib.py:298> exception=TypeError("object Condition can't be used in 'await' expression")>
Traceback (most recent call last):
  File "/home/james/dls/aioimaplib/aioimaplib/aioimaplib.py", line 300, in wrapper
    with await self.state_condition:
TypeError: object Condition can't be used in 'await' expression
Traceback (most recent call last):

I intend to look into this, although my experience with async is limited.

@bamthomas
Copy link
Owner

hmm probably linked to this :
#59 (comment)

I have pushed a fix 76bd59f could you test with it (executing tests on the master) ?

@jamespo
Copy link
Author

jamespo commented Apr 16, 2021

I get complaint about "with await" elsewhere (line 300) with that fix, I will test more this evening / over the weekend.

Task exception was never retrieved
future: <Task finished name='Task-4' coro=<IMAP4ClientProtocol.welcome() done, defined at /home/james/.venvs/39/lib/python3.9/site-packages/aioimaplib-0.8.0-py3.9.egg/aioimaplib/aioimaplib.py:298> exception=TypeError("object Condition can't be used in 'await' expression")>
Traceback (most recent call last):
  File "/home/james/.venvs/39/lib/python3.9/site-packages/aioimaplib-0.8.0-py3.9.egg/aioimaplib/aioimaplib.py", line 300, in wrapper
    with await self.state_condition:
TypeError: object Condition can't be used in 'await' expression
Traceback (most recent call last):
  File "/home/james/.venvs/39/lib/python3.9/site-packages/aioimaplib-0.8.0-py3.9.egg/aioimaplib/aioimaplib.py", line 595, in wait
    await self.state_condition.wait_for(lambda: state_re.match(self.state))
  File "/usr/lib/python3.9/asyncio/locks.py", line 317, in wait_for
    await self.wait()
  File "/usr/lib/python3.9/asyncio/locks.py", line 290, in wait
    await fut
asyncio.exceptions.CancelledError

bamthomas added a commit that referenced this issue Apr 16, 2021
bamthomas added a commit that referenced this issue Apr 16, 2021
bamthomas added a commit that referenced this issue Apr 16, 2021
@bamthomas
Copy link
Owner

it should work now I will probably release a 0.9 soon with the byte/string PR

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

No branches or pull requests

2 participants