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

Building docs on python 3.13 results in an import exception #10052

Closed
3 tasks done
cibere opened this issue Dec 26, 2024 · 2 comments
Closed
3 tasks done

Building docs on python 3.13 results in an import exception #10052

cibere opened this issue Dec 26, 2024 · 2 comments
Labels
unconfirmed bug A bug report that needs triaging

Comments

@cibere
Copy link
Contributor

cibere commented Dec 26, 2024

Summary

Building the docs on 3.13 results in an import exception because imghdr has been removed in 3.13

Reproduction Steps

  1. Create a fresh venv with python 3.13
  2. Install the library's dependencies
  3. Try to build the docs

Minimal Reproducible Code

py -3.13 -m venv venv
venv\scripts\activate
pip install .[docs]
cd docs
make html

Expected Results

The docs are successfully built and I can access them

Actual Results

Running Sphinx v4.4.0

Extension error:
Could not import extension sphinx.builders.epub3 (exception: No module named 'imghdr')

Intents

doesn't apply

System Information

  • Python v3.13.1-final
  • discord.py v2.5.0-alpha
    • discord.py metadata: v2.5.0a5129+g9806aeb8
  • aiohttp v3.11.11
  • system info: Windows 11 10.0.22631

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

This came from a discord.py help thread

@cibere cibere added the unconfirmed bug A bug report that needs triaging label Dec 26, 2024
@mikeshardmind
Copy link
Contributor

mikeshardmind commented Dec 27, 2024

I've gone ahead and rescued imghdr similar to audioop here

similar state with it being a small, stable piece of the standard library that required no further changes and could have been left "as-is".

I'll open a PR with it as a docs-only, 3.13+ only dependency, but I'm not particularly attached. We'd need to upgrade to at least sphinx 6.6 to get to a version where sphinx does not depend on this.

@mikeshardmind
Copy link
Contributor

#10053 being merged should have resolved this.

@cibere cibere closed this as completed Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unconfirmed bug A bug report that needs triaging
Projects
None yet
Development

No branches or pull requests

2 participants