Skip to content
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

Use a default serializer that is not only for date types #664

Merged
merged 1 commit into from
Jul 9, 2021

Conversation

martinRenou
Copy link
Member

@martinRenou martinRenou commented Jul 1, 2021

This would allow making more general changes here. I am also adding serialization of bytes type into base64.

For more context, this is going in the direction of ipython/ipykernel#706. This allows getting rid of the json_clean function, moving the bytes treatment from ipykernel to jupyter_client when actually doing the serializion of the object.

@martinRenou martinRenou force-pushed the default_serializer branch 2 times, most recently from c1707ed to d58b3f4 Compare July 1, 2021 14:19
"""default function for packing datetime objects in JSON."""
"""DEPRECATED: Use jupyter_client.jsonutil.json_default"""
warnings.warn(
"date_default is deprecated. Use jupyter_client.jsonutil.json_default.", stacklevel=2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you care to add a since version XXX, I don't know if you want to do 7.0 or backport. But I think that will help users to transition.

Copy link
Member Author

@martinRenou martinRenou Jul 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will do it :)

Should we do backports to 6.x.x? I would actually not mind doing it, and it's not that big of a change, and not backward-incompatible.

@Carreau
Copy link
Member

Carreau commented Jul 1, 2021

+1

@davidbrochart
Copy link
Member

Is it ready to be merged?

@martinRenou
Copy link
Member Author

I guess I still need to process #664 (comment)

But the question is what should be the comment? Should it be since version 7.0?

@davidbrochart
Copy link
Member

But the question is what should be the comment? Should it be since version 7.0?

I think since version 7.0 is fine.

@martinRenou
Copy link
Member Author

Done :)

@davidbrochart
Copy link
Member

Not quite yet :-)

This would allow making more general changes here. I am also adding
serialization of bytes type into base64.
@davidbrochart davidbrochart merged commit 2223d2f into jupyter:master Jul 9, 2021
@davidbrochart
Copy link
Member

Thanks!

@martinRenou martinRenou deleted the default_serializer branch July 9, 2021 13:17
@martinRenou
Copy link
Member Author

Thank you!

@blink1073 blink1073 added this to the 7.0 milestone Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants