-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Add support for ipaddress objects in JSONEncoder #9087
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
base: main
Are you sure you want to change the base?
Conversation
277e04a
to
ef0ad04
Compare
@auvipy sorry for the ping, is it possible to take a look? |
Yes of course |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
ef0ad04
to
afdcf5c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this should be very safe to add and has afais no potential for a regression.
ipaddress
was added in python 3.3, and thus should be safe to import too.
I think this is a good change because it closes a functional gap, that one would consider to not even be there, until it bites you.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we also document this?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Sorry I hadn't seen the comment (and for the closed/reopened issue, I missclicked). Should I add it somewhere in the doc, or maybe in a separate PR to first merge this one ? |
Good question. The only relevant piece of documentation I could find is this page. Currently, it stays relatively high level and doesn't try to document how each data type is rendered, which I think is fine. So unless you know of an existing place where the doc is more detailed on JSON encoding, I would suggest to not bother with adding it. |
Thanks for checking! I will leave the MR as-is then. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for not picking this up earlier, would you mind maing these changes? Looks good otherwise
Co-authored-by: Bruno Alla <[email protected]>
Description
The aim of this PR is to have support for ipaddress objects in JSONEncoder, similar to what was done for UUIDs for example.