saghul / evergreen

Cooperative multitasking and i/o for Python
https://pypi.python.org/pypi/evergreen
MIT License
114 stars 11 forks source link

'pyuv._cpyuv.Check' object has no attribute 'unref' #17

Open liuliqiang opened 7 years ago

liuliqiang commented 7 years ago

when i using evergreen == 0.1.0 , i install it with pip

pip install evergreen and it install pyuv == 1.3.0, and it try this example:

#!/usr/bin/env python
# encoding: utf-8
import evergreen

# Create the global loop
loop = evergreen.EventLoop()

# Start the loop
loop.run()

it get following error:

Traceback (most recent call last):
  File "test.py", line 7, in <module>
    loop = evergreen.EventLoop()
  File "/home/yetship/.virtualenvs/evergreen/lib/python2.7/site-packages/evergreen/core/loop.py", line 126, in __init__
    self._ready_processor.unref()
AttributeError: 'pyuv._cpyuv.Check' object has no attribute 'unref'
saghul commented 7 years ago

Good catch, I need to update the syntax to the new pyuv API, will do that as soon as I get some time.

liuliqiang commented 7 years ago

sounds good, anything i can help?

saghul commented 7 years ago

If you feel like it, then great! Basically check for the API changes in pyuv and adjust accordingly. ref / unref functions are gone, is now a property, for example.

There is not much to adjust IIRC.

liuliqiang commented 7 years ago

it seems good, however i'm not farmiliar with pyuv, i just try evergreen for learning cooperative multitasking and i/o. i'm sorry for that, and maybe what i can do is waitting for the good news.