Issue 1:
Checklist

I have verified that the issue exists against the master branch of Celery.

This has already been asked to the discussion group first.

I have read the relevant section in the

contribution guide

on reporting bugs.

I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

I have checked the commit log

to find out if the bug was already fixed in the master branch.

I have included all related issues and possible duplicate issues

in this issue (If there are none, check this box anyway).

Mandatory Debugging Information

I have included the output of celery -A proj report in the issue.

(if you are not able to do this, then at least specify the Celery

version affected).

I have verified that the issue exists against the master branch of Celery.

I have included the contents of pip freeze in the issue.

I have included all the versions of all the external dependencies required

to reproduce this bug.

Optional Debugging Information

I have tried reproducing the issue on more than one Python version

and/or implementation.

I have tried reproducing the issue on more than one message broker and/or

result backend.

I have tried reproducing the issue on more than one version of the message

broker and/or result backend.

I have tried reproducing the issue on more than one operating system.

I have tried reproducing the issue on more than one workers pool.

I have tried reproducing the issue with autoscaling, retries,

ETA/Countdown & rate limits disabled.

I have tried reproducing the issue after downgrading

and/or upgrading Celery and its dependencies.

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Environment & Settings

Celery version: 5.0.2

Steps to Reproduce

celery -A proj worker --pool=gevent

Required Dependencies

Minimal Python Version: 3.6.9

Minimal Celery Version: 5.0.2

Minimal Kombu Version: 5.0.2

Minimal Broker Version: rabbitmq_server-3.6.10

Minimal Result Backend Version: N/A or Unknown

Minimal OS and/or Kernel Version: Ubuntu 18.04

Minimal Broker Client Version: N/A or Unknown

Minimal Result Backend Client Version: N/A or Unknown

Python Packages

pip freeze Output:

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

Other Dependencies

N/A

Minimally Reproducible Test Case

Expected Behavior

Run Celery with gevent pool

Actual Behavior

Traceback (most recent call last):
File "/usr/local/bin/celery", line 8, in <module>
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 <module>
from celery.bin.amqp import amqp
File "/usr/local/lib/python3.6/dist-packages/celery/bin/amqp.py", line 7, in <module>
from click_repl import register_repl
File "/usr/local/lib/python3.6/dist-packages/click_repl/__init__.py", line 2, in <module>
from prompt_toolkit.completion import Completer, Completion
File "/usr/local/lib/python3.6/dist-packages/prompt_toolkit/__init__.py", line 16, in <module>
from .application import Application
File "/usr/local/lib/python3.6/dist-packages/prompt_toolkit/application/__init__.py", line 1, in <module>
from .application import Application
File "/usr/local/lib/python3.6/dist-packages/prompt_toolkit/application/application.py", line 41, in <module>
from prompt_toolkit.buffer import Buffer
File "/usr/local/lib/python3.6/dist-packages/prompt_toolkit/buffer.py", line 28, in <module>
from .application.current import get_app
File "/usr/local/lib/python3.6/dist-packages/prompt_toolkit/application/current.py", line 75, in <module>
"_current_app_session", default=AppSession()
TypeError: 'type' object is not subscriptable

Issue 2:
Checklist

I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

I have checked the commit log

to find out if the bug was already fixed in the master branch.

I have included all related issues and possible duplicate issues in this issue

(If there are none, check this box anyway).

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Description

The documentation for celery.app.Task describes an attribute autoregister 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.

https://docs.celeryproject.org/en/latest/reference/celery.app.task.html#autoregister

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.

Suggestions

Either re-add the automatic registration for class based tasks, remove the field or clarify the documentation.