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

Remove simplejson dependency #2602

Merged
merged 2 commits into from
Mar 23, 2021
Merged

Remove simplejson dependency #2602

merged 2 commits into from
Mar 23, 2021

Conversation

SchoolGuy
Copy link
Member

The PyPi simplejson package was integrated into the Python standard library (see: https://github.com/simplejson/simplejson). Thus I removed it since Py 2.6 is already a while in the past now.

@SchoolGuy SchoolGuy added tech-debt Packaging Issues related to packaging labels Mar 23, 2021
@SchoolGuy SchoolGuy added this to the v3.3.0 milestone Mar 23, 2021
@SchoolGuy SchoolGuy requested a review from a team March 23, 2021 15:58
@SchoolGuy SchoolGuy requested a review from nodeg March 23, 2021 16:40
Copy link
Member

@nodeg nodeg left a comment

Choose a reason for hiding this comment

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

LGTM.

@@ -86,7 +86,7 @@ def serialize_item(collection, item):

_dict = item.to_dict()
with open(filename, "w+") as file_descriptor:
data = simplejson.dumps(_dict, encoding="utf-8", sort_keys=sort_keys, indent=indent)
Copy link
Member

Choose a reason for hiding this comment

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

You're removing the encoding due to simplejson defaulting to utf-8, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope due to that the keyword simply does not exist: https://docs.python.org/3/library/json.html#json.dumps

Explanation see: https://stackoverflow.com/a/18337754/4730773

@SchoolGuy SchoolGuy merged commit f794a6f into master Mar 23, 2021
@SchoolGuy SchoolGuy deleted the tech-debt/simplejson branch March 23, 2021 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Packaging Issues related to packaging tech-debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants