Skip to content

Commit 0fbee50

Browse files
committed
builder: use pathlib for internal imgmath override
Updating the internal overwrite of the imgmath temporary directory to use the pathlib module. Upstream version of Sphinx has updated its implementation to use pathlib, and using a str causes issues when running the imgmath extension. Using `Path` should be fine for existing/older versions of Sphinx, as its value used with `os.path.join` handles `Path` objects. Signed-off-by: James Knight <git@jdknight.me>
1 parent 568064a commit 0fbee50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sphinxcontrib/confluencebuilder/builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ def init(self):
131131
# The imgmath extension allows a builder to override where temporary
132132
# files are build -- use this to hint to using a temporary directory
133133
# on the same partition the output directory to help prevent issues.
134-
self._imgmath_tempdir = tempfile.mkdtemp(
135-
prefix='.imgmath-', dir=self.out_dir)
134+
self._imgmath_tempdir = Path(tempfile.mkdtemp(
135+
prefix='.imgmath-', dir=self.out_dir))
136136

137137
if self.config.confluence_publish:
138138
process_ask_configs(self.config)

0 commit comments

Comments
 (0)