Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-139588: Docs: PDF: convert SVG to PDF using sphinxcontrib.rsvgconverter#140342

Closed
m-aciek wants to merge 1 commit intopython:mainfrom
m-aciek:gh-139588-docs-pdf-svg
Closed

gh-139588: Docs: PDF: convert SVG to PDF using sphinxcontrib.rsvgconverter#140342
m-aciek wants to merge 1 commit intopython:mainfrom
m-aciek:gh-139588-docs-pdf-svg

Conversation

@m-aciek
Copy link
Contributor

@m-aciekm-aciek commentedOct 19, 2025
edited
Loading

#133591 introduced an SVG into docs, which is not handled by LaTeX (used for PDF build) natively. This fixes the PDF build error. Usesa recommended approach.

(Better) alternative to#139635.

Render:

Zrzut ekranu 2025-10-19 o 23 58 50

📚 Documentation preview 📚:https://cpython-previews--140342.org.readthedocs.build/

@hugovk
Copy link
Member

This will install and use the extension forall builds, including HTML and others not building PDFs. Is that intentional?

@m-aciek
Copy link
ContributorAuthor

m-aciek commentedOct 20, 2025
edited
Loading

This will install and use the extension for all builds, including HTML and others not building PDFs. Is that intentional?

The extension is quite lightweight itself, 28.95 KB [1], and skips converting for builders other that LaTeX. I think that it's not worth to introduce handling of optional dependencies for docs builds because of it.

[1]

% uvx --from pypkgsize pkgsize analyze --path Doc/venv --name sphinxcontrib-svg2pdfconverterInspecting packages in virtual environment: /Users/m-aciek/projects/cpython/Doc/venv...Successfully retrieved package data from /Users/maciej.olko/projects/cpython/Doc/venv.Package Name                   | Version         | Size         | Location--------------------------------------------------------------------------sphinxcontrib-svg2pdfconverter | 1.3.0           | 28.95 KB     | /Users/m-aciek/projects/cpython/Doc/venv/lib/python3.13/site-packages

@AA-Turner
Copy link
Member

I'm also unsure about using another third-party extension. Could we not just use the latex customisation features to include the required LaTeX packages?

A

m-aciek reacted with eyes emoji

@AA-TurnerAA-Turner added the pendingThe issue will be closed if no feedback is provided labelOct 20, 2025
@m-aciek
Copy link
ContributorAuthor

Could we not just use the latex customisation features to include the required LaTeX packages?

We can includesvg package, but replacing\sphinxincludegraphics with\includesvg is more problematic. It would probably require a custom extension? So maybe it would be worth tobring it upstream instead? I don't feel familiar with Sphinx enough and both of those ways seem more problematic then the solution in this PR.

@AA-Turner
Copy link
Member

the solution in this PR

involves bringing in a third-party dependency, who's code we haven't audited, etc. I will point out that until recently, no one had noticed the problem with this particular SVG file, which was added some months ago!

A

@AA-Turner
Copy link
Member

For the avoidance of doubt I'll close this PR, it isn't the right solution.

A

m-aciek reacted with thumbs up emoji

@m-aciekm-aciek deleted the gh-139588-docs-pdf-svg branchOctober 21, 2025 06:48
@AA-TurnerAA-Turner removed the pendingThe issue will be closed if no feedback is provided labelOct 21, 2025
@m-aciek
Copy link
ContributorAuthor

I will point out that until recently, no one had noticed the problem with this particular SVG file, which was added some months ago!

For what it's worth, in PL translation project we build PDFs for stable branches only, the SVG/PDF issue impacts main branch only.

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

Reviewers

@AA-TurnerAA-TurnerAwaiting requested review from AA-TurnerAA-Turner is a code owner

@hugovkhugovkAwaiting requested review from hugovkhugovk is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@m-aciek@hugovk@AA-Turner

[8]ページ先頭

©2009-2026 Movatter.jp