Skip to content

Docs: unconditionally show plain Python example#41142

Merged
vbraun merged 3 commits intosagemath:developfrom
tobiasdiez:docs-always-preparsed-examples
Jan 6, 2026
Merged

Docs: unconditionally show plain Python example#41142
vbraun merged 3 commits intosagemath:developfrom
tobiasdiez:docs-always-preparsed-examples

Conversation

@tobiasdiez
Copy link
Contributor

@tobiasdiez tobiasdiez commented Nov 7, 2025

Removes the toggle to disable the "Python" tab in the documentation (so that tab is now always displayed). Should fix the issue mentioned in https://groups.google.com/g/sage-release/c/x5zO6z5c0d4/m/CougOT6mBgAJ.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

Documentation preview for this PR (built with commit e65af6c; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@dimpase
Copy link
Member

dimpase commented Nov 8, 2025

it's not clear from the description how the real problem - a missing sphinx dependency - is tackled.

@tobiasdiez
Copy link
Contributor Author

it's not clear from the description how the real problem - a missing sphinx dependency - is tackled.

jupyter_sphinx is required if you build the "live doc"

if SAGE_LIVE_DOC == 'yes':
JupyterSphinx().require()

if you don't build the live doc, then it's not required and the following code makes the doc build in this case:
https://github.com/sagemath/sage/pull/41142/files#diff-44710db7069c4a9b817b5603e38fa2153c59357baf4c66f51e6f123e54e835fcR1087-R1090

What still doesn't work is --disable-notebook and activating live docs, but that never worked before and would indeed require the changes to sage-the-distro that you mentioned on the mailing list.

The "bug" that I've introduced in #39030 was to incorporate the no-preparsed-examples toggle in the if check.

@dimpase
Copy link
Member

dimpase commented Dec 29, 2025

Fine with me. Keeping the Python tab unconditionally is good, and more in line with the Python trends in general

@tobiasdiez
Copy link
Contributor Author

Thanks!

vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 4, 2026
sagemathgh-41142: Docs: unconditionally show plain Python example
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Removes the toggle to disable the "Python" tab in the documentation (so
that tab is now always displayed). Should fix the issue mentioned in
https://groups.google.com/g/sage-release/c/x5zO6z5c0d4/m/CougOT6mBgAJ.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#41142
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
@vbraun vbraun merged commit e46eb0f into sagemath:develop Jan 6, 2026
23 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants