Fix the LaTeX title for Python 3.11 - #57
Conversation
'doc/conf.py' built the LaTeX document title as
f"The {pythonProject.replace("_", r"\_")} Documentation",
which needs PEP 701 twice over: it reuses the f-string's own quote character
inside the replacement field, **and** it puts a backslash in it. Both were
accepted only from Python **3.12**; on 3.11 the file doesn't parse, so a
documentation build there fails before Sphinx reads a single page.
The escaped name is built into 'latexProject' first, marked
'# WORKAROUND: Python <3.12' with the inlined form kept in the comment. The
rendered title is unchanged - 'sphinx_reports' still becomes
'The sphinx\_reports Documentation'.
Not currently reached by CI: 'SphinxDocumentation.yml' defaults to
'python_version: 3.14' and no pipeline overrides it. This is for a local build,
and for the day that default moves.
Found with '/work/_tools/CheckFStrings.py' after the same construct broke all 31
Python 3.11 jobs of 'pyTooling/pyTooling'. Six sibling repositories share this
'conf.py'; each gets the same change.
Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| CodeStyle | 1 minor |
🟢 Metrics 0 complexity · 0 duplication
Metric Results Complexity 0 Duplication 0
🟢 Coverage ∅ diff coverage · +0.00% coverage variation
Metric Results Coverage variation ✅ +0.00% coverage variation (-1.00%) Diff coverage ✅ ∅ diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (d2127cc) Report Missing Report Missing Report Missing Head commit (1345897) 71 (+0) 45 (+0) 63.38% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#57) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%1 Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #57 +/- ##
=======================================
Coverage 61.97% 61.97%
=======================================
Files 1 1
Lines 71 71
Branches 13 13
=======================================
Hits 44 44
Misses 26 26
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Bug Fixes
doc/conf.py:🪲 The LaTeX document title didn't parse on Python 3.11.
f"The {pythonProject.replace("_", r"\_")} Documentation",This needs PEP 701 twice: it reuses the f-string's own quote character
inside the replacement field, and it puts a backslash in one. Both were accepted only from Python 3.12. On
3.11 the file is a
SyntaxError, so a documentation build fails before Sphinx reads a single page.The escaped name is built into
latexProjectfirst, marked# WORKAROUND: Python <3.12with the inlined formkept in the comment, so dropping 3.11 is a search for the marker. The rendered title is unchanged —
sphinx_reportsstill becomesThe sphinx\_reports Documentation.Others
CI never saw this, and still wouldn't:
SphinxDocumentation.ymldefaults topython_version: '3.14'and nopipeline overrides it. This is for a local build on 3.11, and for the day that default moves.
Six sibling repositories share this
conf.py—pyVHDLModel,pyEDAA.Reports,pyEDAA.OutputFilter,pyEDAA.ProjectModel,sphinx-reportsandActions. Each gets the identical change, so the files stay copies ofone template.
Found after the same construct broke all 31 Python 3.11 jobs of
pyTooling/pyTooling — there it was package code, so it took the whole
package down at import.
Related Issues and Pull-Requests
doc/conf.py.