◐ Shell
reader mode source ↗
Skip to content

bpo-29863: Add json.COMPACT constant#72

Closed
andrewnester wants to merge 3 commits into
python:masterfrom
andrewnester:29540-json-dumps-compact
Closed

bpo-29863: Add json.COMPACT constant#72
andrewnester wants to merge 3 commits into
python:masterfrom
andrewnester:29540-json-dumps-compact

Conversation

@andrewnester

Copy link
Copy Markdown
Contributor

Fix for https://bugs.python.org/issue29540

I decided to go with Alternative version provided R.David Murray just to keep things simple

@the-knights-who-say-ni

Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow these steps to rectify the issue:

  1. Sign the PSF contributor agreement
  2. Wait at least a day and then check "Your Details" on bugs.python.org to see if your account has been marked as having signed the CLA (the delay is due to a person having to manually check your signed CLA)
  3. Reply here saying you have completed the above steps

Thanks again to your contribution and we look forward to looking at it!

@berkerpeksag berkerpeksag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

Thanks for the PR. The new json.COMPACT constant needs to be documented in Doc/library/json.rst (and please add a .. versionadded:: 3.7 marker)

@berkerpeksag berkerpeksag changed the title bpo-29540 - Added json.COMPACT constant Feb 13, 2017
@andrewnester

Copy link
Copy Markdown
Contributor Author

@berkerpeksag thanks! just added documentation for json.COMPACT

@berkerpeksag berkerpeksag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

Please update the "Compact encoding" example at the top of the page.

@andrewnester

Copy link
Copy Markdown
Contributor Author

@berkerpeksag @brettcannon thanks! I've just updated PR according to changes you requested.

@berkerpeksag berkerpeksag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

Please also update JSONEncoder documentation at https://docs.python.org/3/library/json.html#json.JSONEncoder and add a test that passes separators=json.COMPACT to JSONEncoder. Sorry, I missed this in my earlier review.

@andrewnester

Copy link
Copy Markdown
Contributor Author

thanks @berkerpeksag ! I've just added changes corresponding to JSONEncoder

@codecov

codecov Bot commented Feb 14, 2017

Copy link
Copy Markdown

Codecov Report

Merging #72 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #72      +/-   ##
==========================================
+ Coverage   82.38%   82.38%   +<.01%     
==========================================
  Files        1428     1428              
  Lines      351138   351147       +9     
==========================================
+ Hits       289282   289294      +12     
+ Misses      61856    61853       -3

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d50f188...71c48e2. Read the comment docs.

@andrewnester

Copy link
Copy Markdown
Contributor Author

@berkerpeksag @brettcannon any conclusion on this? :)

@brettcannon

Copy link
Copy Markdown
Member

@andrewnester I've been waiting for the discussion of https://bugs.python.org/issue29540 to settle down and be resolved before commenting further.

@andrewnester

Copy link
Copy Markdown
Contributor Author

@brettcannon looks like discussion stopped here https://bugs.python.org/issue29540 ..
any conclusion on this PR?

@brettcannon

Copy link
Copy Markdown
Member

@andrewnester I just pinged the issue to explicitly see what people think about your attribute proposal.

@brettcannon brettcannon changed the title bpo-29540: Add json.COMPACT constant Mar 20, 2017
@brettcannon

Copy link
Copy Markdown
Member

I opened bpo-29863 to finalize the discussion of the constant since I think it got lost on the older issue that proposed a new compact argument to json.dump().

@andrewnester

Copy link
Copy Markdown
Contributor Author

@brettcannon thanks! is there any link to discussion or some mailing list?

@orsenthil

Copy link
Copy Markdown
Member

@brettcannon

Copy link
Copy Markdown
Member

@andrewnester I just wanted to say sorry for the delay on making a decision for this. As I'm sure you have noticed on the issue it's basically split down the middle as to whether this PR should be accepted or not and so no one has made the final call.

@brettcannon

Copy link
Copy Markdown
Member

Closing this since I just closed the issue.

jaraco added a commit to jaraco/cpython that referenced this pull request Feb 17, 2023
oraluben pushed a commit to oraluben/cpython that referenced this pull request Jul 14, 2023
lysnikolaou referenced this pull request in lysnikolaou/cpython Apr 30, 2024
…sole

Refactor termios stuff in unix console
AA-Turner added a commit to AA-Turner/cpython that referenced this pull request Apr 22, 2025
…n#72)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants