Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latex builder doesn't emit the write-started event #12680

Closed
hwayne opened this issue Jul 25, 2024 · 3 comments
Closed

Latex builder doesn't emit the write-started event #12680

hwayne opened this issue Jul 25, 2024 · 3 comments

Comments

@hwayne
Copy link

hwayne commented Jul 25, 2024

Describe the bug

write-started is emitted in Builder.write (here), but LatexBuilder overrides write and does not call super() (here).

How to Reproduce

In conf, add extensions = ["foo"]. For foo.py, put:

import sys
def setup(app):
    app.connect("write-started", lambda *x: sys.exit(1))

sphinx-build -Eb html will terminate building early. sphinx-build -Eb latex will complete building normally.

Environment Information

Platform:              win32; (Windows-10-10.0.22631-SP0)
Python version:        3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)])
Python implementation: CPython
Sphinx version:        7.4.7
Docutils version:      0.20.1
Jinja2 version:        3.1.2
Pygments version:      2.18.0

Sphinx extensions

No response

Additional context

No response

@jfbu
Copy link
Contributor

jfbu commented Jul 25, 2024

You can put

def setup(app):
    app.connect("write-started", lambda *x: sys.exit(1))

directly at end of conf.py.

Same behavior as latex observed with texinfo, singlehtml and man builders.

@picnixz
Copy link
Member

picnixz commented Aug 5, 2024

cc @chrisjsewell as the author of that event

@chrisjsewell
Copy link
Member

as the author of that event

but not the author of the "tweak" 😏; e536eb9

@AA-Turner AA-Turner added this to the 8.1.0 milestone Oct 7, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants