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

Support typing.Unpack in Sphinx builds #243

Closed
Tracked by #364
redeboer opened this issue Dec 6, 2023 · 0 comments · Fixed by #245
Closed
Tracked by #364

Support typing.Unpack in Sphinx builds #243

redeboer opened this issue Dec 6, 2023 · 0 comments · Fixed by #245
Assignees
Labels
🐛 Bug Something isn't working 🖱️ DX Improvements to the Developer Experience

Comments

@redeboer
Copy link
Member

redeboer commented Dec 6, 2023

If the signature of a function contains typing.Unpack, Sphinx autodoc crashes if it is run on Python 3.10 or lower. The reason is that autodoc needs Unpack.__name__, which exists if importing from typing, but not if importing from typing_extensions.

The solution is to run the documentation workflow, RTD, and the Conda environment in Python 3.11 or higher. This would have to be added as an option in the check-dev-files hook. See e.g. this log from ComPWA/ampform#365.

@redeboer redeboer added 🐛 Bug Something isn't working 🖱️ DX Improvements to the Developer Experience labels Dec 6, 2023
@redeboer redeboer self-assigned this Dec 6, 2023
@redeboer redeboer linked a pull request Dec 6, 2023 that will close this issue
@redeboer redeboer closed this as completed Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working 🖱️ DX Improvements to the Developer Experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant