Title: Another invalid JSON in · Issue #102582 · python/cpython · GitHub
Open Graph Title: Another invalid JSON in · Issue #102582 · python/cpython
X Title: Another invalid JSON in · Issue #102582 · python/cpython
Description: Documentation When building the documentation for Python 3.10.10 (with Sphinx 4.2.0), the process build with this error: [ 143s] Warning, treated as error: [ 143s] /home/abuild/rpmbuild/BUILD/Python-3.10.10/Doc/howto/logging-cookbook.rst...
Open Graph Description: Documentation When building the documentation for Python 3.10.10 (with Sphinx 4.2.0), the process build with this error: [ 143s] Warning, treated as error: [ 143s] /home/abuild/rpmbuild/BUILD/Pytho...
X Description: Documentation When building the documentation for Python 3.10.10 (with Sphinx 4.2.0), the process build with this error: [ 143s] Warning, treated as error: [ 143s] /home/abuild/rpmbuild/BUILD/Pytho...
Opengraph URL: https://github.com/python/cpython/issues/102582
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Another invalid JSON in ","articleBody":"# Documentation\r\n\r\nWhen building the documentation for Python 3.10.10 (with Sphinx 4.2.0), the process build with this error:\r\n\r\n```\r\n[ 143s] Warning, treated as error:\r\n[ 143s] /home/abuild/rpmbuild/BUILD/Python-3.10.10/Doc/howto/logging-cookbook.rst:341:Could not lex literal_block as \"json\". Highlighting skipped.\r\n[ 144s] make: *** [Makefile:52: build] Error 2\r\n[ 144s] error: Bad exit status from /var/tmp/rpm-tmp.wHpiCT (%build)\r\n```\r\n\r\nI blame https://github.com/python/cpython/commit/11c25a402d77bda507f8012ee2c14c95c835cf15, because two examples of JSON are not valid JSON documents [according to JSONLint](https://jsonlint.com/).\r\n\r\n[Complete build log](https://github.com/python/cpython/files/10942937/_log.txt) listing all packages used and all steps taken to reproduce.\r\n\r\nThis patch makes documentation to be buildable:\r\n\r\n```diff\r\n---\r\n Doc/howto/logging-cookbook.rst | 24 ++++++++++++++----------\r\n 1 file changed, 14 insertions(+), 10 deletions(-)\r\n\r\n--- a/Doc/howto/logging-cookbook.rst\r\n+++ b/Doc/howto/logging-cookbook.rst\r\n@@ -340,10 +340,12 @@ adding a ``filters`` section parallel to\r\n \r\n .. code-block:: json\r\n \r\n- \"filters\": {\r\n- \"warnings_and_below\": {\r\n- \"()\" : \"__main__.filter_maker\",\r\n- \"level\": \"WARNING\"\r\n+ {\r\n+ \"filters\": {\r\n+ \"warnings_and_below\": {\r\n+ \"()\" : \"__main__.filter_maker\",\r\n+ \"level\": \"WARNING\"\r\n+ }\r\n }\r\n }\r\n \r\n@@ -351,12 +353,14 @@ and changing the section on the ``stdout\r\n \r\n .. code-block:: json\r\n \r\n- \"stdout\": {\r\n- \"class\": \"logging.StreamHandler\",\r\n- \"level\": \"INFO\",\r\n- \"formatter\": \"simple\",\r\n- \"stream\": \"ext://sys.stdout\",\r\n- \"filters\": [\"warnings_and_below\"]\r\n+ {\r\n+ \"stdout\": {\r\n+ \"class\": \"logging.StreamHandler\",\r\n+ \"level\": \"INFO\",\r\n+ \"formatter\": \"simple\",\r\n+ \"stream\": \"ext://sys.stdout\",\r\n+ \"filters\": [\"warnings_and_below\"]\r\n+ }\r\n }\r\n \r\n A filter is just a function, so we can define the ``filter_maker`` (a factory\r\n```\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-102635\n* gh-103106\n* gh-103107\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/mcepl","@type":"Person","name":"mcepl"},"datePublished":"2023-03-10T14:31:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/102582/cpython/issues/102582"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8e5f9e1d-6991-5a03-71b7-5fbcdda3a382 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CAD8:3CA024:373CB:4E6EB:696A0BAC |
| html-safe-nonce | 3d8bb0be28900b2c5b791ceda355c2d37276b9e9081da3747e175bc2676bef39 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQUQ4OjNDQTAyNDozNzNDQjo0RTZFQjo2OTZBMEJBQyIsInZpc2l0b3JfaWQiOiI4OTQ4ODY2ODAxNjk2NjM5OTE2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4796b4ecf5728880381de089b73484f5449b9539c81d98fa98b25be3c4ebc58a |
| hovercard-subject-tag | issue:1619073762 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/102582/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bcd420a9b15ac7ffc2a779711c9ce296e2a632a087b7f085efc32c74272019a9/python/cpython/issues/102582 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bcd420a9b15ac7ffc2a779711c9ce296e2a632a087b7f085efc32c74272019a9/python/cpython/issues/102582 |
| og:image:alt | Documentation When building the documentation for Python 3.10.10 (with Sphinx 4.2.0), the process build with this error: [ 143s] Warning, treated as error: [ 143s] /home/abuild/rpmbuild/BUILD/Pytho... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mcepl |
| hostname | github.com |
| expected-hostname | github.com |
| None | 699227a00bbb7fe1eec276d2ae1c3a93068bc5ba483bd9dc4b2a27a8f4f2f595 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7266b2d935baa1c6474b16dd9feaa5ca30607261 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width