Skip to content

Remove deprecated asyncio coroutine decorator, handle session closing#5

Merged
titilambert merged 2 commits into
titilambert:masterfrom
frenck:frenck-2021-0773
Feb 16, 2023
Merged

Remove deprecated asyncio coroutine decorator, handle session closing#5
titilambert merged 2 commits into
titilambert:masterfrom
frenck:frenck-2021-0773

Conversation

@frenck
Copy link
Copy Markdown
Contributor

@frenck frenck commented Mar 3, 2021

This PR fixes #3, by converting the old @asyncio.coroutine/yield from syntax to the new Python async/await syntax introduced in Python 3.5.

This removes Python 3.4 compatibility but prepares for Python 3.10. I've adjusted the package classifiers to match that.

Additionally, added a small change that would not close a passed session. Only self-created sessions should be cleaned up/closed. This prevents the accidental closing of sessions not managed by this package.

⚠️ I don't have access to an account for testing and thus need verification.

@balloob
Copy link
Copy Markdown

balloob commented Feb 14, 2023

@titilambert could you take a look at this and merge/release it? It prevents us from adopting Python 3.11

@titilambert
Copy link
Copy Markdown
Owner

@balloob Sorry for the delay.
I was thinking removing the integrations from HA since I'm not using it and I saw 0 active users. What do you think ?

@titilambert titilambert merged commit d8dd6e8 into titilambert:master Feb 16, 2023
@titilambert
Copy link
Copy Markdown
Owner

image

@titilambert
Copy link
Copy Markdown
Owner

titilambert commented Feb 16, 2023

I'm currently asking the HA Quebec community if there is any user ...

@frenck frenck deleted the frenck-2021-0773 branch February 16, 2023 07:37
@frenck
Copy link
Copy Markdown
Contributor Author

frenck commented Feb 16, 2023

Thanks, @titilambert 👍

Don't forget to tag a release when ready, so we can upgrade the package on the Home Assistant end.

../Frenck

@titilambert
Copy link
Copy Markdown
Owner

@frenck I just pushed the new version 2.1.2 to pypi .
@balloob I asked the Quebec community if someone were using it, and I found nobody ...
So I guess you should delete it.

@frenck
Copy link
Copy Markdown
Contributor Author

frenck commented Feb 17, 2023

I don't see usage on the public analytics of HA either. Yet, will bump for now and start an deprecation period after that.

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.

Convert @asyncio.coroutine to async/await keywords

3 participants