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:

celery report Output:

Steps to Reproduce

Required Dependencies

Minimal Python Version: N/A or Unknown

Minimal Celery Version: N/A or Unknown

Minimal Kombu Version: N/A or Unknown

Minimal Broker Version: N/A or Unknown

Minimal Result Backend Version: N/A or Unknown

Minimal OS and/or Kernel Version: N/A or Unknown

Minimal Broker Client Version: N/A or Unknown

Minimal Result Backend Client Version: N/A or Unknown

Python Packages

pip freeze Output:

Other Dependencies

N/A

Minimally Reproducible Test Case

Expected Behavior

Actual Behavior

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

As of 3cf5072, Tasks § Automatic naming and relative imports states:

celery/docs/userguide/tasks.rst

Lines 260 to 266
in
3cf5072

Relative imports and automatic name generation don't go well together,

so if you're using relative imports you should set the name explicitly.

For example if the client imports the module ``"myapp.tasks"``

as ``".tasks"``, and the worker imports the module as ``"myapp.tasks"``,

the generated names won't match and an :exc:`~@NotRegistered` error will

be raised by the worker.

However, it goes on to say:

celery/docs/userguide/tasks.rst

Lines 309 to 313
in
3cf5072

New-style relative imports are fine and can be used:

.. code-block:: python

from .module import foo # GOOD!

Hence, the documentation is inconsistent in saying whether or not new-style relative imports lead to inconsistent automatic task name generation for tasks contained within the imported module.

Suggestions

Celery 5.x: Celery 5.0 dropped support for Python 2 and only supports Python 3. Since Python 3 does not support old-style relative imports, the entire section can be dropped.

Celery 4.x: Change the description to the following:

For example if the client inside the "myapp" module imports the module "myapp.tasks" as "tasks", and the worker imports the module as "myapp.tasks", the generated names won't match and an :exc:~@NotRegistered error will be raised by the worker.