FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-107024 Added copy button to code snippets in documentation by churnikov · Pull Request #107037 · python/cpython · GitHub

Repository navigation

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) .rst  (2) .txt  (2) All 3 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
3 changes: 3 additions & 0 deletions Doc/conf.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
'pyspecific',
'sphinx.ext.coverage',
'sphinx.ext.doctest',
'sphinx_copybutton',

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We've been cautious about including third-party extensions, in case downstream redistributors haven't installed them. See the try/except block just below for sphinxext.opengraph.

All the others here are Sphinx builtin extensions, or our own custom ones.

]

# Skip if downstream redistributors haven't installed it
Expand Down Expand Up @@ -379,3 +380,5 @@
'<meta property="og:image:height" content="200" />',
'<meta name="theme-color" content="#3776ab" />',
]

copybutton_exclude = '.linenos, .gp, .go'
1 change: 1 addition & 0 deletions Doc/requirements-oldest-sphinx.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
urllib3==1.26.15
sphinx-copybutton<0.6

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This file is meant to be a generated list of pinned dependencies, see instructions at the top.

1 change: 1 addition & 0 deletions Doc/requirements.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ sphinx==6.2.0
blurb

sphinxext-opengraph==0.7.5
sphinx-copybutton<0.6

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Why the upper version limit?


# The theme used by the documentation is stored separately, so we need
# to install that as well.
Expand Down
7 changes: 7 additions & 0 deletions Doc/whatsnew/3.13.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1057,3 +1057,10 @@ removed, although there is currently no date scheduled for their removal.
* :c:func:`PyThread_get_key_value`: use :c:func:`PyThread_tss_get`.
* :c:func:`PyThread_delete_key_value`: use :c:func:`PyThread_tss_delete`.
* :c:func:`PyThread_ReInitTLS`: no longer needed.


Documentation
=============

* :gh:`107024` -- added ``sphinx-copybutton`` to docs dependencies. Now one can copy contents of ``code-block`` with
just a click of a button.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added copy button to code snippets in documentation

Back | FazBrowse Home | New Git URL