mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Fix gaiohttp worker
This commit is contained in:
parent
0a88d19ddf
commit
43e31c366b
2
.gitignore
vendored
2
.gitignore
vendored
@ -15,3 +15,5 @@ examples/frameworks/pylonstest/pylonstest.egg-info/
|
||||
MANIFEST
|
||||
nohup.out
|
||||
setuptools-*
|
||||
.cache
|
||||
.eggs
|
||||
|
||||
1
THANKS
1
THANKS
@ -49,6 +49,7 @@ Dariusz Suchojad <dsuch-github@m.zato.io>
|
||||
David Vincelli <david@freshbooks.com>
|
||||
David Wolever <david@wolever.net>
|
||||
Denis Bilenko <denis.bilenko@gmail.com>
|
||||
Diego Oliveira <contact@diegoholiveira.com>
|
||||
Dima Barsky <github@kappa.ac93.org>
|
||||
Djoume Salvetti <djoume@freshbooks.com>
|
||||
Dmitry Medvinsky <me@dmedvinsky.name>
|
||||
|
||||
@ -2,6 +2,14 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
19.9.0 / 2018/05/26
|
||||
===================
|
||||
|
||||
- the internal module `gunicorn.workers.async` was renamed to `gunicorn.workers.async`
|
||||
since ``async`` is now a reserved word in Python 3.7
|
||||
(:pr:`1527`)
|
||||
|
||||
|
||||
19.8.1 / 2018/04/30
|
||||
===================
|
||||
|
||||
|
||||
@ -17,6 +17,6 @@ SUPPORTED_WORKERS = {
|
||||
}
|
||||
|
||||
|
||||
if sys.version_info >= (3, 3):
|
||||
if sys.version_info >= (3, 4):
|
||||
# gaiohttp worker can be used with Python 3.3+ only.
|
||||
SUPPORTED_WORKERS["gaiohttp"] = "gunicorn.workers.gaiohttp.AiohttpWorker"
|
||||
|
||||
@ -46,7 +46,7 @@ class AiohttpWorker(base.Worker):
|
||||
super().init_process()
|
||||
|
||||
def run(self):
|
||||
self._runner = asyncio.async(self._run(), loop=self.loop)
|
||||
self._runner = asyncio.ensure_future(self._run(), loop=self.loop)
|
||||
|
||||
try:
|
||||
self.loop.run_until_complete(self._runner)
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
coverage>=4.0,<4.4 # TODO: https://github.com/benoitc/gunicorn/issues/1548
|
||||
pytest==3.0.5
|
||||
pytest-cov==2.4.0
|
||||
pytest
|
||||
pytest-cov
|
||||
|
||||
@ -50,7 +50,7 @@ class WorkerTests(unittest.TestCase):
|
||||
self.worker.loop = mock.Mock()
|
||||
self.worker.run()
|
||||
|
||||
self.assertTrue(m_asyncio.async.called)
|
||||
self.assertTrue(m_asyncio.ensure_future.called)
|
||||
self.assertTrue(self.worker.loop.run_until_complete.called)
|
||||
self.assertTrue(self.worker.loop.close.called)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user