Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jsiirola
Copy link
Member

@jsiirola jsiirola commented Aug 6, 2025

Fixes # .

Summary/Motivation:

A new release of sphinx-jinja2-compat (0.4.0; used by sphinx-toolbox) now causes sphinx to be automatically imported any time Python is started (a rather evil practice...). This broke the current logic for detecting if Sphinx was running.

This PR changes the logic so that Pyomo's Sphinx conf.py sets a flag in the pyomo module namespace when it is run -- which building_documentation() can look for and report.

Changes proposed in this PR:

  • Use an explicit flag (and not looking for loaded modules) to tell is Sphinx is running
  • Remove dependency on sphinx-toolbox

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@jsiirola jsiirola requested a review from mrmundt August 6, 2025 01:19
@blnicho blnicho merged commit d8f1ba2 into Pyomo:main Aug 6, 2025
61 of 62 checks passed
@jsiirola jsiirola deleted the building-docs-test branch August 8, 2025 22:18
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.

3 participants