<p dir="auto">Hey, I am not able to get the help command working with the current celery (commit: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/celery/celery/commit/8bceb446e6a07682d4b8dd6199cdac450bd63578/hovercard" href="https://github.com/celery/celery/commit/8bceb446e6a07682d4b8dd6199cdac450bd63578"><tt>8bceb44</tt></a>). The issue exists with Celery <code class="notranslate">5.0.3</code> and <code class="notranslate">5.0.4</code>. When downgrading to <code class="notranslate">5.0.2</code> the command <code class="notranslate">celery</code> or <code class="notranslate">celery --help</code> returns the expected help message.</p>
<p dir="auto">See the Traceback in section '<strong>Actual Behavior</strong>'</p>
<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"> 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"> 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"> 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"> 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"> 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"> 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.4 (singularity) <em>(master @ commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/celery/celery/commit/8bceb446e6a07682d4b8dd6199cdac450bd63578/hovercard" href="https://github.com/celery/celery/commit/8bceb446e6a07682d4b8dd6199cdac450bd63578"><tt>8bceb44</tt></a>)</em></p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:5.0.4 (singularity) kombu:5.0.2 py:3.9.0
            billiard:3.6.3.0 py-amqp:5.0.2
platform -&gt; system:Linux arch:64bit, ELF
            kernel version:5.9.14-zen1-1-zen imp:CPython
loader   -&gt; celery.loaders.default.Loader
settings -&gt; transport:amqp results:disabled

deprecated_settings: None"><pre class="notranslate"><code class="notranslate">software -&gt; celery:5.0.4 (singularity) kombu:5.0.2 py:3.9.0
            billiard:3.6.3.0 py-amqp:5.0.2
platform -&gt; system:Linux arch:64bit, ELF
            kernel version:5.9.14-zen1-1-zen imp:CPython
loader   -&gt; celery.loaders.default.Loader
settings -&gt; transport:amqp results:disabled

deprecated_settings: None
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>

<ul dir="auto">
<li><strong>Minimal Python Version</strong>: Python 3.9.0 - not sure about other versions</li>
<li><strong>Minimal Celery Version</strong>: &gt;= 5.0.3</li>
<li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: <code class="notranslate">Arch Linux 5.9.14-zen1-1-zen #1 ZEN SMP PREEMPT</code></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="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"><pre class="notranslate"><code class="notranslate">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
</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><ol dir="auto">
<li><code class="notranslate">git clone https://github.com/celery/celery &lt;your/git/clone/celery/folder&gt;</code></li>
<li><code class="notranslate">cd &lt;your/git/clone/celery/folder&gt;</code></li>
<li><code class="notranslate">mkvirtualenv celery -a .</code></li>
<li><code class="notranslate">which python</code>  # verify that you are using the correct virtualenv</li>
<li><code class="notranslate">pip install -e .</code></li>
<li>enter: <code class="notranslate">celery</code> or <code class="notranslate">celery --help</code></li>
</ol>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">When installing <code class="notranslate">celery==5.0.2</code> this issue doesn't exist.</p>
<h1 dir="auto">Actual Behavior</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ git --no-pager log --oneline -1

8bceb446e (HEAD -&gt; master, origin/master, origin/HEAD) Fix type error in S3 backend (#6537)"><pre class="notranslate"><code class="notranslate">$ git --no-pager log --oneline -1

8bceb446e (HEAD -&gt; master, origin/master, origin/HEAD) Fix type error in S3 backend (#6537)
</code></pre></div>
<p dir="auto">Traceback</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ celery

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

Traceback (most recent call last):
  File "/home/peter/.virtualenvs/celery/bin/celery", line 33, in &lt;module&gt;
    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'
</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 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"> 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"> 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"> 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"> 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"> 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"> 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"> 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>:</p>

<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Commit 02f95470a781369d2b9c4fa7105d879fb0dae3b1 (March 4 2016) and later"><pre class="notranslate"><code class="notranslate">Commit 02f95470a781369d2b9c4fa7105d879fb0dae3b1 (March 4 2016) and later
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<p dir="auto">The <a href="http://docs.celeryproject.org/en/latest/userguide/configuration.html#task-routes" rel="nofollow"><code class="notranslate">task_routes</code></a> configuration parameter allows defining a task route using a glob syntax, for example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="task_routes = {
    'feed.tasks.*': 'feeds',
}"><pre class="notranslate"><code class="notranslate">task_routes = {
    'feed.tasks.*': 'feeds',
}
</code></pre></div>
<p dir="auto">Under the hood, <a href="https://github.com/celery/celery/blob/2c029c4f33d48c1951cc97628655a04024d50a0d/celery/app/routes.py#L36-L38">celery's code calls <code class="notranslate">celery.app.routes.glob_to_re</code></a> to convert these globs to a regular expression.  The replacement interprets <code class="notranslate">*</code> as the regular expression <code class="notranslate">.+?</code>, or, "one or more characters (non-greedy)".</p>
<p dir="auto">This behavior differs from globbing in other systems, like <a href="https://github.com/celery/celery/blob/2c029c4f33d48c1951cc97628655a04024d50a0d/celery/app/routes.py#L36-L38">bash</a>, <a href="https://docs.python.org/3.5/library/glob.html#glob.glob" rel="nofollow">python's glob module</a>, <a href="https://www.npmjs.com/package/glob" rel="nofollow">node glob</a>, and more, which all treat <code class="notranslate">*</code> as "zero or more characters".</p>
<p dir="auto">Given the "zero or more characters" standard, developers will probably expect this pattern:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="task_routes = {
  'feed.tasks.foo*': 'feeds',
}"><pre class="notranslate"><code class="notranslate">task_routes = {
  'feed.tasks.foo*': 'feeds',
}
</code></pre></div>
<p dir="auto">to match the task <code class="notranslate">feed.tasks.foo</code>.  In celery right now, it does not.</p>
<h2 dir="auto">Required Dependencies</h2>

<ul dir="auto">
<li><strong>Minimal Python Version</strong>: N/A</li>
<li><strong>Minimal Celery Version</strong>: N/A</li>
<li><strong>Minimal Kombu Version</strong>: N/A</li>
<li><strong>Minimal Broker Version</strong>: N/A</li>
<li><strong>Minimal Result Backend Version</strong>: N/A</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A</li>
<li><strong>Minimal Broker Client Version</strong>: N/A</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A</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="Not relevant for this ticket."><pre class="notranslate"><code class="notranslate">Not relevant for this ticket.
</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="from celery.app.routes import glob_to_re

regex = re.compile(glob_to_re('feed.tasks.foo*'))
assert regex.match('feed.tasks.foo')"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">celery</span>.<span class="pl-s1">app</span>.<span class="pl-s1">routes</span> <span class="pl-k">import</span> <span class="pl-s1">glob_to_re</span>

<span class="pl-s1">regex</span> <span class="pl-c1">=</span> <span class="pl-s1">re</span>.<span class="pl-en">compile</span>(<span class="pl-en">glob_to_re</span>(<span class="pl-s">'feed.tasks.foo*'</span>))
<span class="pl-k">assert</span> <span class="pl-s1">regex</span>.<span class="pl-en">match</span>(<span class="pl-s">'feed.tasks.foo'</span>)</pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>

<p dir="auto">This task route:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="task_routes = {
  'feed.tasks.foo*': 'feeds',
}"><pre class="notranslate"><code class="notranslate">task_routes = {
  'feed.tasks.foo*': 'feeds',
}
</code></pre></div>
<p dir="auto">should match a task named <code class="notranslate">feed.tasks.foo</code>, in addition to <code class="notranslate">feed.tasks.foox</code>.</p>
<h1 dir="auto">Actual Behavior</h1>

<p dir="auto">THe task <code class="notranslate">feed.tasks.foo</code> does not match, as celery expects an additional character to satisfy its interpretation of a glob <code class="notranslate">*</code> as "one or more characters (non-greedy)".</p>