I'm getting the following error message when trying to run my tornado server on pypy:
/pypy3-2.4.0-osx64/site-packages/pkg_resources/__init__.py:80: UserWarning: Support for Python 3.0-3.2 has been dropped. Future versions will fail here.
Does anyone know what this is talking about?
Also why does normal python interpreter allow the following function:
@tornado.gen.coroutine
def get(self,id):
doc=[]
cursor = self.c.find({"_id":id})
while (yield cursor.fetch_next):
doc.append(cursor.next_object())
return doc
However pypy complains about using a return inside a generator. I did some reading and apparently the right way is to yield instead of return?
@tornado.gen.coroutine
def get(self,id):
doc=[]
cursor = self.c.find({"_id":id})
while (yield cursor.fetch_next):
doc.append(cursor.next_object())
yield doc
I changed to yielding to get rid of the errors in pypy then went back to normal python and it crashed.