<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://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" checked=""> 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" 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>
<p dir="auto">Little bit related -<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="826311180" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/6672" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/6672/hovercard" href="https://github.com/celery/celery/issues/6672">#6672</a><br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="542193436" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5890" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/5890/hovercard" href="https://github.com/celery/celery/issues/5890">#5890</a></p>
<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.2.7 (dawn-chorus)</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="$ celery report

software -&gt; celery:5.2.7 (dawn-chorus) kombu:5.2.4 py:3.9.9
            billiard:3.6.4.0 py-amqp:5.1.1
platform -&gt; system:Darwin arch:64bit
            kernel version:21.4.0 imp:CPython
loader   -&gt; celery.loaders.default.Loader
settings -&gt; transport:amqp results:disabled

deprecated_settings: None
"><pre class="notranslate"><code class="notranslate">$ celery report

software -&gt; celery:5.2.7 (dawn-chorus) kombu:5.2.4 py:3.9.9
            billiard:3.6.4.0 py-amqp:5.1.1
platform -&gt; system:Darwin arch:64bit
            kernel version:21.4.0 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>
<ol dir="auto">
<li>Here the global serializer is <code class="notranslate">json</code> which is the default setting in celery. Now we will declare a task with serialization set to <code class="notranslate">pickle</code>.</li>
</ol>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# In tasks.py
from celery import shared_task

@serial_task(serializer='pickle')
def pickle_seriliazable_args_task(nice_set):
    print('Starting Task')
    # This delay would indicate a long running task
    # So that we have enough time to request the task stats from shell
    sleep(200)
    print('Task Finished')
"><pre class="notranslate"><span class="pl-c"># In tasks.py</span>
<span class="pl-k">from</span> <span class="pl-s1">celery</span> <span class="pl-k">import</span> <span class="pl-s1">shared_task</span>

<span class="pl-en">@<span class="pl-en">serial_task</span>(<span class="pl-s1">serializer</span><span class="pl-c1">=</span><span class="pl-s">'pickle'</span>)</span>
<span class="pl-k">def</span> <span class="pl-en">pickle_seriliazable_args_task</span>(<span class="pl-s1">nice_set</span>):
    <span class="pl-en">print</span>(<span class="pl-s">'Starting Task'</span>)
    <span class="pl-c"># This delay would indicate a long running task</span>
    <span class="pl-c"># So that we have enough time to request the task stats from shell</span>
    <span class="pl-en">sleep</span>(<span class="pl-c1">200</span>)
    <span class="pl-en">print</span>(<span class="pl-s">'Task Finished'</span>)</pre></div>
<ol start="2" dir="auto">
<li>Open a django-manage shell and run</li>
</ol>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [1]: from myapp.apps.niceapp.tasks import pickle_serialized_task

In [2]: task = pickle_serialized_task.delay(set([1, 2, 3]))

In [3]: celery_hostname = 'celery@work' # update hostname as per your config

In [4]: celery_inspect = task.app.control.inspect([celery_hostname])

In [5]: celery_inspect.active()"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">1</span>]: <span class="pl-s1">from</span> <span class="pl-s1">myapp</span>.<span class="pl-s1">apps</span>.<span class="pl-s1">niceapp</span>.<span class="pl-s1">tasks</span> <span class="pl-s1">import</span> <span class="pl-s1">pickle_serialized_task</span>

<span class="pl-v">In</span> [<span class="pl-c1">2</span>]: <span class="pl-s1">task</span> <span class="pl-c1">=</span> <span class="pl-s1">pickle_serialized_task</span>.<span class="pl-en">delay</span>(<span class="pl-en">set</span>([<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>]))

<span class="pl-v">In</span> [<span class="pl-c1">3</span>]: <span class="pl-s1">celery_hostname</span> <span class="pl-c1">=</span> <span class="pl-s">'celery@work'</span> <span class="pl-c"># update hostname as per your config</span>

<span class="pl-v">In</span> [<span class="pl-c1">4</span>]: <span class="pl-s1">celery_inspect</span> <span class="pl-c1">=</span> <span class="pl-s1">task</span>.<span class="pl-s1">app</span>.<span class="pl-s1">control</span>.<span class="pl-en">inspect</span>([<span class="pl-s1">celery_hostname</span>])

<span class="pl-v">In</span> [<span class="pl-c1">5</span>]: <span class="pl-s1">celery_inspect</span>.<span class="pl-en">active</span>()</pre></div>
<p dir="auto">On running <code class="notranslate">celery_inspect.active()</code> following error is thrown.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2022-07-01 15:07:50,791: INFO/MainProcess] Task myapp.apps.niceapp.tasks.pickle_serialized_task[e61f2103-1e19-4593-b2bd-6d69bd273a3c] received
[2022-07-01 15:07:50,815: WARNING/ForkPoolWorker-6] Starting Task
[2022-07-01 15:09:09,906: ERROR/MainProcess] Control command error: EncodeError(TypeError('Object of type set is not JSON serializable'))
Traceback (most recent call last):
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/serialization.py&quot;, line 39, in _reraise_errors
    yield
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/serialization.py&quot;, line 210, in dumps
    payload = encoder(data)
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/utils/json.py&quot;, line 68, in dumps
    return _dumps(s, cls=cls or _default_encoder,
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/lib/python3.9/json/__init__.py&quot;, line 234, in dumps
    return cls(
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/lib/python3.9/json/encoder.py&quot;, line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/lib/python3.9/json/encoder.py&quot;, line 257, in iterencode
    return _iterencode(o, 0)
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/utils/json.py&quot;, line 58, in default
    return super().default(o)
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/lib/python3.9/json/encoder.py&quot;, line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type set is not JSON serializable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/celery/worker/pidbox.py&quot;, line 44, in on_message
    self.node.handle_message(body, message)
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/pidbox.py&quot;, line 141, in handle_message
    return self.dispatch(**body)
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/pidbox.py&quot;, line 108, in dispatch
    self.reply({self.hostname: reply},
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/pidbox.py&quot;, line 145, in reply
    self.mailbox._publish_reply(data, exchange, routing_key, ticket,
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/pidbox.py&quot;, line 275, in _publish_reply
    producer.publish(
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/messaging.py&quot;, line 166, in publish
    body, content_type, content_encoding = self._prepare(
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/messaging.py&quot;, line 254, in _prepare
    body) = dumps(body, serializer=serializer)
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/serialization.py&quot;, line 210, in dumps
    payload = encoder(data)
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/lib/python3.9/contextlib.py&quot;, line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/serialization.py&quot;, line 43, in _reraise_errors
    reraise(wrapper, wrapper(exc), sys.exc_info()[2])
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/exceptions.py&quot;, line 21, in reraise
    raise value.with_traceback(tb)
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/serialization.py&quot;, line 39, in _reraise_errors
    yield
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/serialization.py&quot;, line 210, in dumps
    payload = encoder(data)
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/utils/json.py&quot;, line 68, in dumps
    return _dumps(s, cls=cls or _default_encoder,
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/lib/python3.9/json/__init__.py&quot;, line 234, in dumps
    return cls(
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/lib/python3.9/json/encoder.py&quot;, line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/lib/python3.9/json/encoder.py&quot;, line 257, in iterencode
    return _iterencode(o, 0)
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/utils/json.py&quot;, line 58, in default
    return super().default(o)
  File &quot;/Users/amitphulera/.pyenv/versions/3.9.9/lib/python3.9/json/encoder.py&quot;, line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
kombu.exceptions.EncodeError: Object of type set is not JSON serializable"><pre class="notranslate"><code class="notranslate">2022-07-01 15:07:50,791: INFO/MainProcess] Task myapp.apps.niceapp.tasks.pickle_serialized_task[e61f2103-1e19-4593-b2bd-6d69bd273a3c] received
[2022-07-01 15:07:50,815: WARNING/ForkPoolWorker-6] Starting Task
[2022-07-01 15:09:09,906: ERROR/MainProcess] Control command error: EncodeError(TypeError('Object of type set is not JSON serializable'))
Traceback (most recent call last):
  File "/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/serialization.py", line 39, in _reraise_errors
    yield
  File "/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/serialization.py", line 210, in dumps
    payload = encoder(data)
  File "/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/utils/json.py", line 68, in dumps
    return _dumps(s, cls=cls or _default_encoder,
  File "/Users/amitphulera/.pyenv/versions/3.9.9/lib/python3.9/json/__init__.py", line 234, in dumps
    return cls(
  File "/Users/amitphulera/.pyenv/versions/3.9.9/lib/python3.9/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/Users/amitphulera/.pyenv/versions/3.9.9/lib/python3.9/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/utils/json.py", line 58, in default
    return super().default(o)
  File "/Users/amitphulera/.pyenv/versions/3.9.9/lib/python3.9/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type set is not JSON serializable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/celery/worker/pidbox.py", line 44, in on_message
    self.node.handle_message(body, message)
  File "/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/pidbox.py", line 141, in handle_message
    return self.dispatch(**body)
  File "/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/pidbox.py", line 108, in dispatch
    self.reply({self.hostname: reply},
  File "/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/pidbox.py", line 145, in reply
    self.mailbox._publish_reply(data, exchange, routing_key, ticket,
  File "/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/pidbox.py", line 275, in _publish_reply
    producer.publish(
  File "/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/messaging.py", line 166, in publish
    body, content_type, content_encoding = self._prepare(
  File "/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/messaging.py", line 254, in _prepare
    body) = dumps(body, serializer=serializer)
  File "/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/serialization.py", line 210, in dumps
    payload = encoder(data)
  File "/Users/amitphulera/.pyenv/versions/3.9.9/lib/python3.9/contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/serialization.py", line 43, in _reraise_errors
    reraise(wrapper, wrapper(exc), sys.exc_info()[2])
  File "/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/exceptions.py", line 21, in reraise
    raise value.with_traceback(tb)
  File "/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/serialization.py", line 39, in _reraise_errors
    yield
  File "/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/serialization.py", line 210, in dumps
    payload = encoder(data)
  File "/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/utils/json.py", line 68, in dumps
    return _dumps(s, cls=cls or _default_encoder,
  File "/Users/amitphulera/.pyenv/versions/3.9.9/lib/python3.9/json/__init__.py", line 234, in dumps
    return cls(
  File "/Users/amitphulera/.pyenv/versions/3.9.9/lib/python3.9/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/Users/amitphulera/.pyenv/versions/3.9.9/lib/python3.9/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/Users/amitphulera/.pyenv/versions/3.9.9/envs/hq_celery/lib/python3.9/site-packages/kombu/utils/json.py", line 58, in default
    return super().default(o)
  File "/Users/amitphulera/.pyenv/versions/3.9.9/lib/python3.9/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
kombu.exceptions.EncodeError: Object of type set is not JSON serializable
</code></pre></div>
<h2 dir="auto">Required Dependencies</h2>

<ul dir="auto">
<li><strong>Minimal Python Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Celery Version</strong>: N/A or Unknown</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>: N/A or Unknown</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="alabaster==0.7.12
alembic==1.7.7
amqp==5.1.1
appnope==0.1.3
architect==0.6.0
asgiref==3.5.0
asttokens==2.0.5
attrs==21.4.0
Babel==2.9.1
backcall==0.2.0
Beaker==1.11.0
beautifulsoup4==4.10.0
billiard==3.6.4.0
black==22.1.0
boto3==1.17.85
botocore==1.20.85
cachetools==5.0.0
case==1.5.3
celery==5.2.7
certifi==2020.6.20
cffi==1.14.3
chardet==3.0.4
click==8.1.3
click-didyoumean==0.3.0
click-plugins==1.1.1
click-repl==0.2.0
cloudant==2.14.0
colorama==0.4.3
contextlib2==21.6.0
coverage==5.5
cryptography==3.4.8
csiphash==0.0.5
datadog==0.39.0
ddtrace==0.44.0
debugpy==1.6.0
decorator==4.0.11
defusedxml==0.7.1
Deprecated==1.2.10
diff-match-patch==20200713
dimagi-memoized==1.1.3
Django==3.2.13
django-appconf==1.0.5
django-autoslug==1.9.8
django-braces==1.14.0
django-bulk-update==2.2.0
django-celery-results==2.4.0
django-compressor==2.4
django-countries==7.3.2
django-crispy-forms==1.10.0
django-cte==1.2.0
django-extensions==3.1.3
django-formtools==2.3
django-logentry-admin==1.0.6
django-oauth-toolkit==1.5.0
django-otp==0.9.4
django-phonenumber-field==5.2.0
django-prbac==1.0.1
django-recaptcha==2.0.6
django-redis==4.12.1
django-redis-sessions==0.6.2
django-statici18n==1.9.0
django-tastypie==0.14.4
django-transfer==0.4
django-two-factor-auth==1.13.2
django-user-agents==0.4.0
djangorestframework==3.12.2
dnspython==1.15.0
docutils==0.16
dropbox==9.3.0
elasticsearch2==2.5.1
elasticsearch5==5.5.6
email-validator==1.1.3
et-xmlfile==1.0.1
ethiopian-date-converter==0.1.5
eulxml==1.1.3
executing==0.8.3
fakecouch==0.0.15
Faker==5.0.2
fixture==1.5.11
flake8==3.9.2
flaky==3.7.0
flower==1.0.0
freezegun==1.1.0
future==0.18.2
gevent==21.8.0
ghdiff==0.4
git-build-branch==0.1.13
gnureadline==8.0.0
google-api-core==2.5.0
google-api-python-client==2.32.0
google-auth==2.6.0
google-auth-httplib2==0.1.0
google-auth-oauthlib==0.4.6
googleapis-common-protos==1.54.0
greenlet==1.1.2
gunicorn==20.0.4
hiredis==2.0.0
httpagentparser==1.9.0
httplib2==0.20.4
humanize==4.1.0
idna==2.10
imagesize==1.2.0
importlib-metadata==4.11.3
iniconfig==1.1.1
intervaltree==3.1.0
ipython==8.2.0
iso8601==0.1.13
isodate==0.6.1
jedi==0.18.1
Jinja2==2.11.3
jmespath==0.10.0
json-delta==2.0
jsonfield==2.1.1
jsonobject==2.0.0
jsonobject-couchdbkit==1.0.1
jsonschema==3.2.0
jwcrypto==0.8
kafka-python==1.4.7
kombu==5.2.4
laboratory==0.2.0
linecache2==1.0.0
lxml==4.7.1
Mako==1.1.3
mando==0.6.4
Markdown==3.3.6
MarkupSafe==1.1.1
matplotlib-inline==0.1.3
mccabe==0.6.1
mock==4.0.3
mypy-extensions==0.4.3
ndg-httpsclient==0.5.1
nose==1.3.7
nose-exclude==0.5.0
oauthlib==3.1.0
oic==1.3.0
openpyxl==3.0.9
packaging==20.4
parso==0.8.3
pathspec==0.9.0
pep517==0.10.0
pexpect==4.8.0
phonenumberslite==8.12.48
pickle5==0.0.11
pickleshare==0.7.5
Pillow==9.0.1
pip-tools==6.6.0
platformdirs==2.4.1
pluggy==1.0.0
ply==3.11
polib==1.1.1
prometheus-client==0.14.1
prompt-toolkit==3.0.26
protobuf==3.15.0
psutil==5.8.0
psycogreen==1.0.2
psycopg2==2.8.6
psycopg2cffi==2.9.0
ptyprocess==0.7.0
pure-eval==0.2.2
py==1.11.0
py-cpuinfo==8.0.0
py-KISSmetrics==1.1.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycodestyle==2.7.0
pycparser==2.20
pycryptodome==3.10.1
pycryptodomex==3.14.1
pyflakes==2.3.1
PyGithub==1.54.1
Pygments==2.11.2
pygooglechart==0.4.0
pyjwkest==1.4.2
PyJWT==1.7.1
pyOpenSSL==20.0.1
pyparsing==3.0.7
pyphonetics==0.5.3
pyrsistent==0.17.3
PySocks==1.7.1
pytest==7.1.2
pytest-benchmark==3.4.1
pytest-django==4.5.2
python-dateutil==2.8.2
python-editor==1.0.4
python-imap==1.0.0
python-magic==0.4.22
python-mimeparse==1.6.0
python-termstyle==0.1.10
python3-saml==1.12.0
pytz==2022.1
PyYAML==5.4.1
pyzxcvbn==0.8.0
qrcode==4.0.4
quickcache==0.5.4
radon==5.1.0
rcssmin==1.0.6
redis==3.5.3
reportlab==3.6.9
requests==2.25.1
requests-mock==1.9.3
requests-oauthlib==1.3.1
requests-toolbelt==0.9.1
rjsmin==1.1.0
rsa==4.8
s3transfer==0.4.2
schema==0.7.5
sentry-sdk==0.19.5
setproctitle==1.2.2
sh==1.14.2
simpleeval==0.9.10
simplejson==3.17.2
six==1.16.0
sniffer==0.4.1
snowballstemmer==2.0.0
socketpool==0.5.3
sortedcontainers==2.3.0
soupsieve==2.0.1
Sphinx==4.1.2
sphinx-rtd-theme==0.5.2
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-django==0.5.1
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
sqlagg==0.17.2
SQLAlchemy==1.3.19
sqlalchemy-postgres-copy==0.5.0
sqlparse==0.3.1
stack-data==0.1.4
stripe==2.54.0
suds-py3==1.4.5.0
tenacity==6.2.0
testil==1.1
text-unidecode==1.3
tinys3==0.1.12
toml==0.10.2
tomli==2.0.1
toposort==1.7
tornado==6.1
traceback2==1.4.0
traitlets==5.1.1
tropo-webapi-python==0.1.3
turn-python==0.0.1
twilio==6.5.1
typing_extensions==4.1.1
ua-parser==0.10.0
Unidecode==1.2.0
unittest2==1.1.0
uritemplate==4.1.1
urllib3==1.26.5
user-agents==2.2.0
uWSGI==2.0.19.1
vine==5.0.0
wcwidth==0.2.5
Werkzeug==1.0.1
wrapt==1.12.1
xlrd==2.0.1
xlwt==1.3.0
xmlsec==1.3.12
yapf==0.31.0
zipp==3.7.0
zope.event==4.5.0
zope.interface==5.4.0"><pre class="notranslate"><code class="notranslate">alabaster==0.7.12
alembic==1.7.7
amqp==5.1.1
appnope==0.1.3
architect==0.6.0
asgiref==3.5.0
asttokens==2.0.5
attrs==21.4.0
Babel==2.9.1
backcall==0.2.0
Beaker==1.11.0
beautifulsoup4==4.10.0
billiard==3.6.4.0
black==22.1.0
boto3==1.17.85
botocore==1.20.85
cachetools==5.0.0
case==1.5.3
celery==5.2.7
certifi==2020.6.20
cffi==1.14.3
chardet==3.0.4
click==8.1.3
click-didyoumean==0.3.0
click-plugins==1.1.1
click-repl==0.2.0
cloudant==2.14.0
colorama==0.4.3
contextlib2==21.6.0
coverage==5.5
cryptography==3.4.8
csiphash==0.0.5
datadog==0.39.0
ddtrace==0.44.0
debugpy==1.6.0
decorator==4.0.11
defusedxml==0.7.1
Deprecated==1.2.10
diff-match-patch==20200713
dimagi-memoized==1.1.3
Django==3.2.13
django-appconf==1.0.5
django-autoslug==1.9.8
django-braces==1.14.0
django-bulk-update==2.2.0
django-celery-results==2.4.0
django-compressor==2.4
django-countries==7.3.2
django-crispy-forms==1.10.0
django-cte==1.2.0
django-extensions==3.1.3
django-formtools==2.3
django-logentry-admin==1.0.6
django-oauth-toolkit==1.5.0
django-otp==0.9.4
django-phonenumber-field==5.2.0
django-prbac==1.0.1
django-recaptcha==2.0.6
django-redis==4.12.1
django-redis-sessions==0.6.2
django-statici18n==1.9.0
django-tastypie==0.14.4
django-transfer==0.4
django-two-factor-auth==1.13.2
django-user-agents==0.4.0
djangorestframework==3.12.2
dnspython==1.15.0
docutils==0.16
dropbox==9.3.0
elasticsearch2==2.5.1
elasticsearch5==5.5.6
email-validator==1.1.3
et-xmlfile==1.0.1
ethiopian-date-converter==0.1.5
eulxml==1.1.3
executing==0.8.3
fakecouch==0.0.15
Faker==5.0.2
fixture==1.5.11
flake8==3.9.2
flaky==3.7.0
flower==1.0.0
freezegun==1.1.0
future==0.18.2
gevent==21.8.0
ghdiff==0.4
git-build-branch==0.1.13
gnureadline==8.0.0
google-api-core==2.5.0
google-api-python-client==2.32.0
google-auth==2.6.0
google-auth-httplib2==0.1.0
google-auth-oauthlib==0.4.6
googleapis-common-protos==1.54.0
greenlet==1.1.2
gunicorn==20.0.4
hiredis==2.0.0
httpagentparser==1.9.0
httplib2==0.20.4
humanize==4.1.0
idna==2.10
imagesize==1.2.0
importlib-metadata==4.11.3
iniconfig==1.1.1
intervaltree==3.1.0
ipython==8.2.0
iso8601==0.1.13
isodate==0.6.1
jedi==0.18.1
Jinja2==2.11.3
jmespath==0.10.0
json-delta==2.0
jsonfield==2.1.1
jsonobject==2.0.0
jsonobject-couchdbkit==1.0.1
jsonschema==3.2.0
jwcrypto==0.8
kafka-python==1.4.7
kombu==5.2.4
laboratory==0.2.0
linecache2==1.0.0
lxml==4.7.1
Mako==1.1.3
mando==0.6.4
Markdown==3.3.6
MarkupSafe==1.1.1
matplotlib-inline==0.1.3
mccabe==0.6.1
mock==4.0.3
mypy-extensions==0.4.3
ndg-httpsclient==0.5.1
nose==1.3.7
nose-exclude==0.5.0
oauthlib==3.1.0
oic==1.3.0
openpyxl==3.0.9
packaging==20.4
parso==0.8.3
pathspec==0.9.0
pep517==0.10.0
pexpect==4.8.0
phonenumberslite==8.12.48
pickle5==0.0.11
pickleshare==0.7.5
Pillow==9.0.1
pip-tools==6.6.0
platformdirs==2.4.1
pluggy==1.0.0
ply==3.11
polib==1.1.1
prometheus-client==0.14.1
prompt-toolkit==3.0.26
protobuf==3.15.0
psutil==5.8.0
psycogreen==1.0.2
psycopg2==2.8.6
psycopg2cffi==2.9.0
ptyprocess==0.7.0
pure-eval==0.2.2
py==1.11.0
py-cpuinfo==8.0.0
py-KISSmetrics==1.1.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycodestyle==2.7.0
pycparser==2.20
pycryptodome==3.10.1
pycryptodomex==3.14.1
pyflakes==2.3.1
PyGithub==1.54.1
Pygments==2.11.2
pygooglechart==0.4.0
pyjwkest==1.4.2
PyJWT==1.7.1
pyOpenSSL==20.0.1
pyparsing==3.0.7
pyphonetics==0.5.3
pyrsistent==0.17.3
PySocks==1.7.1
pytest==7.1.2
pytest-benchmark==3.4.1
pytest-django==4.5.2
python-dateutil==2.8.2
python-editor==1.0.4
python-imap==1.0.0
python-magic==0.4.22
python-mimeparse==1.6.0
python-termstyle==0.1.10
python3-saml==1.12.0
pytz==2022.1
PyYAML==5.4.1
pyzxcvbn==0.8.0
qrcode==4.0.4
quickcache==0.5.4
radon==5.1.0
rcssmin==1.0.6
redis==3.5.3
reportlab==3.6.9
requests==2.25.1
requests-mock==1.9.3
requests-oauthlib==1.3.1
requests-toolbelt==0.9.1
rjsmin==1.1.0
rsa==4.8
s3transfer==0.4.2
schema==0.7.5
sentry-sdk==0.19.5
setproctitle==1.2.2
sh==1.14.2
simpleeval==0.9.10
simplejson==3.17.2
six==1.16.0
sniffer==0.4.1
snowballstemmer==2.0.0
socketpool==0.5.3
sortedcontainers==2.3.0
soupsieve==2.0.1
Sphinx==4.1.2
sphinx-rtd-theme==0.5.2
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-django==0.5.1
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
sqlagg==0.17.2
SQLAlchemy==1.3.19
sqlalchemy-postgres-copy==0.5.0
sqlparse==0.3.1
stack-data==0.1.4
stripe==2.54.0
suds-py3==1.4.5.0
tenacity==6.2.0
testil==1.1
text-unidecode==1.3
tinys3==0.1.12
toml==0.10.2
tomli==2.0.1
toposort==1.7
tornado==6.1
traceback2==1.4.0
traitlets==5.1.1
tropo-webapi-python==0.1.3
turn-python==0.0.1
twilio==6.5.1
typing_extensions==4.1.1
ua-parser==0.10.0
Unidecode==1.2.0
unittest2==1.1.0
uritemplate==4.1.1
urllib3==1.26.5
user-agents==2.2.0
uWSGI==2.0.19.1
vine==5.0.0
wcwidth==0.2.5
Werkzeug==1.0.1
wrapt==1.12.1
xlrd==2.0.1
xlwt==1.3.0
xmlsec==1.3.12
yapf==0.31.0
zipp==3.7.0
zope.event==4.5.0
zope.interface==5.4.0
</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="# run celery with `pickle_serialized_task` as defined in reproduction steps and run the snippet below

from myapp.apps.niceapp.tasks import pickle_serialized_task
task = pickle_serialized_task.delay(set([1, 2, 3]))
celery_hostname = 'celery@work'
celery_inspect = task.app.control.inspect([celery_hostname])
celery_inspect.active()
"><pre class="notranslate"><span class="pl-c"># run celery with `pickle_serialized_task` as defined in reproduction steps and run the snippet below</span>

<span class="pl-k">from</span> <span class="pl-s1">myapp</span>.<span class="pl-s1">apps</span>.<span class="pl-s1">niceapp</span>.<span class="pl-s1">tasks</span> <span class="pl-k">import</span> <span class="pl-s1">pickle_serialized_task</span>
<span class="pl-s1">task</span> <span class="pl-c1">=</span> <span class="pl-s1">pickle_serialized_task</span>.<span class="pl-en">delay</span>(<span class="pl-en">set</span>([<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>]))
<span class="pl-s1">celery_hostname</span> <span class="pl-c1">=</span> <span class="pl-s">'celery@work'</span>
<span class="pl-s1">celery_inspect</span> <span class="pl-c1">=</span> <span class="pl-s1">task</span>.<span class="pl-s1">app</span>.<span class="pl-s1">control</span>.<span class="pl-en">inspect</span>([<span class="pl-s1">celery_hostname</span>])
<span class="pl-s1">celery_inspect</span>.<span class="pl-en">active</span>()</pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>

<p dir="auto">This should list the details about the task.</p>
<h1 dir="auto">Actual Behavior</h1>

<p dir="auto">It is erroring out with the stack trace shared above.</p>
<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="826311180" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/6672" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/6672/hovercard" href="https://github.com/celery/celery/issues/6672">#6672</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="542193436" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5890" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/5890/hovercard" href="https://github.com/celery/celery/issues/5890">#5890</a></li>
</ul>
<h4 dir="auto">Related PRs</h4>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="877298707" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/6757" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/6757/hovercard" href="https://github.com/celery/celery/pull/6757">#6757</a></li>
</ul>
<h1 dir="auto">Steps to Reproduce</h1>
<p dir="auto">Here is the script that reproduces the issue:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import time

from celery import Celery

app = Celery('example')
app.conf.update(
    backend_url='redis://localhost:6379',
    broker_url='redis://localhost:6379',
    result_backend='redis://localhost:6379',
    task_serializer='json',
    accept_content=['pickle', 'json'],
)

@app.task(name='task1', serializer='pickle')
def task1(*args, **kwargs):
    print('Start', args, kwargs)
    time.sleep(30)
    print('Finish', args, kwargs)


def main():
    task1.delay({1, 2, 3})  # set is not JSON serializable.
    # inspect queue items
    inspected = app.control.inspect()
    active_tasks = inspected.active()
    print(active_tasks)

if __name__ == '__main__':
    main()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">time</span>

<span class="pl-k">from</span> <span class="pl-s1">celery</span> <span class="pl-k">import</span> <span class="pl-v">Celery</span>

<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Celery</span>(<span class="pl-s">'example'</span>)
<span class="pl-s1">app</span>.<span class="pl-s1">conf</span>.<span class="pl-en">update</span>(
    <span class="pl-s1">backend_url</span><span class="pl-c1">=</span><span class="pl-s">'redis://localhost:6379'</span>,
    <span class="pl-s1">broker_url</span><span class="pl-c1">=</span><span class="pl-s">'redis://localhost:6379'</span>,
    <span class="pl-s1">result_backend</span><span class="pl-c1">=</span><span class="pl-s">'redis://localhost:6379'</span>,
    <span class="pl-s1">task_serializer</span><span class="pl-c1">=</span><span class="pl-s">'json'</span>,
    <span class="pl-s1">accept_content</span><span class="pl-c1">=</span>[<span class="pl-s">'pickle'</span>, <span class="pl-s">'json'</span>],
)

<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">task</span>(<span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'task1'</span>, <span class="pl-s1">serializer</span><span class="pl-c1">=</span><span class="pl-s">'pickle'</span>)</span>
<span class="pl-k">def</span> <span class="pl-en">task1</span>(<span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>):
    <span class="pl-en">print</span>(<span class="pl-s">'Start'</span>, <span class="pl-s1">args</span>, <span class="pl-s1">kwargs</span>)
    <span class="pl-s1">time</span>.<span class="pl-en">sleep</span>(<span class="pl-c1">30</span>)
    <span class="pl-en">print</span>(<span class="pl-s">'Finish'</span>, <span class="pl-s1">args</span>, <span class="pl-s1">kwargs</span>)


<span class="pl-k">def</span> <span class="pl-en">main</span>():
    <span class="pl-s1">task1</span>.<span class="pl-en">delay</span>({<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>})  <span class="pl-c"># set is not JSON serializable.</span>
    <span class="pl-c"># inspect queue items</span>
    <span class="pl-s1">inspected</span> <span class="pl-c1">=</span> <span class="pl-s1">app</span>.<span class="pl-s1">control</span>.<span class="pl-en">inspect</span>()
    <span class="pl-s1">active_tasks</span> <span class="pl-c1">=</span> <span class="pl-s1">inspected</span>.<span class="pl-en">active</span>()
    <span class="pl-en">print</span>(<span class="pl-s1">active_tasks</span>)

<span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">'__main__'</span>:
    <span class="pl-en">main</span>()</pre></div>
<p dir="auto">See also following discussion: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="877298707" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/6757" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/6757/hovercard?comment_id=833386042&amp;comment_type=issue_comment" href="https://github.com/celery/celery/pull/6757#issuecomment-833386042">#6757 (comment)</a></p>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">Control/Inspect serialization should support custom per-task serializer</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">Control/Inspect serialization is driven only by <code class="notranslate">task_serializer</code> configuration.</p>