richard-better / pushbullet.py

A python client for http://pushbullet.com
MIT License
575 stars 110 forks source link

Convert listener.py to asyncio and coroutines #107

Closed rharder closed 7 years ago

rharder commented 7 years ago

I converted listener.py to using asyncio and the websockets package. I also added a get_new_pushes() function to pushbullet.py to retrieve only the most recent pushes. Not sure if you want to take this package down the asyncio path, but here's a start at least.

kovacsbalu commented 7 years ago

Hi @rharder, thanks for you PR. Can you please fix failed check errors?

rharder commented 7 years ago

Yeah, I was looking at that, but I'm not sure how to interpret it. There's an error that says

ImportError: No module named 'websockets'

but that would have to be installed with pip install websockets. I'll google around and see what's up.

-Rob

On Wed, Jan 4, 2017 at 1:15 PM, Kovács Bálint notifications@github.com wrote:

Hi @rharder https://github.com/rharder, thanks for you PR. Can you please fix failed check errors?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/randomchars/pushbullet.py/pull/107#issuecomment-270474696, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEnUCkI-MW5l6CE4Gec50n5aB7ge__Iks5rO_3kgaJpZM4La_L7 .

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-2.7%) to 56.381% when pulling 7905049e953208bbdb60e28d9e0e9641acbe6b2f on rharder:master into 2dff6cea31ad456e1a6e89845615316881c4c79e on randomchars:master.

rharder commented 7 years ago

OK, well the v2.7 test fails because asyncio and coroutines aren't supported in v2.7. Not sure if you want to abandon v2.7 support.

rharder commented 7 years ago

I'm going to close this pull request. I've done a complete conversion of pushbullet to asyncio, but I'm going to try to find an elegant way to have both regular and asyncio in the same package with a minimal amount of code duplication.