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

Fix #8074: napoleon: Crashes during processing C-ext module #8077

Merged
merged 1 commit into from Aug 9, 2020

Conversation

tk0miya
Copy link
Member

@tk0miya tk0miya commented Aug 8, 2020

Feature or Bugfix

  • Bugfix

Purpose

inspect.getfile() raises TypeError if given object is a C-extension.
This handles the exception not to be crashed.
@tk0miya
Copy link
Member Author

tk0miya commented Aug 8, 2020

It confirmed this fixes the error.

FROM python:3.8-slim

RUN apt update; apt install -y build-essential curl git make unzip vim
RUN git clone --single-branch --branch gh-pages https://github.com/McSinyx/palace
RUN pip install palace==0.2.1 Sphinx==3.2.0
RUN apt install -y libjack-dev libpulse-dev libasound-dev
RUN pip install git+https://github.com/tk0miya/sphinx@8074_napoleon_crashes_by_cython
WORKDIR /palace
RUN make html SPHINXOPTS=-T

@keewis
Copy link
Contributor

keewis commented Aug 8, 2020

looks good to me. Sorry for not doing that when I wrote that method. The docs do mention that it raises TypeError for "built-in" objects, but I didn't think that could refer to c-extensions.

@tk0miya
Copy link
Member Author

tk0miya commented Aug 9, 2020

Thank you for reviewing :-)

@tk0miya tk0miya merged commit a01acc4 into sphinx-doc:3.x Aug 9, 2020
@tk0miya tk0miya deleted the 8074_napoleon_crashes_by_cython branch August 9, 2020 05:31
@tk0miya
Copy link
Member Author

tk0miya commented Aug 9, 2020

I noticed I was wrongly merged this into 3.x branch. So I cherry-picked this into 3.2.x branch now.

st-bender added a commit to st-bender/pynrlmsise00 that referenced this pull request Aug 14, 2020
Sphinx 3.2.0 (on rtd) has a problem with cpython extensions,
disables that version when building the docs on rtd.

References:
* sphinx-doc/sphinx#8074
* sphinx-doc/sphinx#8077

[skip ci]
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants