<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"> 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://github.com/celery/celery/discussions">discussions forum</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have read the relevant section in the<br>
<a href="https://docs.celeryq.dev/en/master/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"> 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"> 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>
<h1 dir="auto">Steps to Reproduce</h1>
<p dir="auto">I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.</p>
<ul dir="auto">
<li><code class="notranslate">python3 -sBm build -w --no-isolation</code></li>
<li>because I'm calling <code class="notranslate">build</code> with <code class="notranslate">--no-isolation</code> I'm using during all processes only locally installed modules</li>
<li>install .whl file in &lt;/install/prefix&gt;</li>
<li>run pytest with PYTHONPATH pointing to sitearch and sitelib inside &lt;/install/prefix&gt;</li>
</ul>
<p dir="auto">Here is pytest output:</p>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-celery-5.2.6-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-celery-5.2.6-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra --ignore t/unit/backends/test_mongodb.py --ignore t/unit/backends/test_mongod.py --ignore t/unit/backends/test_s3.py
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/celery-5.2.6, configfile: pytest.ini
plugins: subtests-0.7.0, timeout-2.1.0
collected 140 items / 1 error / 7 skipped

================================================================================== ERRORS ==================================================================================
___________________________________________________________ ERROR collecting t/unit/concurrency/test_prefork.py ____________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/concurrency/test_prefork.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
t/unit/concurrency/test_prefork.py:11: in &lt;module&gt;
    from celery.concurrency.asynpool import iterate_file_descriptors_safely
celery/concurrency/asynpool.py:29: in &lt;module&gt;
    from billiard.compat import buf_t, isblocking, setblocking
E   ImportError: cannot import name 'buf_t' from 'billiard.compat' (/usr/lib/python3.8/site-packages/billiard/compat.py)
============================================================================= warnings summary =============================================================================
t/integration/test_canvas.py:39
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/integration/test_canvas.py:39: PytestUnknownMarkWarning: Unknown pytest.mark.flaky - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    _flaky = pytest.mark.flaky(reruns=5, reruns_delay=1, cause=is_retryable_exception)

t/integration/test_inspect.py:15
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/integration/test_inspect.py:15: PytestUnknownMarkWarning: Unknown pytest.mark.flaky - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    _flaky = pytest.mark.flaky(reruns=5, reruns_delay=2)

t/integration/test_tasks.py:18
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/integration/test_tasks.py:18: PytestUnknownMarkWarning: Unknown pytest.mark.flaky - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    _flaky = pytest.mark.flaky(reruns=5, reruns_delay=2)

t/unit/app/test_app.py:919
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/app/test_app.py:919: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.masked_modules('multiprocessing.util')

t/unit/app/test_loaders.py:122
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/app/test_loaders.py:122: PytestUnknownMarkWarning: Unknown pytest.mark.patched_environ - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.patched_environ('CELERY_CONFIG_MODULE', 'celeryconfig.py')

t/unit/app/test_log.py:187
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/app/test_log.py:187: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.masked_modules('billiard.util')

t/unit/backends/test_cache.py:209
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cache.py:209: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.masked_modules('pylibmc')

t/unit/backends/test_cache.py:218
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cache.py:218: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.masked_modules('pylibmc', 'memcache')

t/unit/backends/test_cache.py:244
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cache.py:244: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.masked_modules('pylibmc')

t/unit/backends/test_cache.py:255
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cache.py:255: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.masked_modules('pylibmc')

t/unit/backends/test_cassandra.py:28
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:28: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.patched_module(*CASSANDRA_MODULES)

t/unit/backends/test_cassandra.py:40
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:40: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.patched_module(*CASSANDRA_MODULES)

t/unit/backends/test_cassandra.py:63
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:63: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.patched_module(*CASSANDRA_MODULES)

t/unit/backends/test_cassandra.py:69
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:69: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.patched_module(*CASSANDRA_MODULES)

t/unit/backends/test_cassandra.py:100
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:100: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.patched_module(*CASSANDRA_MODULES)

t/unit/fixups/test_django.py:57
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/fixups/test_django.py:57: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.masked_modules('django')

t/unit/fixups/test_django.py:268
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/fixups/test_django.py:268: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.patched_module('django', 'django.db', 'django.core',

t/unit/utils/test_serialization.py:20
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/utils/test_serialization.py:20: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.masked_modules('cPickle')

t/unit/worker/test_autoscale.py:103
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/worker/test_autoscale.py:103: PytestUnknownMarkWarning: Unknown pytest.mark.sleepdeprived_patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.sleepdeprived_patched_module(autoscale)

t/unit/worker/test_autoscale.py:219
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/worker/test_autoscale.py:219: PytestUnknownMarkWarning: Unknown pytest.mark.sleepdeprived_patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.sleepdeprived_patched_module(autoscale)

t/unit/worker/test_worker.py:806
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/worker/test_worker.py:806: PytestUnknownMarkWarning: Unknown pytest.mark.sleepdeprived_patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.sleepdeprived_patched_module(autoscale)

t/unit/worker/test_worker.py:855
  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/worker/test_worker.py:855: PytestUnknownMarkWarning: Unknown pytest.mark.sleepdeprived_patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.sleepdeprived_patched_module(autoscale)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] t/integration/test_backend.py:8: could not import 'azure': No module named 'azure'
SKIPPED [1] t/unit/backends/test_arangodb.py:17: could not import 'pyArango': No module named 'pyArango'
SKIPPED [1] t/unit/backends/test_azureblockblob.py:12: could not import 'azure.storage.blob': No module named 'azure'
SKIPPED [1] t/unit/backends/test_consul.py:7: could not import 'consul': No module named 'consul'
SKIPPED [1] t/unit/backends/test_cosmosdbsql.py:12: could not import 'pydocumentdb': No module named 'pydocumentdb'
SKIPPED [1] t/unit/backends/test_couchbase.py:20: could not import 'couchbase': No module named 'couchbase'
SKIPPED [1] t/unit/backends/test_couchdb.py:18: could not import 'pycouchdb': No module named 'pycouchdb'
ERROR t/unit/concurrency/test_prefork.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================================= 7 skipped, 22 warnings, 1 error in 4.90s ================================================================="><pre class="notranslate"><span class="pl-c1">+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-celery-5.2.6-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-celery-5.2.6-2.fc35.x86_64/usr/lib/python3.8/site-packages</span>
<span class="pl-c1">+ /usr/bin/pytest -ra --ignore t/unit/backends/test_mongodb.py --ignore t/unit/backends/test_mongod.py --ignore t/unit/backends/test_s3.py</span>
<span class="pl-c1">=========================================================================== test session starts ============================================================================</span>
<span class="pl-c1">platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0</span>
<span class="pl-c1">rootdir: /home/tkloczko/rpmbuild/BUILD/celery-5.2.6, configfile: pytest.ini</span>
<span class="pl-c1">plugins: subtests-0.7.0, timeout-2.1.0</span>
<span class="pl-c1">collected 140 items / 1 error / 7 skipped</span>

<span class="pl-c1">================================================================================== ERRORS ==================================================================================</span>
<span class="pl-c1">___________________________________________________________ ERROR collecting t/unit/concurrency/test_prefork.py ____________________________________________________________</span>
<span class="pl-c1">ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/concurrency/test_prefork.py'.</span>
<span class="pl-c1">Hint: make sure your test modules/packages have valid Python names.</span>
<span class="pl-c1">Traceback:</span>
<span class="pl-c1">/usr/lib64/python3.8/importlib/__init__.py:127: in import_module</span>
<span class="pl-c1">    return _bootstrap._gcd_import(name[level:], package, level)</span>
<span class="pl-c1">t/unit/concurrency/test_prefork.py:11: in &lt;module&gt;</span>
<span class="pl-c1">    from celery.concurrency.asynpool import iterate_file_descriptors_safely</span>
<span class="pl-c1">celery/concurrency/asynpool.py:29: in &lt;module&gt;</span>
<span class="pl-c1">    from billiard.compat import buf_t, isblocking, setblocking</span>
<span class="pl-c1">E   ImportError: cannot import name 'buf_t' from 'billiard.compat' (/usr/lib/python3.8/site-packages/billiard/compat.py)</span>
<span class="pl-c1">============================================================================= warnings summary =============================================================================</span>
<span class="pl-c1">t/integration/test_canvas.py:39</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/integration/test_canvas.py:39: PytestUnknownMarkWarning: Unknown pytest.mark.flaky - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    _flaky = pytest.mark.flaky(reruns=5, reruns_delay=1, cause=is_retryable_exception)</span>

<span class="pl-c1">t/integration/test_inspect.py:15</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/integration/test_inspect.py:15: PytestUnknownMarkWarning: Unknown pytest.mark.flaky - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    _flaky = pytest.mark.flaky(reruns=5, reruns_delay=2)</span>

<span class="pl-c1">t/integration/test_tasks.py:18</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/integration/test_tasks.py:18: PytestUnknownMarkWarning: Unknown pytest.mark.flaky - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    _flaky = pytest.mark.flaky(reruns=5, reruns_delay=2)</span>

<span class="pl-c1">t/unit/app/test_app.py:919</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/app/test_app.py:919: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.masked_modules('multiprocessing.util')</span>

<span class="pl-c1">t/unit/app/test_loaders.py:122</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/app/test_loaders.py:122: PytestUnknownMarkWarning: Unknown pytest.mark.patched_environ - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.patched_environ('CELERY_CONFIG_MODULE', 'celeryconfig.py')</span>

<span class="pl-c1">t/unit/app/test_log.py:187</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/app/test_log.py:187: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.masked_modules('billiard.util')</span>

<span class="pl-c1">t/unit/backends/test_cache.py:209</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cache.py:209: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.masked_modules('pylibmc')</span>

<span class="pl-c1">t/unit/backends/test_cache.py:218</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cache.py:218: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.masked_modules('pylibmc', 'memcache')</span>

<span class="pl-c1">t/unit/backends/test_cache.py:244</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cache.py:244: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.masked_modules('pylibmc')</span>

<span class="pl-c1">t/unit/backends/test_cache.py:255</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cache.py:255: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.masked_modules('pylibmc')</span>

<span class="pl-c1">t/unit/backends/test_cassandra.py:28</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:28: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.patched_module(*CASSANDRA_MODULES)</span>

<span class="pl-c1">t/unit/backends/test_cassandra.py:40</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:40: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.patched_module(*CASSANDRA_MODULES)</span>

<span class="pl-c1">t/unit/backends/test_cassandra.py:63</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:63: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.patched_module(*CASSANDRA_MODULES)</span>

<span class="pl-c1">t/unit/backends/test_cassandra.py:69</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:69: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.patched_module(*CASSANDRA_MODULES)</span>

<span class="pl-c1">t/unit/backends/test_cassandra.py:100</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:100: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.patched_module(*CASSANDRA_MODULES)</span>

<span class="pl-c1">t/unit/fixups/test_django.py:57</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/fixups/test_django.py:57: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.masked_modules('django')</span>

<span class="pl-c1">t/unit/fixups/test_django.py:268</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/fixups/test_django.py:268: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.patched_module('django', 'django.db', 'django.core',</span>

<span class="pl-c1">t/unit/utils/test_serialization.py:20</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/utils/test_serialization.py:20: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.masked_modules('cPickle')</span>

<span class="pl-c1">t/unit/worker/test_autoscale.py:103</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/worker/test_autoscale.py:103: PytestUnknownMarkWarning: Unknown pytest.mark.sleepdeprived_patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.sleepdeprived_patched_module(autoscale)</span>

<span class="pl-c1">t/unit/worker/test_autoscale.py:219</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/worker/test_autoscale.py:219: PytestUnknownMarkWarning: Unknown pytest.mark.sleepdeprived_patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.sleepdeprived_patched_module(autoscale)</span>

<span class="pl-c1">t/unit/worker/test_worker.py:806</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/worker/test_worker.py:806: PytestUnknownMarkWarning: Unknown pytest.mark.sleepdeprived_patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.sleepdeprived_patched_module(autoscale)</span>

<span class="pl-c1">t/unit/worker/test_worker.py:855</span>
<span class="pl-c1">  /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/worker/test_worker.py:855: PytestUnknownMarkWarning: Unknown pytest.mark.sleepdeprived_patched_module - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1">    @pytest.mark.sleepdeprived_patched_module(autoscale)</span>

<span class="pl-c1">-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html</span>
<span class="pl-c1">========================================================================= short test summary info ==========================================================================</span>
<span class="pl-c1">SKIPPED [1] t/integration/test_backend.py:8: could not import 'azure': No module named 'azure'</span>
<span class="pl-c1">SKIPPED [1] t/unit/backends/test_arangodb.py:17: could not import 'pyArango': No module named 'pyArango'</span>
<span class="pl-c1">SKIPPED [1] t/unit/backends/test_azureblockblob.py:12: could not import 'azure.storage.blob': No module named 'azure'</span>
<span class="pl-c1">SKIPPED [1] t/unit/backends/test_consul.py:7: could not import 'consul': No module named 'consul'</span>
<span class="pl-c1">SKIPPED [1] t/unit/backends/test_cosmosdbsql.py:12: could not import 'pydocumentdb': No module named 'pydocumentdb'</span>
<span class="pl-c1">SKIPPED [1] t/unit/backends/test_couchbase.py:20: could not import 'couchbase': No module named 'couchbase'</span>
<span class="pl-c1">SKIPPED [1] t/unit/backends/test_couchdb.py:18: could not import 'pycouchdb': No module named 'pycouchdb'</span>
<span class="pl-c1">ERROR t/unit/concurrency/test_prefork.py</span>
<span class="pl-c1">!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</span>
<span class="pl-c1">================================================================= 7 skipped, 22 warnings, 1 error in 4.90s =================================================================</span></pre></div>
<p dir="auto">List of modules installed in build env</p>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Package                       Version
----------------------------- -----------------
alabaster                     0.7.12
amqp                          5.1.1
async-timeout                 4.0.2
attrs                         21.4.0
Babel                         2.10.1
billiard                      4.0.0
boto3                         1.22.5
botocore                      1.25.5
Brlapi                        0.8.3
build                         0.7.0
certifi                       2021.10.8
cffi                          1.15.0
charset-normalizer            2.0.12
click                         8.1.2
click-didyoumean              0.3.0
codespell                     2.1.0
cryptography                  36.0.2
cycler                        0.11.0
Deprecated                    1.2.13
distro                        1.7.0
dnspython                     2.2.1
docutils                      0.17.1
elastic-transport             8.1.2
elasticsearch                 8.1.3
eventlet                      0.33.0
extras                        1.0.0
fixtures                      4.0.0
fonttools                     4.33.3
future                        0.18.2
gevent                        21.12.0
gpg                           1.17.1-unknown
greenlet                      1.1.2
idna                          3.3
imagesize                     1.3.0
importlib-metadata            4.11.3
iniconfig                     1.1.1
Jinja2                        3.1.1
jmespath                      1.0.0
kiwisolver                    1.3.2
kombu                         5.2.4
libcomps                      0.1.18
louis                         3.21.0
MarkupSafe                    2.1.1
matplotlib                    3.5.1
msgpack                       1.0.3
numpy                         1.22.3
olefile                       0.46
packaging                     21.3
pbr                           5.8.1
pep517                        0.12.0
Pillow                        9.1.0
pip                           22.0.4
pluggy                        1.0.0
ply                           3.11
py                            1.11.0
pycparser                     2.21
Pygments                      2.12.0
PyGObject                     3.42.1
pyparsing                     3.0.8
pytest                        7.1.2
pytest-subtests               0.7.0
pytest-timeout                2.1.0
python-dateutil               2.8.2
pytz                          2022.1
PyYAML                        6.0
redis                         4.2.2
requests                      2.27.1
rpm                           4.17.0
s3transfer                    0.5.2
setuptools                    62.0.0
six                           1.16.0
snowballstemmer               2.2.0
Sphinx                        4.5.0
sphinx-celery                 2.0.0
sphinx-click                  4.0.0
sphinxcontrib-applehelp       1.0.2.dev20220410
sphinxcontrib-devhelp         1.0.2.dev20220410
sphinxcontrib-htmlhelp        2.0.0
sphinxcontrib-jsmath          1.0.1.dev20220410
sphinxcontrib-qthelp          1.0.3.dev20220410
sphinxcontrib-serializinghtml 1.1.5
SQLAlchemy                    1.4.36.dev0
testtools                     2.5.0
tomli                         2.0.1
urllib3                       1.26.9
vine                          5.0.0
wheel                         0.37.1
wrapt                         1.14.0
zipp                          3.8.0
zope.event                    4.5.0
zope.interface                5.4.0"><pre class="notranslate"><span class="pl-c1">Package                       Version</span>
<span class="pl-c1">----------------------------- -----------------</span>
<span class="pl-c1">alabaster                     0.7.12</span>
<span class="pl-c1">amqp                          5.1.1</span>
<span class="pl-c1">async-timeout                 4.0.2</span>
<span class="pl-c1">attrs                         21.4.0</span>
<span class="pl-c1">Babel                         2.10.1</span>
<span class="pl-c1">billiard                      4.0.0</span>
<span class="pl-c1">boto3                         1.22.5</span>
<span class="pl-c1">botocore                      1.25.5</span>
<span class="pl-c1">Brlapi                        0.8.3</span>
<span class="pl-c1">build                         0.7.0</span>
<span class="pl-c1">certifi                       2021.10.8</span>
<span class="pl-c1">cffi                          1.15.0</span>
<span class="pl-c1">charset-normalizer            2.0.12</span>
<span class="pl-c1">click                         8.1.2</span>
<span class="pl-c1">click-didyoumean              0.3.0</span>
<span class="pl-c1">codespell                     2.1.0</span>
<span class="pl-c1">cryptography                  36.0.2</span>
<span class="pl-c1">cycler                        0.11.0</span>
<span class="pl-c1">Deprecated                    1.2.13</span>
<span class="pl-c1">distro                        1.7.0</span>
<span class="pl-c1">dnspython                     2.2.1</span>
<span class="pl-c1">docutils                      0.17.1</span>
<span class="pl-c1">elastic-transport             8.1.2</span>
<span class="pl-c1">elasticsearch                 8.1.3</span>
<span class="pl-c1">eventlet                      0.33.0</span>
<span class="pl-c1">extras                        1.0.0</span>
<span class="pl-c1">fixtures                      4.0.0</span>
<span class="pl-c1">fonttools                     4.33.3</span>
<span class="pl-c1">future                        0.18.2</span>
<span class="pl-c1">gevent                        21.12.0</span>
<span class="pl-c1">gpg                           1.17.1-unknown</span>
<span class="pl-c1">greenlet                      1.1.2</span>
<span class="pl-c1">idna                          3.3</span>
<span class="pl-c1">imagesize                     1.3.0</span>
<span class="pl-c1">importlib-metadata            4.11.3</span>
<span class="pl-c1">iniconfig                     1.1.1</span>
<span class="pl-c1">Jinja2                        3.1.1</span>
<span class="pl-c1">jmespath                      1.0.0</span>
<span class="pl-c1">kiwisolver                    1.3.2</span>
<span class="pl-c1">kombu                         5.2.4</span>
<span class="pl-c1">libcomps                      0.1.18</span>
<span class="pl-c1">louis                         3.21.0</span>
<span class="pl-c1">MarkupSafe                    2.1.1</span>
<span class="pl-c1">matplotlib                    3.5.1</span>
<span class="pl-c1">msgpack                       1.0.3</span>
<span class="pl-c1">numpy                         1.22.3</span>
<span class="pl-c1">olefile                       0.46</span>
<span class="pl-c1">packaging                     21.3</span>
<span class="pl-c1">pbr                           5.8.1</span>
<span class="pl-c1">pep517                        0.12.0</span>
<span class="pl-c1">Pillow                        9.1.0</span>
<span class="pl-c1">pip                           22.0.4</span>
<span class="pl-c1">pluggy                        1.0.0</span>
<span class="pl-c1">ply                           3.11</span>
<span class="pl-c1">py                            1.11.0</span>
<span class="pl-c1">pycparser                     2.21</span>
<span class="pl-c1">Pygments                      2.12.0</span>
<span class="pl-c1">PyGObject                     3.42.1</span>
<span class="pl-c1">pyparsing                     3.0.8</span>
<span class="pl-c1">pytest                        7.1.2</span>
<span class="pl-c1">pytest-subtests               0.7.0</span>
<span class="pl-c1">pytest-timeout                2.1.0</span>
<span class="pl-c1">python-dateutil               2.8.2</span>
<span class="pl-c1">pytz                          2022.1</span>
<span class="pl-c1">PyYAML                        6.0</span>
<span class="pl-c1">redis                         4.2.2</span>
<span class="pl-c1">requests                      2.27.1</span>
<span class="pl-c1">rpm                           4.17.0</span>
<span class="pl-c1">s3transfer                    0.5.2</span>
<span class="pl-c1">setuptools                    62.0.0</span>
<span class="pl-c1">six                           1.16.0</span>
<span class="pl-c1">snowballstemmer               2.2.0</span>
<span class="pl-c1">Sphinx                        4.5.0</span>
<span class="pl-c1">sphinx-celery                 2.0.0</span>
<span class="pl-c1">sphinx-click                  4.0.0</span>
<span class="pl-c1">sphinxcontrib-applehelp       1.0.2.dev20220410</span>
<span class="pl-c1">sphinxcontrib-devhelp         1.0.2.dev20220410</span>
<span class="pl-c1">sphinxcontrib-htmlhelp        2.0.0</span>
<span class="pl-c1">sphinxcontrib-jsmath          1.0.1.dev20220410</span>
<span class="pl-c1">sphinxcontrib-qthelp          1.0.3.dev20220410</span>
<span class="pl-c1">sphinxcontrib-serializinghtml 1.1.5</span>
<span class="pl-c1">SQLAlchemy                    1.4.36.dev0</span>
<span class="pl-c1">testtools                     2.5.0</span>
<span class="pl-c1">tomli                         2.0.1</span>
<span class="pl-c1">urllib3                       1.26.9</span>
<span class="pl-c1">vine                          5.0.0</span>
<span class="pl-c1">wheel                         0.37.1</span>
<span class="pl-c1">wrapt                         1.14.0</span>
<span class="pl-c1">zipp                          3.8.0</span>
<span class="pl-c1">zope.event                    4.5.0</span>
<span class="pl-c1">zope.interface                5.4.0</span></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 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=""> 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. (Yeah, the bug's just closed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="481269447" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5678" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/5678/hovercard" href="https://github.com/celery/celery/issues/5678">#5678</a> )</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><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="481269447" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5678" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/5678/hovercard" href="https://github.com/celery/celery/issues/5678">#5678</a></li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="481269447" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5678" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/5678/hovercard" href="https://github.com/celery/celery/issues/5678">#5678</a></li>
</ul>
<h2 dir="auto">Environment &amp; Settings</h2>

<p dir="auto"><strong>Celery version</strong>: 4.4.0 (cliffs)</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:4.4.0 (cliffs) kombu:4.6.7 py:3.6.9
            billiard:3.6.1.0 py-amqp:2.5.2
platform -&gt; system:Linux arch:64bit, ELF
            kernel version:4.15.0-88-generic imp:CPython
loader   -&gt; celery.loaders.app.AppLoader
settings -&gt; transport:pyamqp results:rpc://guest:**@localhost:5672//

accept_content: ['json']
broker_url: 'amqp://guest:********@localhost:5672//'
broker_use_ssl: {
    'ca_certs': '/home/n0g/certs/privates/home/testca/ca_certificate.pem',
    'cert_reqs': &lt;VerifyMode.CERT_OPTIONAL: 1&gt;,
    'certfile': '/home/n0g/certs/privates/home/server/server_certificate.pem',
    'keyfile': '********',
    'ssl_version': &lt;_SSLMethod.PROTOCOL_TLS: 2&gt;}
enable_utc: True
imports:
    ('*********************',)
os: &lt;module 'os' from '/usr/lib/python3.6/os.py'&gt;
result_backend: 'rpc://guest:********@localhost:5672//'
result_persistent: True
result_serializer: 'json'
ssl: &lt;module 'ssl' from '/usr/lib/python3.6/ssl.py'&gt;
task_annotations: {
    '***********************************': {   'rate_limit': '6/h',
                                              'serializer': 'json'}}
task_serializer: 'json'
timezone: 'UTC'
"><pre class="notranslate"><code class="notranslate">software -&gt; celery:4.4.0 (cliffs) kombu:4.6.7 py:3.6.9
            billiard:3.6.1.0 py-amqp:2.5.2
platform -&gt; system:Linux arch:64bit, ELF
            kernel version:4.15.0-88-generic imp:CPython
loader   -&gt; celery.loaders.app.AppLoader
settings -&gt; transport:pyamqp results:rpc://guest:**@localhost:5672//

accept_content: ['json']
broker_url: 'amqp://guest:********@localhost:5672//'
broker_use_ssl: {
    'ca_certs': '/home/n0g/certs/privates/home/testca/ca_certificate.pem',
    'cert_reqs': &lt;VerifyMode.CERT_OPTIONAL: 1&gt;,
    'certfile': '/home/n0g/certs/privates/home/server/server_certificate.pem',
    'keyfile': '********',
    'ssl_version': &lt;_SSLMethod.PROTOCOL_TLS: 2&gt;}
enable_utc: True
imports:
    ('*********************',)
os: &lt;module 'os' from '/usr/lib/python3.6/os.py'&gt;
result_backend: 'rpc://guest:********@localhost:5672//'
result_persistent: True
result_serializer: 'json'
ssl: &lt;module 'ssl' from '/usr/lib/python3.6/ssl.py'&gt;
task_annotations: {
    '***********************************': {   'rate_limit': '6/h',
                                              'serializer': 'json'}}
task_serializer: 'json'
timezone: 'UTC'

</code></pre></div>
<p dir="auto">But let's try a run output too</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -------------- celery@nginsburg-desktop v4.4.0 (cliffs)
--- ***** -----
-- ******* ---- Linux-4.15.0-88-generic-x86_64-with-Ubuntu-18.04-bionic 2020-02-25 12:53:38
- *** --- * ---
- ** ---------- [config]
- ** ---------- .&gt; app:         __main__:0x7fd0390eb160
- ** ---------- .&gt; transport:   amqp://guest:**@localhost:5672//
- ** ---------- .&gt; results:     rpc://
- *** --- * --- .&gt; concurrency: 4 (prefork)
-- ******* ---- .&gt; task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
 -------------- [queues]
                .&gt; celery           exchange=celery(direct) key=celery


[tasks]
  . ***************************

[2020-02-25 12:53:39,235: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:852).
Trying again in 2.00 seconds... (1/100)
"><pre class="notranslate"><code class="notranslate"> -------------- celery@nginsburg-desktop v4.4.0 (cliffs)
--- ***** -----
-- ******* ---- Linux-4.15.0-88-generic-x86_64-with-Ubuntu-18.04-bionic 2020-02-25 12:53:38
- *** --- * ---
- ** ---------- [config]
- ** ---------- .&gt; app:         __main__:0x7fd0390eb160
- ** ---------- .&gt; transport:   amqp://guest:**@localhost:5672//
- ** ---------- .&gt; results:     rpc://
- *** --- * --- .&gt; concurrency: 4 (prefork)
-- ******* ---- .&gt; task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
 -------------- [queues]
                .&gt; celery           exchange=celery(direct) key=celery


[tasks]
  . ***************************

[2020-02-25 12:53:39,235: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:852).
Trying again in 2.00 seconds... (1/100)

</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<ul dir="auto">
<li>setup rabbitmq for tls</li>
<li>setup a celery app to use rabbitmq and rpc</li>
<li>try to run the celery app</li>
</ul>
<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>: 4.4.0</li>
<li><strong>Minimal Kombu Version</strong>: 4.6.7</li>
<li><strong>Minimal Broker Version</strong>: RabbitMQ 3.8.2</li>
<li><strong>Minimal Result Backend Version</strong>: amqp 2.5.2<br>
al OS and/or Kernel Version**: 4.15.0-88-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="171019" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/88" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/88/hovercard" href="https://github.com/celery/celery/issues/88">#88</a>-Ubuntu SMP Tue Feb 11 20:11:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux</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==2.5.2
APScheduler==3.6.3
asn1crypto==1.3.0
astroid==2.3.3
attrs==19.3.0
bcrypt==3.1.7
billiard==3.6.1.0
blinker==1.4
celery==4.4.0
certifi==2019.11.28
cffi==1.13.2
chardet==3.0.4
cli-helpers==1.2.1
Click==7.0
configobj==5.0.6
cryptography==2.8
decorator==4.4.1
docopt==0.6.2
enum34==1.1.6
filelock==3.0.12
Flask==1.1.1
Flask-SQLAlchemy==2.4.1
genson==1.1.0
gunicorn==20.0.4
humanize==0.5.1
idna==2.8
importlib-metadata==1.4.0
ipaddress==1.0.23
isort==4.3.21
itsdangerous==1.1.0
Jinja2==2.11.0
kafka==1.3.5
kombu==4.6.7
lazy-object-proxy==1.4.3
ldap3==2.6.1
libmfa==1.0.2
MarkupSafe==1.1.1
mccabe==0.6.1
mirakuru==2.1.2
more-itertools==8.2.0
netaddr==0.7.19
ntlm-auth==1.4.0
packaging==20.1
paramiko==2.7.1
pg8000==1.13.2
pgcli==2.2.0
pgspecial==1.11.9
pkg-resources==0.0.0
pluggy==0.13.1
port-for==0.4
prompt-toolkit==2.0.10
psutil==5.6.7
psycopg2==2.8.4
py==1.8.1
pyasn1==0.4.8
pycparser==2.19
Pygments==2.5.2
pylint==2.4.4
pylint-flask-sqlalchemy==0.2.0
PyNaCl==1.3.0
pyOpenSSL==19.1.0
pyparsing==2.4.6
pyproxy==1.0.0
pyrsistent==0.15.7
PySocks==1.7.1
pyTenable==1.0.5
pytest==5.3.5
pytest-postgresql==2.2.1
python-dateutil==2.8.1
pytz==2019.3
PyYAML==5.3
requests==2.22.0
requests-ntlm==1.1.0
scp==0.13.2
scramp==1.1.0
semver==2.9.0
setproctitle==1.1.10
six==1.13.0
SQLAlchemy==1.3.13
SQLAlchemy-Utils==0.36.1
sqlparse==0.3.0
tabulate==0.8.6
terminaltables==3.1.0
testing.common.database==2.0.3
testing.postgresql==1.3.0
toml==0.10.0
tox==3.14.3
typed-ast==1.4.1
tzlocal==2.0.0
urllib3==1.25.8
vine==1.3.0
virtualenv==16.7.9
wcwidth==0.1.8
Werkzeug==0.16.1
wrapt==1.11.2
xmltodict==0.12.0
zipp==2.1.0
"><pre class="notranslate"><code class="notranslate">amqp==2.5.2
APScheduler==3.6.3
asn1crypto==1.3.0
astroid==2.3.3
attrs==19.3.0
bcrypt==3.1.7
billiard==3.6.1.0
blinker==1.4
celery==4.4.0
certifi==2019.11.28
cffi==1.13.2
chardet==3.0.4
cli-helpers==1.2.1
Click==7.0
configobj==5.0.6
cryptography==2.8
decorator==4.4.1
docopt==0.6.2
enum34==1.1.6
filelock==3.0.12
Flask==1.1.1
Flask-SQLAlchemy==2.4.1
genson==1.1.0
gunicorn==20.0.4
humanize==0.5.1
idna==2.8
importlib-metadata==1.4.0
ipaddress==1.0.23
isort==4.3.21
itsdangerous==1.1.0
Jinja2==2.11.0
kafka==1.3.5
kombu==4.6.7
lazy-object-proxy==1.4.3
ldap3==2.6.1
libmfa==1.0.2
MarkupSafe==1.1.1
mccabe==0.6.1
mirakuru==2.1.2
more-itertools==8.2.0
netaddr==0.7.19
ntlm-auth==1.4.0
packaging==20.1
paramiko==2.7.1
pg8000==1.13.2
pgcli==2.2.0
pgspecial==1.11.9
pkg-resources==0.0.0
pluggy==0.13.1
port-for==0.4
prompt-toolkit==2.0.10
psutil==5.6.7
psycopg2==2.8.4
py==1.8.1
pyasn1==0.4.8
pycparser==2.19
Pygments==2.5.2
pylint==2.4.4
pylint-flask-sqlalchemy==0.2.0
PyNaCl==1.3.0
pyOpenSSL==19.1.0
pyparsing==2.4.6
pyproxy==1.0.0
pyrsistent==0.15.7
PySocks==1.7.1
pyTenable==1.0.5
pytest==5.3.5
pytest-postgresql==2.2.1
python-dateutil==2.8.1
pytz==2019.3
PyYAML==5.3
requests==2.22.0
requests-ntlm==1.1.0
scp==0.13.2
scramp==1.1.0
semver==2.9.0
setproctitle==1.1.10
six==1.13.0
SQLAlchemy==1.3.13
SQLAlchemy-Utils==0.36.1
sqlparse==0.3.0
tabulate==0.8.6
terminaltables==3.1.0
testing.common.database==2.0.3
testing.postgresql==1.3.0
toml==0.10.0
tox==3.14.3
typed-ast==1.4.1
tzlocal==2.0.0
urllib3==1.25.8
vine==1.3.0
virtualenv==16.7.9
wcwidth==0.1.8
Werkzeug==0.16.1
wrapt==1.11.2
xmltodict==0.12.0
zipp==2.1.0

</code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>

<details>
<p dir="auto">
</p><p dir="auto">rabbitmq.conf</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ssl_options.cacertfile = /home/testca/ca_certificate.pem
ssl_options.certfile   = /home/server/server_certificate.pem
ssl_options.keyfile    = /home/server/private_key.pem
ssl_options.verify     = verify_peer
ssl_options.fail_if_no_peer_cert = false
ssl_options.versions.1 = tlsv1.2
ssl_options.versions.2 = tlsv1.1
listeners.ssl.default = 5672
listeners.tcp  = none
management.ssl.port       = 15672
management.ssl.cacertfile = /home/testca/ca_certificate.pem
management.ssl.certfile   = /home/server/server_certificate.pem
management.ssl.keyfile    = /home/server/private_key.pem
management.ssl.verify     = verify_peer
management.ssl.fail_if_no_peer_cert = false"><pre class="notranslate"><code class="notranslate">ssl_options.cacertfile = /home/testca/ca_certificate.pem
ssl_options.certfile   = /home/server/server_certificate.pem
ssl_options.keyfile    = /home/server/private_key.pem
ssl_options.verify     = verify_peer
ssl_options.fail_if_no_peer_cert = false
ssl_options.versions.1 = tlsv1.2
ssl_options.versions.2 = tlsv1.1
listeners.ssl.default = 5672
listeners.tcp  = none
management.ssl.port       = 15672
management.ssl.cacertfile = /home/testca/ca_certificate.pem
management.ssl.certfile   = /home/server/server_certificate.pem
management.ssl.keyfile    = /home/server/private_key.pem
management.ssl.verify     = verify_peer
management.ssl.fail_if_no_peer_cert = false
</code></pre></div>
<p dir="auto"></p>
<p dir="auto">
</p><p dir="auto">celeryconfig.py</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import os
import ssl

  # pylint: disable=invalid-name
broker_use_ssl = {
    # 'keyfile': '/tmp/certs/private_key.pem',
    'keyfile': os.path.expanduser('~/certs/privates/home/server/private_key.pem'),
    # 'keyfile': '/tmp/certs/privates/home/testca/private/ca_private_key.pem',
    'certfile': os.path.expanduser('~/certs/privates/home/server/server_certificate.pem'),
    'ca_certs': os.path.expanduser('~/certs/privates/home/testca/ca_certificate.pem'),
    'cert_reqs': ssl.CERT_OPTIONAL,
    'ssl_version': ssl.PROTOCOL_TLS
}
broker_url = os.environ.get('BROKER_URL', default=&quot;pyamqp://guest:guest@localhost:5672//&quot;)
result_backend = os.environ.get('RESULT_BACKEND_URL', default=&quot;rpc://guest:guest@localhost:5672//&quot;)

task_serializer = 'json'
result_serializer = 'json'
accept_content = ['json']
timezone = 'UTC'
enable_utc = True

imports = (
    '*****************************',
)

task_annotations = {
    '*******************************': {
    'rate_limit': '6/h',
     'serializer': 'json',
     }
}

result_persistent = True"><pre class="notranslate"><code class="notranslate">import os
import ssl

  # pylint: disable=invalid-name
broker_use_ssl = {
    # 'keyfile': '/tmp/certs/private_key.pem',
    'keyfile': os.path.expanduser('~/certs/privates/home/server/private_key.pem'),
    # 'keyfile': '/tmp/certs/privates/home/testca/private/ca_private_key.pem',
    'certfile': os.path.expanduser('~/certs/privates/home/server/server_certificate.pem'),
    'ca_certs': os.path.expanduser('~/certs/privates/home/testca/ca_certificate.pem'),
    'cert_reqs': ssl.CERT_OPTIONAL,
    'ssl_version': ssl.PROTOCOL_TLS
}
broker_url = os.environ.get('BROKER_URL', default="pyamqp://guest:guest@localhost:5672//")
result_backend = os.environ.get('RESULT_BACKEND_URL', default="rpc://guest:guest@localhost:5672//")

task_serializer = 'json'
result_serializer = 'json'
accept_content = ['json']
timezone = 'UTC'
enable_utc = True

imports = (
    '*****************************',
)

task_annotations = {
    '*******************************': {
    'rate_limit': '6/h',
     'serializer': 'json',
     }
}

result_persistent = True
</code></pre></div>
<p dir="auto"></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">I would expect celery to be able to utilize TLSv1.2, so that a connection would be established between celery and rabbitmq over ssl</p>
<h1 dir="auto">Actual Behavior</h1>

<p dir="auto">as you can see in the celery output; it is not attempting to communicate over TLS. Which means either the client or the server does not support TLSv1.2. As the default  python protocol documentation states <code class="notranslate">Selects the highest protocol version that both the client and server support. Despite the name, this option can select both “SSL” and “TLS” protocols.</code></p>
<p dir="auto">So let's use openssl to checkout what our server supports</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; openssl s_client -connect localhost:5672
...stuff you don't care about ...
---
New, TLSv1.2, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-AES256-GCM-SHA384
    Session-ID: E44641B94F8A8B6AF58CEC96A2C672C4736B24ACAC7FF690F52FFCC622A8E4B6
    Session-ID-ctx:
    Master-Key: FC57236B845D281943D0079D1EAFE5AA84A746B59D75787935D2E1921440CFB23C38DD3D21924A78551601CC4FB338B3
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1582652429
    Timeout   : 7200 (sec)
    Verify return code: 19 (self signed certificate in certificate chain)
    Extended master secret: no
---
closed"><pre class="notranslate"><code class="notranslate">&gt; openssl s_client -connect localhost:5672
...stuff you don't care about ...
---
New, TLSv1.2, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-AES256-GCM-SHA384
    Session-ID: E44641B94F8A8B6AF58CEC96A2C672C4736B24ACAC7FF690F52FFCC622A8E4B6
    Session-ID-ctx:
    Master-Key: FC57236B845D281943D0079D1EAFE5AA84A746B59D75787935D2E1921440CFB23C38DD3D21924A78551601CC4FB338B3
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1582652429
    Timeout   : 7200 (sec)
    Verify return code: 19 (self signed certificate in certificate chain)
    Extended master secret: no
---
closed
</code></pre></div>
<p dir="auto">Rabbitmq is running with a TLS1.2 listener. So the server is not the issue during this communication. It must be the client.</p>
<p dir="auto">In the related issue it was commented that</p>
<blockquote>
<p dir="auto">You can set the SSL version using broker_use_ssl using the ssl_version key if you are using SNI.<br>
SSL3 shouldn't be the default.</p>
</blockquote>
<p dir="auto">setting <code class="notranslate">ssl_version</code> to <code class="notranslate">ssl.PROTOCOL_TLS</code> or even <code class="notranslate">ssl.PROTOCOL_TLSv1_2</code> still results in SSLv3; so this is not a solution; even though your report says TLS version 2; that's not what is actually used.</p>
<p dir="auto">Also on the linked issue:</p>
<blockquote>
<p dir="auto">However, the error goes away if I change the RabbitMQ config to: {fail_if_no_peer_cert, false}</p>
</blockquote>
<p dir="auto">This is no longer the case. I can hit the RabbitMQ web page with this set from my browser, however celery is still not able to contact the queue. Meaning my browser can communicate with RabbitMQ</p>
<p dir="auto">Turning encryption off allows communication.</p>
<p dir="auto">Please let me know if you need more information.</p>