<h1 dir="auto">Checklist</h1>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown &amp; rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>

<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment &amp; Settings</h2>

<p dir="auto"><strong>Celery version</strong>: 5.0.2</p>

<h1 dir="auto">Steps to Reproduce</h1>
<p dir="auto"><code class="notranslate">celery -A proj worker --pool=gevent</code></p>
<h2 dir="auto">Required Dependencies</h2>

<ul dir="auto">
<li><strong>Minimal Python Version</strong>: 3.6.9</li>
<li><strong>Minimal Celery Version</strong>: 5.0.2</li>
<li><strong>Minimal Kombu Version</strong>: 5.0.2</li>
<li><strong>Minimal Broker Version</strong>: rabbitmq_server-3.6.10</li>
<li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: Ubuntu 18.04</li>
<li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li>
</ul>
<h3 dir="auto">Python Packages</h3>

<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tornado~=6.0.2
mongoengine~=0.17.0
passlib==1.7.3
PyJWT==1.7.1
celery==5.0.2
twilio==6.0.0
pytest~=5.3.2
python-gitlab~=2.4.0
bcrypt==3.1.7
pandas~=1.1.2
boto3==1.15.1
botocore==1.18.1
validate_email==1.3
py3DNS==3.2.1
pillow~=7.2.0
requests
pyfcm==1.3.1
gevent==20.9.0
setuptools~=39.1.0"><pre class="notranslate"><code class="notranslate">tornado~=6.0.2
mongoengine~=0.17.0
passlib==1.7.3
PyJWT==1.7.1
celery==5.0.2
twilio==6.0.0
pytest~=5.3.2
python-gitlab~=2.4.0
bcrypt==3.1.7
pandas~=1.1.2
boto3==1.15.1
botocore==1.18.1
validate_email==1.3
py3DNS==3.2.1
pillow~=7.2.0
requests
pyfcm==1.3.1
gevent==20.9.0
setuptools~=39.1.0
</code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>

<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>

<details>
<p dir="auto">
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">Run Celery with gevent pool</p>

<h1 dir="auto">Actual Behavior</h1>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;/usr/local/bin/celery&quot;, line 8, in &lt;module&gt;
    sys.exit(main())
  File &quot;/usr/local/lib/python3.6/dist-packages/celery/__main__.py&quot;, line 14, in main
    from celery.bin.celery import main as _main
  File &quot;/usr/local/lib/python3.6/dist-packages/celery/bin/celery.py&quot;, line 15, in &lt;module&gt;
    from celery.bin.amqp import amqp
  File &quot;/usr/local/lib/python3.6/dist-packages/celery/bin/amqp.py&quot;, line 7, in &lt;module&gt;
    from click_repl import register_repl
  File &quot;/usr/local/lib/python3.6/dist-packages/click_repl/__init__.py&quot;, line 2, in &lt;module&gt;
    from prompt_toolkit.completion import Completer, Completion
  File &quot;/usr/local/lib/python3.6/dist-packages/prompt_toolkit/__init__.py&quot;, line 16, in &lt;module&gt;
    from .application import Application
  File &quot;/usr/local/lib/python3.6/dist-packages/prompt_toolkit/application/__init__.py&quot;, line 1, in &lt;module&gt;
    from .application import Application
  File &quot;/usr/local/lib/python3.6/dist-packages/prompt_toolkit/application/application.py&quot;, line 41, in &lt;module&gt;
    from prompt_toolkit.buffer import Buffer
  File &quot;/usr/local/lib/python3.6/dist-packages/prompt_toolkit/buffer.py&quot;, line 28, in &lt;module&gt;
    from .application.current import get_app
  File &quot;/usr/local/lib/python3.6/dist-packages/prompt_toolkit/application/current.py&quot;, line 75, in &lt;module&gt;
    &quot;_current_app_session&quot;, default=AppSession()
TypeError: 'type' object is not subscriptable"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
  File "/usr/local/bin/celery", line 8, in &lt;module&gt;
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/celery/__main__.py", line 14, in main
    from celery.bin.celery import main as _main
  File "/usr/local/lib/python3.6/dist-packages/celery/bin/celery.py", line 15, in &lt;module&gt;
    from celery.bin.amqp import amqp
  File "/usr/local/lib/python3.6/dist-packages/celery/bin/amqp.py", line 7, in &lt;module&gt;
    from click_repl import register_repl
  File "/usr/local/lib/python3.6/dist-packages/click_repl/__init__.py", line 2, in &lt;module&gt;
    from prompt_toolkit.completion import Completer, Completion
  File "/usr/local/lib/python3.6/dist-packages/prompt_toolkit/__init__.py", line 16, in &lt;module&gt;
    from .application import Application
  File "/usr/local/lib/python3.6/dist-packages/prompt_toolkit/application/__init__.py", line 1, in &lt;module&gt;
    from .application import Application
  File "/usr/local/lib/python3.6/dist-packages/prompt_toolkit/application/application.py", line 41, in &lt;module&gt;
    from prompt_toolkit.buffer import Buffer
  File "/usr/local/lib/python3.6/dist-packages/prompt_toolkit/buffer.py", line 28, in &lt;module&gt;
    from .application.current import get_app
  File "/usr/local/lib/python3.6/dist-packages/prompt_toolkit/application/current.py", line 75, in &lt;module&gt;
    "_current_app_session", default=AppSession()
TypeError: 'type' object is not subscriptable
</code></pre></div>
<h1 dir="auto">Checklist</h1>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?utf8=%E2%9C%93&amp;q=is%3Aissue+label%3A%22Category%3A+Documentation%22+">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues in this issue<br>
(If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>

<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h1 dir="auto">Description</h1>

<p dir="auto">The documentation for celery.app.Task describes an attribute <code class="notranslate">autoregister</code> and implies that if set to true the task will be registered automatically ("If disabled this task won’t be registered automatically."). However this feature has sadly been removed with the celery 4.0 release.<br>
<a href="https://docs.celeryproject.org/en/latest/reference/celery.app.task.html#autoregister" rel="nofollow">https://docs.celeryproject.org/en/latest/reference/celery.app.task.html#autoregister</a></p>
<p dir="auto">The attribute doesn't appear to be used anywhere, a quick search of the code base found only one other occurrence in the changelog for v1.0.</p>
<h1 dir="auto">Suggestions</h1>
<p dir="auto">Either re-add the automatic registration for class based tasks, remove the field or clarify the documentation.</p>