New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]datetime type serialization error #1841
Comments
I found the problem, the problem is with the _as function at https://github.com/celery/kombu/blob/main/kombu/utils/json.py, why introduce this stupid and smartass function? If you use kombu as the producer and another library (or even another language, such as java) as the consumer, this makes it impossible to deserialise this message body Can kombu get rid of this boring _as function? I think that if someone wants to be able to restore the datetime when deserialising, then they should choose pickle instead of changing the datetime of the json into a messy format! |
A bug was found in the new version of kombu that serializes datetime type to a dictionary
The cause was that I noticed this strange datetime format in my message queue:
{"created_at": {"__type__": "datetime", "__value__": "2024-01-06T16:14:46.368136"}}
But after I reduced the kombu version from 5.3.2 to 5.2.4, it didn't appear again
示例代码:
The text was updated successfully, but these errors were encountered: