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

bpo-36675: Doc: Reveal doctest directives #23620

Merged
merged 2 commits into from Dec 15, 2020
Merged

Conversation

@JulienPalard
Copy link
Member

@JulienPalard JulienPalard commented Dec 2, 2020

Doctest directive were hidden in HTML and PDF output, this PR show them back.

https://bugs.python.org/issue36675

@JulienPalard
Copy link
Member Author

@JulienPalard JulienPalard commented Dec 2, 2020

Backport won't be possible, we have older sphinx on older branches.

@JulienPalard
Copy link
Member Author

@JulienPalard JulienPalard commented Dec 3, 2020

@andresdelfino I see you a lot on the doc those time, though you would be interested in proofreading this :)

@andresdelfino
Copy link
Contributor

@andresdelfino andresdelfino commented Dec 3, 2020

@JulienPalard JulienPalard merged commit c8a10d2 into python:master Dec 15, 2020
11 checks passed
11 checks passed
Docs
Details
Check for source changes
Details
Check if generated files are up to date
Details
Windows (x86)
Details
Windows (x64)
Details
macOS
Details
Ubuntu
Details
Azure Pipelines PR #20201202.50 succeeded
Details
Travis CI - Pull Request Build Passed
Details
bedevere/issue-number Issue number 36675 found
Details
bedevere/news "skip news" label found
@andresdelfino
Copy link
Contributor

@andresdelfino andresdelfino commented Dec 15, 2020

@JulienPalard could you check the comment I made? I believe something is missing.

@JulienPalard
Copy link
Member Author

@JulienPalard JulienPalard commented Dec 16, 2020

@andresdelfino Gladly, but, which comment?

Another bad idea is to print things that embed an object address, like ::
Another bad idea is to print things that embed an object address, like

.. doctest::

This comment has been minimized.

@andresdelfino

andresdelfino Dec 16, 2020
Contributor

Perhaps

Suggested change
:no-trim-doctest-flags:

is missing here?

This comment has been minimized.

@andresdelfino

andresdelfino Dec 16, 2020
Contributor

The rendered docs doesn't show the doctest directive in this case.

This comment has been minimized.

@JulienPalard

JulienPalard Dec 17, 2020
Author Member

I think it's better to keep it hidden in this case. The case is:

>>> id(1.0) # certain to fail some of the time  
7948648
>>> class C: pass
>>> C()   # the default repr() for instances embeds an address  
<C object at 0x00AC18F0>

the comment in the case is true: it's expected to fail. If we reveal the hidden doctest: +SKIP it's no longer expected to fail, the comment becomes erroneous.

The point of this example is to demo usefull cases for +ELLIPSIS, not +SKIP.

This comment has been minimized.

@andresdelfino

andresdelfino Dec 17, 2020
Contributor

Oh, ok :)

@andresdelfino
Copy link
Contributor

@andresdelfino andresdelfino commented Dec 16, 2020

@JulienPalard sorry, I thought it was submitted, but I was seeing a draft.

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

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.