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

fix json_format for python2.6: #869

Merged
merged 1 commit into from
Oct 20, 2015
Merged

fix json_format for python2.6: #869

merged 1 commit into from
Oct 20, 2015

Conversation

anandolee
Copy link
Contributor

1, objcect_pair_hook is not supported in python2.6, so duplicated key check is removed in 2.6
2, total_seconds is not suppoted in python2.6, changed to compute seconds directly

@haberman
Copy link
Member

I wonder if it would be better to just drop Python 2.6 support. See: http://www.curiousefficiency.org/posts/2015/04/stop-supporting-python26.html

If we could support Python 2.6 without having to compromise the code-base I'd be ok with that. But I'm not sure I want to see Python 2.6-specific hacks in the code-base.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

@anandolee
Copy link
Contributor Author

I am open to keep or drop Python2.6

There were 3 diffs:
1, no total_seconds()
2, json.dump give {"True":xxx} instead of {"true":xxx} for bool map
3, no object_pairs_hook support

1 and 2 can be settled easily. Without object_pairs_hook I haven't thought a good way for duplicate keys, python2.6-specific hacks were added.

@googlebot
Copy link

CLAs look good, thanks!

@anandolee
Copy link
Contributor Author

friendly ping @pherl

1, objcect_pair_hook is not supported in python2.6, so duplicated key check is removed in 2.6
2, total_seconds is not suppoted in python2.6, changed to compute seconds directly
@liujisi
Copy link
Contributor

liujisi commented Oct 20, 2015

LG

anandolee added a commit that referenced this pull request Oct 20, 2015
fix json_format for python2.6:
@anandolee anandolee merged commit 32fb7dd into protocolbuffers:master Oct 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants