Issue 1:
Hey, I am not able to get the help command working with the current celery (commit: 8bceb44). The issue exists with Celery 5.0.3 and 5.0.4. When downgrading to 5.0.2 the command celery or celery --help returns the expected help message.

See the Traceback in section 'Actual Behavior'

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.4 (singularity) (master @ commit 8bceb44)

celery report Output:

software -> celery:5.0.4 (singularity) kombu:5.0.2 py:3.9.0
billiard:3.6.3.0 py-amqp:5.0.2
platform -> system:Linux arch:64bit, ELF
kernel version:5.9.14-zen1-1-zen imp:CPython
loader -> celery.loaders.default.Loader
settings -> transport:amqp results:disabled

deprecated_settings: None

Steps to Reproduce

Required Dependencies

Minimal Python Version: Python 3.9.0 - not sure about other versions

Minimal Celery Version: >= 5.0.3

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: Arch Linux 5.9.14-zen1-1-zen #1 ZEN SMP PREEMPT

Minimal Broker Client Version: N/A or Unknown

Minimal Result Backend Client Version: N/A or Unknown

Python Packages

pip freeze Output:

amqp==5.0.2
billiard==3.6.3.0
-e git+https://github.com/celery/celery.git@8bceb446e6a07682d4b8dd6199cdac450bd63578#egg=celery
click==7.1.2
click-didyoumean==0.0.3
click-plugins==1.1.1
click-repl==0.1.6
kombu==5.0.2
prompt-toolkit==3.0.8
pytz==2020.4
six==1.15.0
vine==5.0.0
wcwidth==0.2.5

Other Dependencies

N/A

Minimally Reproducible Test Case

git clone https://github.com/celery/celery <your/git/clone/celery/folder>

cd <your/git/clone/celery/folder>

mkvirtualenv celery -a .

which python # verify that you are using the correct virtualenv

pip install -e .

enter: celery or celery --help

Expected Behavior

When installing celery==5.0.2 this issue doesn't exist.

Actual Behavior

$ git --no-pager log --oneline -1

8bceb446e (HEAD -> master, origin/master, origin/HEAD) Fix type error in S3 backend (#6537)

Traceback

$ celery

Traceback (most recent call last):
File "/home/peter/.virtualenvs/celery/bin/celery", line 33, in <module>
sys.exit(load_entry_point('celery', 'console_scripts', 'celery')())
File "/home/peter/Development/celery/celery/__main__.py", line 15, in main
sys.exit(_main())
File "/home/peter/Development/celery/celery/bin/celery.py", line 213, in main
return celery(auto_envvar_prefix="CELERY")
File "/home/peter/.virtualenvs/celery/lib/python3.9/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/peter/.virtualenvs/celery/lib/python3.9/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/peter/.virtualenvs/celery/lib/python3.9/site-packages/click/core.py", line 1236, in invoke
return Command.invoke(self, ctx)
File "/home/peter/.virtualenvs/celery/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/peter/.virtualenvs/celery/lib/python3.9/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/peter/.virtualenvs/celery/lib/python3.9/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/peter/Development/celery/celery/bin/celery.py", line 128, in celery
click.echo(ctx.get_help())
File "/home/peter/.virtualenvs/celery/lib/python3.9/site-packages/click/core.py", line 570, in get_help
return self.command.get_help(self)
File "/home/peter/.virtualenvs/celery/lib/python3.9/site-packages/click/core.py", line 975, in get_help
self.format_help(ctx, formatter)
File "/home/peter/.virtualenvs/celery/lib/python3.9/site-packages/click/core.py", line 1003, in format_help
self.format_options(ctx, formatter)
File "/home/peter/.virtualenvs/celery/lib/python3.9/site-packages/click/core.py", line 1137, in format_options
self.format_commands(ctx, formatter)
File "/home/peter/.virtualenvs/celery/lib/python3.9/site-packages/click/core.py", line 1200, in format_commands
help = cmd.get_short_help_str(limit)
AttributeError: 'function' object has no attribute 'get_short_help_str'

Issue 2:
Checklist

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:

Commit 02f95470a781369d2b9c4fa7105d879fb0dae3b1 (March 4 2016) and later

Steps to Reproduce

The task_routes configuration parameter allows defining a task route using a glob syntax, for example:

task_routes = {
'feed.tasks.*': 'feeds',
}

Under the hood, celery's code calls celery.app.routes.glob_to_re to convert these globs to a regular expression. The replacement interprets * as the regular expression .+?, or, "one or more characters (non-greedy)".

This behavior differs from globbing in other systems, like bash, python's glob module, node glob, and more, which all treat * as "zero or more characters".

Given the "zero or more characters" standard, developers will probably expect this pattern:

task_routes = {
'feed.tasks.foo*': 'feeds',
}

to match the task feed.tasks.foo. In celery right now, it does not.

Required Dependencies

Minimal Python Version: N/A

Minimal Celery Version: N/A

Minimal Kombu Version: N/A

Minimal Broker Version: N/A

Minimal Result Backend Version: N/A

Minimal OS and/or Kernel Version: N/A

Minimal Broker Client Version: N/A

Minimal Result Backend Client Version: N/A

Python Packages

pip freeze Output:

Not relevant for this ticket.

Other Dependencies

N/A

Minimally Reproducible Test Case

from celery.app.routes import glob_to_re

regex = re.compile(glob_to_re('feed.tasks.foo*'))
assert regex.match('feed.tasks.foo')

Expected Behavior

This task route:

task_routes = {
'feed.tasks.foo*': 'feeds',
}

should match a task named feed.tasks.foo, in addition to feed.tasks.foox.

Actual Behavior

THe task feed.tasks.foo does not match, as celery expects an additional character to satisfy its interpretation of a glob * as "one or more characters (non-greedy)".