[issue37982] Add a --minify argument to json.tool
New submission from Brad Solomon : I propose adding a command line `--minify` flag to the json/tool.py module. This flag, if specified, uses `indent=None` and `separators=(',', ':')` to eliminate indent and separator whitespace in the output. Minifying JSON (as is also done frequently with JS, CSS, and sometimes HTML) is common practice, and would be useful to have as a command-line tool rather than a user needing to use an online resource to do so. -- components: IO messages: 350817 nosy: bsolomon1124 priority: normal severity: normal status: open title: Add a --minify argument to json.tool type: enhancement versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue37982> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37982] Add a --minify argument to json.tool
Change by Brad Solomon : -- keywords: +patch pull_requests: +15277 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15601 ___ Python tracker <https://bugs.python.org/issue37982> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37982] Add a --minify argument to json.tool
Brad Solomon added the comment: Since, as you point out, json.tool is made for convenience, I see the reverse of pretty-printing (minifying) being just as convenient: $ cat > expanded.json < { > "foo": "bar", > "json": "obj" > } > EOF $ ./python.exe -m json.tool --minify expanded.json minf.json $ cat minf.json {"foo":"bar","json":"obj"} -- ___ Python tracker <https://bugs.python.org/issue37982> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37982] Add a --minify argument to json.tool
Brad Solomon added the comment: > json.tool produces more readable representation. Your option is opposite to > this purpose. That is correct, though I'm not sure what point you're trying to make. The purpose of minifying isn't to make the input more readable; it's to condense it in the interest of sending fewer bytes over a network. Unless I'm missing something, json.tool doesn't have the single express purpose of prettifying, since it also serves to be a validator as stated in its help message. This is just aadding another commonly-sought option. -- ___ Python tracker <https://bugs.python.org/issue37982> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38387] Document PyDoc_STRVAR
New submission from Brad Solomon : The C-API reference would benefit from a short mention of PyDoc_STRVAR usage, since it is used so frequently within Modules/. -- assignee: docs@python components: Documentation messages: 354053 nosy: bsolomon1124, docs@python priority: normal pull_requests: 16195 severity: normal status: open title: Document PyDoc_STRVAR type: enhancement ___ Python tracker <https://bugs.python.org/issue38387> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40561] Provide docstrings for public-facing webbrowser functions
New submission from Brad Solomon : Currently 'pydoc webbrowser.open' simply displays the function signature without a useful explanation of what 'new' does (and the parameter name/value set is not intuitive by name alone). -- assignee: docs@python components: Documentation messages: 368435 nosy: bsolomon1124, docs@python priority: normal severity: normal status: open title: Provide docstrings for public-facing webbrowser functions type: enhancement versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue40561> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40561] Provide docstrings for public-facing webbrowser functions
Change by Brad Solomon : -- keywords: +patch pull_requests: +19312 stage: -> patch review pull_request: https://github.com/python/cpython/pull/1 ___ Python tracker <https://bugs.python.org/issue40561> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40561] Provide docstrings for public-facing webbrowser functions
Change by Brad Solomon : -- nosy: +georg.brandl ___ Python tracker <https://bugs.python.org/issue40561> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40561] Provide docstrings for public-facing webbrowser functions
Brad Solomon added the comment: The module source notes "Maintained by Georg Brandl." -- ___ Python tracker <https://bugs.python.org/issue40561> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40561] Provide docstrings for public-facing webbrowser functions
Brad Solomon added the comment: To no surprise, not a lot of activity with the module over the last few years as it is fairly cut-and-dry. $ git shortlog -sn --since '5 years ago' Lib/webbrowser.py 3 Serhiy Storchaka 1 David Steele 1 Guido van Rossum 1 Michael Haas 1 Nick Coghlan 1 Steve Dower 1 Bumsik Kim 1 Zhiming Wang -- ___ Python tracker <https://bugs.python.org/issue40561> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36960] Make datetime docs more user-friendly
New submission from Brad Solomon : The datetime docs are chalk full of detail. This is a positive aspect, and represents a huge amount of work by Tim Peters and A.M. Kuchling. However, it also may function as an obstacle for beginner readers and those simply seeking to answer a basic question or see a straightforward usage example. Rather than seeing an example-based explanation of a common use-case, they are bombarded with technical detail and edge cases. I propose some restructuring of the datetime docs with the goal of making them more reader-friendly. The goal is not to eliminate any of the detail, but to restructure things so as to bring the "everyday" parts into more prominent real estate. The changes here all make an effort to reflect what's espoused by "Documenting Python" at https://devguide.python.org/documenting/. I have some additional changes in mind but wanted to put this here now to gauge receptiveness to the existing changes. -- assignee: docs@python components: Documentation messages: 342813 nosy: bsolomon1124, docs@python priority: normal pull_requests: 13321 severity: normal status: open title: Make datetime docs more user-friendly type: enhancement versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue36960> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com