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

Documentation fails to build with sphinx 7.4.7 #9938

Open
3 tasks done
bdrung opened this issue Sep 6, 2024 · 2 comments
Open
3 tasks done

Documentation fails to build with sphinx 7.4.7 #9938

bdrung opened this issue Sep 6, 2024 · 2 comments
Labels
feature request This is a feature request.

Comments

@bdrung
Copy link

bdrung commented Sep 6, 2024

Summary

Documentation fails to build with sphinx 7.4.7

Reproduction Steps

python-discord fails to build on Debian and Ubuntu, because the documentation fails to build with sphinx 7.4.7.

Minimal Reproducible Code

cd docs && python3 -m sphinx . ../debian/html

Expected Results

produce documentation

Actual Results

cd docs && python3 -m sphinx . ../debian/html
Running Sphinx v7.2.6
WARNING: Invalid configuration value found: 'language = None'. Update your configuration to a valid language code. Falling back to 'en' (English).

Extension error:
Could not import extension builder (exception: cannot import name 'ltz' from 'sphinx.builders.gettext' (/usr/lib/python3/dist-packages/sphinx/builders/gettext.py))
make[1]: *** [debian/rules:10: execute_after_dh_auto_build] Error 2

Intents

not relevant

System Information

Debian unstable and Ubuntu 24.10 (oracular)

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/python-discord/+bug/2079808

@bdrung bdrung added the unconfirmed bug A bug report that needs triaging label Sep 6, 2024
@Rapptz Rapptz added feature request This is a feature request. and removed unconfirmed bug A bug report that needs triaging labels Sep 6, 2024
@Rapptz
Copy link
Owner

Rapptz commented Sep 6, 2024

The library's documentation is explicitly built with Sphinx 4.4.0 as per the pyproject.toml file. There's no such pressure to update the Sphinx used since they undergo breaking changes semi-frequently. We have one PR (#9556) for it but it involved way too many hacks and compatibility workarounds to really put time into merging and thus is stale.

In order to fix your issue you should use the Sphinx version specified in the pyproject.toml rather than using the bumped version though, especially since the breaking changes include significant styling changes from base Sphinx.

@bdrung
Copy link
Author

bdrung commented Sep 6, 2024

We only have one sphinx version in the Debian or Ubuntu archive (see https://tracker.debian.org/pkg/sphinx and https://launchpad.net/ubuntu/+source/sphinx). The old Sphinx 4.4.0 version is not available any more. We either need to carry a patch in the packaging to make it work with the newer version or drop the documentation (or the complete package).

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

No branches or pull requests

2 participants