guix/gnu/packages/patches/python-ipython-documentation-repro.patch
Maxim Cournoyer 2576d9ffc4
gnu: python-ipython-documentation: Also build info and pdf targets.
* gnu/packages/patches/python-ipython-documentation-chars.patch: New file.
* gnu/packages/patches/python-ipython-documentation-repro.patch: Likewise.
* gnu/local.mk: Register them.
* gnu/packages/python-xyz.scm (python-ipython-documentation)
[source]: Apply patches.
[arguments]: Use gexps.
[phases]{sanitize-sources}: New phase.
{configure-sphinx-for-xelatex}: Likewise.
{install}: Streamline.  Also build and install the PDF and info manual.
Enable parallel processing.
[inputs]: Delete field.
[propagated-inputs]: Remove texlive-updmap.cfg input.  Add fontconfig,
font-gnu-freefont, graphviz, python-docrepr, texlive-polyglossia,
texlive-bin and texlive-xindy.
2022-05-12 12:45:49 -04:00

25 lines
762 B
Diff

Fix non-reproducibilities caused by time-dependent procedures.
Submitted upstream: https://github.com/ipython/ipython/pull/13640
diff --git a/IPython/sphinxext/ipython_directive.py b/IPython/sphinxext/ipython_directive.py
index 18bdfcae9..2c665ac87 100644
--- a/IPython/sphinxext/ipython_directive.py
+++ b/IPython/sphinxext/ipython_directive.py
@@ -19,7 +19,7 @@
In [1]: 1+1
In [1]: import datetime
- ...: datetime.datetime.now()
+ ...: datetime.date.fromisoformat('2022-02-22')
It supports IPython construct that plain
Python does not understand (like magics):
@@ -28,7 +28,7 @@
In [0]: import time
- In [0]: %timeit time.sleep(0.05)
+ In [0]: %pdoc time
This will also support top-level async when using IPython 7.0+