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

ablog doesn't work with sphinx >=7.3.0 #277

Closed
stephanlachnit opened this issue Apr 18, 2024 · 4 comments · Fixed by #278
Closed

ablog doesn't work with sphinx >=7.3.0 #277

stephanlachnit opened this issue Apr 18, 2024 · 4 comments · Fixed by #278

Comments

@stephanlachnit
Copy link

Describe the bug

Using ablog with sphinx >= 7.3.0 fails with

Theme error:
setting ablog.inject_templates_after_theme occurs in none of the searched theme configs

To Reproduce

No response

Screenshots

No response

System Details

No response

Installation method

pip

@Carreau
Copy link

Carreau commented Apr 18, 2024

I think this is a problem in sphinx, 360c7a80223e7818d002ce91146ee92c1eae7ec2

-        try:
-            return self.config.get(section, name)
-        except (configparser.NoOptionError, configparser.NoSectionError):
-            if self._base:
-                return self._base.get_config(section, name, default)
-
-            if default is _NO_DEFAULT:
-                raise ThemeError(__('setting %s.%s occurs in none of the '
-                                    'searched theme configs') % (section, name)) from None
-            return default
+        if section == 'theme':
+            value = self._settings.get(name, default)
+        elif section == 'options':
+            value = self._options.get(name, default)
+        else:
+            value = _NO_DEFAULT
+        if value is _NO_DEFAULT:
+            msg = __(
+                'setting %s.%s occurs in none of the searched theme configs',
+            ) % (section, name)
+            raise ThemeError(msg)
+        return value

this means that any section items that is neither 'theme' or 'option' will trigger an error.

EDIT : Though this commit is in earlier version of sphinx so I'm not sure.
EDIT2: That is because there was 7 (!!) patch releases of sphinx yesterday.

@Carreau
Copy link

Carreau commented Apr 18, 2024

Bisect does point to the above commit.

@nabobalis
Copy link
Contributor

Thanks for the report!

I will have to pin sphinx for now and then fix it when I get some more time.

@nabobalis
Copy link
Contributor

The patch seems to be small so I will just add support for sphinx instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants