New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate gaiohttp worker and document alternatives #1569

Merged
merged 2 commits into from Oct 31, 2017

Conversation

Projects
None yet
6 participants
@berkerpeksag
Collaborator

berkerpeksag commented Aug 9, 2017

Fixes #1338

@asvetlov

Thank you for PR!

@berkerpeksag

This comment has been minimized.

Show comment
Hide comment
@berkerpeksag

berkerpeksag Aug 10, 2017

Collaborator

Thanks for the review, @asvetlov. I've just tweaked the docs a bit. @tilgovi can I get a review from you too?

Collaborator

berkerpeksag commented Aug 10, 2017

Thanks for the review, @asvetlov. I've just tweaked the docs a bit. @tilgovi can I get a review from you too?

Optionally, you can provide your own worker by giving Gunicorn a
Python path to a subclass of ``gunicorn.workers.base.Worker``.
This alternative syntax will load the gevent class:
``gunicorn.workers.ggevent.GeventWorker``.
.. deprecated:: 19.8

This comment has been minimized.

@benoitc

benoitc Aug 11, 2017

Owner

same as above

@benoitc

benoitc Aug 11, 2017

Owner

same as above

@benoitc

This comment has been minimized.

Show comment
Hide comment
@benoitc
Owner

benoitc commented Aug 22, 2017

@tilgovi

Looks great. Thanks for doing this. Agree with Benoit that the text doesn't need to suggest aiohttp.worker.GunicornWebWorker in particular, just a link to the docs that discuss the three options.

@kennethreitz

This comment has been minimized.

Show comment
Hide comment
@kennethreitz

kennethreitz Aug 28, 2017

Collaborator

Excited to get this merged.

Collaborator

kennethreitz commented Aug 28, 2017

Excited to get this merged.

except ImportError:
from gunicorn.workers._gaiohttp import AiohttpWorker
util.warn(

This comment has been minimized.

@Code0x58

Code0x58 Sep 15, 2017

Contributor

I think this kind of thing should be using Python's inbuilt warning logging facilities, with a DeprecationWarning. This may be a separarte issue if there are other similar depreciation warnings.

@Code0x58

Code0x58 Sep 15, 2017

Contributor

I think this kind of thing should be using Python's inbuilt warning logging facilities, with a DeprecationWarning. This may be a separarte issue if there are other similar depreciation warnings.

This comment has been minimized.

@Code0x58

Code0x58 Sep 16, 2017

Contributor

I made #1590/#1591 to use warnings in the other two places.

@Code0x58

Code0x58 Sep 16, 2017

Contributor

I made #1590/#1591 to use warnings in the other two places.

@tilgovi

This comment has been minimized.

Show comment
Hide comment
@tilgovi

tilgovi Sep 16, 2017

Collaborator

Anything else to do here?

Collaborator

tilgovi commented Sep 16, 2017

Anything else to do here?

@berkerpeksag

This comment has been minimized.

Show comment
Hide comment
@berkerpeksag

berkerpeksag Sep 16, 2017

Collaborator

Anything else to do here?

Sorry for my late response. I'm going to address review comments and merge it this weekend.

Collaborator

berkerpeksag commented Sep 16, 2017

Anything else to do here?

Sorry for my late response. I'm going to address review comments and merge it this weekend.

@berkerpeksag

This comment has been minimized.

Show comment
Hide comment
@berkerpeksag

berkerpeksag Oct 27, 2017

Collaborator

Agree with Benoit that the text doesn't need to suggest aiohttp.worker.GunicornWebWorker in particular, just a link to the docs that discuss the three options.

@tilgovi could you be more specific and give a link of that page? Did you mean http://docs.gunicorn.org/en/latest/design.html#async-workers ? I think it would be nice to point out a drop-in replacement in --worker-class documentation.

Here's my diff:

diff --git a/docs/source/run.rst b/docs/source/run.rst
index 516d2ea..4eacb0a 100644
--- a/docs/source/run.rst
+++ b/docs/source/run.rst
@@ -61,7 +61,7 @@ Commonly Used Arguments
   to run. You'll definitely want to read the production page for the
   implications of this parameter. You can set this to ``$(NAME)``
   where ``$(NAME)`` is one of ``sync``, ``eventlet``, ``gevent``,
-  ``tornado``, ``gthread``, ``gaiohttp`` (deprecated in Gunicorn 19.8).
+  ``tornado``, ``gthread``, ``gaiohttp`` (deprecated).
   ``sync`` is the default. See the :ref:`worker-class` documentation for more
   information.
 * ``-n APP_NAME, --name=APP_NAME`` - If setproctitle_ is installed you can
diff --git a/gunicorn/config.py b/gunicorn/config.py
index b74227d..169f10f 100644
--- a/gunicorn/config.py
+++ b/gunicorn/config.py
@@ -624,9 +624,7 @@ class WorkerClass(Setting):
         * ``gevent``   - Requires gevent >= 0.13
         * ``tornado``  - Requires tornado >= 0.2
         * ``gthread``  - Python 2 requires the futures package to be installed
-        * ``gaiohttp`` - Deprecated. Please use
-          ``aiohttp.worker.GunicornWebWorker`` instead. See :ref:`asyncio-workers`
-          for more information on how to use it.
+        * ``gaiohttp`` - Deprecated.
 
         Optionally, you can provide your own worker by giving Gunicorn a
         Python path to a subclass of ``gunicorn.workers.base.Worker``.
diff --git a/gunicorn/workers/gaiohttp.py b/gunicorn/workers/gaiohttp.py
index a5412cc..7d0227a 100644
--- a/gunicorn/workers/gaiohttp.py
+++ b/gunicorn/workers/gaiohttp.py
@@ -19,8 +19,8 @@ if sys.version_info >= (3, 4):
             from gunicorn.workers._gaiohttp import AiohttpWorker
 
         util.warn(
-            "The 'gaiohttp' worker is deprecated. Please install 'aiohttp' "
-            "and pass 'aiohttp.worker.GunicornWebWorker' to --worker-class."
+            "The 'gaiohttp' worker is deprecated. See --worker-class "
+            "documentation for more information."
         )
         __all__ = ['AiohttpWorker']
 else:
Collaborator

berkerpeksag commented Oct 27, 2017

Agree with Benoit that the text doesn't need to suggest aiohttp.worker.GunicornWebWorker in particular, just a link to the docs that discuss the three options.

@tilgovi could you be more specific and give a link of that page? Did you mean http://docs.gunicorn.org/en/latest/design.html#async-workers ? I think it would be nice to point out a drop-in replacement in --worker-class documentation.

Here's my diff:

diff --git a/docs/source/run.rst b/docs/source/run.rst
index 516d2ea..4eacb0a 100644
--- a/docs/source/run.rst
+++ b/docs/source/run.rst
@@ -61,7 +61,7 @@ Commonly Used Arguments
   to run. You'll definitely want to read the production page for the
   implications of this parameter. You can set this to ``$(NAME)``
   where ``$(NAME)`` is one of ``sync``, ``eventlet``, ``gevent``,
-  ``tornado``, ``gthread``, ``gaiohttp`` (deprecated in Gunicorn 19.8).
+  ``tornado``, ``gthread``, ``gaiohttp`` (deprecated).
   ``sync`` is the default. See the :ref:`worker-class` documentation for more
   information.
 * ``-n APP_NAME, --name=APP_NAME`` - If setproctitle_ is installed you can
diff --git a/gunicorn/config.py b/gunicorn/config.py
index b74227d..169f10f 100644
--- a/gunicorn/config.py
+++ b/gunicorn/config.py
@@ -624,9 +624,7 @@ class WorkerClass(Setting):
         * ``gevent``   - Requires gevent >= 0.13
         * ``tornado``  - Requires tornado >= 0.2
         * ``gthread``  - Python 2 requires the futures package to be installed
-        * ``gaiohttp`` - Deprecated. Please use
-          ``aiohttp.worker.GunicornWebWorker`` instead. See :ref:`asyncio-workers`
-          for more information on how to use it.
+        * ``gaiohttp`` - Deprecated.
 
         Optionally, you can provide your own worker by giving Gunicorn a
         Python path to a subclass of ``gunicorn.workers.base.Worker``.
diff --git a/gunicorn/workers/gaiohttp.py b/gunicorn/workers/gaiohttp.py
index a5412cc..7d0227a 100644
--- a/gunicorn/workers/gaiohttp.py
+++ b/gunicorn/workers/gaiohttp.py
@@ -19,8 +19,8 @@ if sys.version_info >= (3, 4):
             from gunicorn.workers._gaiohttp import AiohttpWorker
 
         util.warn(
-            "The 'gaiohttp' worker is deprecated. Please install 'aiohttp' "
-            "and pass 'aiohttp.worker.GunicornWebWorker' to --worker-class."
+            "The 'gaiohttp' worker is deprecated. See --worker-class "
+            "documentation for more information."
         )
         __all__ = ['AiohttpWorker']
 else:
@tilgovi

This comment has been minimized.

Show comment
Hide comment
@tilgovi

tilgovi Oct 30, 2017

Collaborator

I think linking to the new docs on AsyncIO from the documentation / usage for --worker-class is great, but I don't mind a direct reference to aiohttp.worker.GunicornWorker in the usage either. Both are fine!

Collaborator

tilgovi commented Oct 30, 2017

I think linking to the new docs on AsyncIO from the documentation / usage for --worker-class is great, but I don't mind a direct reference to aiohttp.worker.GunicornWorker in the usage either. Both are fine!

@berkerpeksag berkerpeksag merged commit 2dd7321 into benoitc:master Oct 31, 2017

1 of 8 checks passed

couverture-io/py26 Code coverage has worsened
Details
couverture-io/py27 Code coverage has worsened
Details
couverture-io/py34 Code coverage has worsened
Details
couverture-io/py35 Code coverage has worsened
Details
couverture-io/py36 Code coverage has worsened
Details
couverture-io/py36-dev Code coverage has worsened
Details
couverture-io/py37 Code coverage has worsened
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@berkerpeksag berkerpeksag deleted the berkerpeksag:gaiohttp branch Oct 31, 2017

@berkerpeksag berkerpeksag referenced this pull request Jan 9, 2018

Closed

Drop aiohttp support #1536

fofanov pushed a commit to fofanov/gunicorn that referenced this pull request Mar 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment