Skip to content

Fix the LaTeX title for Python 3.11 - #57

Open
pyedaa-claude[bot] wants to merge 1 commit into
devfrom
claude/fstring-pep701
Open

Fix the LaTeX title for Python 3.11#57
pyedaa-claude[bot] wants to merge 1 commit into
devfrom
claude/fstring-pep701

Conversation

@pyedaa-claude

@pyedaa-claude pyedaa-claude Bot commented Sep 2, 2026

Copy link
Copy Markdown

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 latexProject first, marked # WORKAROUND: Python <3.12 with the inlined form
      kept in the comment, so dropping 3.11 is a search for the marker. The rendered title is unchanged
      sphinx_reports still becomes The sphinx\_reports Documentation.

Others

  • CI never saw this, and still wouldn't: SphinxDocumentation.yml defaults to python_version: '3.14' and no
    pipeline overrides it. This is for a local build on 3.11, and for the day that default moves.

  • Six sibling repositories share this conf.pypyVHDLModel, pyEDAA.Reports, pyEDAA.OutputFilter,
    pyEDAA.ProjectModel, sphinx-reports and Actions. Each gets the identical change, so the files stay copies of
    one 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

  • Companion pull-requests in the five other repositories sharing this doc/conf.py.

'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>
@pyedaa-claude
pyedaa-claude Bot requested a review from Paebbels as a code owner September 2, 2026 19:24
@codacy-production

codacy-production Bot commented Sep 2, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 1 minor

Alerts:
⚠ 1 issue (≤ 0 issues of at least minor severity)

Results:
1 new issue

Category Results
CodeStyle 1 minor

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

🟢 Coverage ∅ diff coverage · +0.00% coverage variation

Metric Results
Coverage variation +0.00% coverage variation (-1.00%)
Diff coverage diff coverage

View coverage diff in Codacy

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

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.97%. Comparing base (d2127cc) to head (1345897).
✅ All tests successful. No failed tests found.

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           
Flag Coverage Δ
unittests 61.97% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants