diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9e4a2561..f29c4d07 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,8 +19,8 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ["3.10", "3.11", "3.12", "3.13"] - sphinx: ["~=8.0"] # temporary limit, bring it back to newest sphinx once we are sphinx9 compatible + python-version: ["3.11", "3.12", "3.13", "3.14"] + sphinx: [""] # Newest Sphinx myst-parser: [""] # Newest MyST Parser (any) include: # Just check the other platforms once @@ -39,6 +39,12 @@ jobs: sphinx: "~=8.0" myst-parser: "~=4.0" pillow: "==11.0.0" + # Oldest known-compatible dependencies + - os: ubuntu-latest + python-version: "3.10" + sphinx: "==5.0.0" + myst-parser: "==1.0.0" + pillow: "==11.0.0" # Mid-range dependencies - os: ubuntu-latest python-version: "3.11" @@ -47,9 +53,9 @@ jobs: pillow: "==11.0.0" # Newest known-compatible dependencies - os: ubuntu-latest - python-version: "3.13" - sphinx: "~=8.0" - myst-parser: "==4.0.0" + python-version: "3.14" + sphinx: "~=9.0" + myst-parser: "~=5.0" pillow: "==11.0.0" runs-on: ${{ matrix.os }} @@ -71,42 +77,9 @@ jobs: - name: Run pytest run: pytest --durations=10 - coverage: - needs: [tests] - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v6 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 - with: - python-version: "3.11" - cache: pip - - name: Install dependencies - run: | - pip install -e .[testing] - pip freeze - - - name: Run pytest - run: pytest --durations=10 --cov=myst_nb --cov-report=xml --cov-report=term-missing - - - name: Create cov - run: coverage xml - # for some reason the tests/conftest.py::check_nbs fixture breaks pytest-cov's cov-report outputting - # this is why we run `coverage xml` afterwards (required by codecov) - - # TEMPORARY FIX: Disable codecov until we can get it working again - - name: Upload to Codecov - uses: codecov/codecov-action@v5 - if: false - with: - name: myst-nb-pytests - flags: pytests - files: ./coverage.xml - publish: - name: Publish to PyPi + name: Publish to PyPI needs: [tests] if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') runs-on: ubuntu-latest diff --git a/myst_nb/sphinx_ext.py b/myst_nb/sphinx_ext.py index 1a61ef78..9a7b7996 100644 --- a/myst_nb/sphinx_ext.py +++ b/myst_nb/sphinx_ext.py @@ -7,7 +7,6 @@ from importlib import resources as import_resources import os from pathlib import Path -import sys from types import ModuleType from typing import Any, Iterator, cast @@ -194,14 +193,10 @@ def _get_file_hash(path: Path): @contextlib.contextmanager def _import_resources_path(package: ModuleType, resource: str) -> Iterator[Path]: - if sys.version_info < (3, 9): - with import_resources.path(package, resource) as path: - yield path - else: - with import_resources.as_file( - import_resources.files(package).joinpath(resource) - ) as path: - yield path + with import_resources.as_file( + import_resources.files(package).joinpath(resource) + ) as path: + yield path def add_css(app: Sphinx): diff --git a/pyproject.toml b/pyproject.toml index c0ac0ea4..f8369760 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,4 @@ - [build-system] +[build-system] requires = ["flit_core >=3.11,<4"] build-backend = "flit_core.buildapi" @@ -20,6 +20,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules", @@ -42,7 +43,7 @@ dependencies = [ "myst-parser>=1.0.0", "nbformat>=5.0", "pyyaml", - "sphinx>=5,<9", # If we get bugs for older versions, just pin this higher + "sphinx>=5", # If we get bugs for older versions, just pin this higher "typing-extensions", # ipykernel is not a requirement of the library, # but is a common requirement for users (registers the python3 kernel) @@ -174,12 +175,14 @@ filterwarnings = [ 'ignore:datetime.datetime.utcnow\(\) is deprecated:DeprecationWarning:jupyter_cache', # From matplotlib’s dependencies 'ignore::DeprecationWarning:pyparsing', # imports deprecated `sre_constants` - # From myst-parser on Sphinx 9 - 'ignore:.*MystReferenceResolver.app.*:DeprecationWarning', + # From myst-parser on Sphinx 9 we hit RemovedInSphinx11Warning + 'ignore:.*MystReferenceResolver.app.*', # Upstream myst-parser still hits env.app deprecations under Sphinx 9 'ignore:.*env\\.app.*:DeprecationWarning:myst_parser', # Windows issues, some may need to be fixed in MyST-NB, others are upstream 'ignore:Proactor event loop does not implement add_reader:RuntimeWarning:zmq', + # We deal with this pending deprecation later + 'ignore:Argument "writer_name" will be removed in Docutils 2.0:PendingDeprecationWarning' ] markers = [ diff --git a/tests/conftest.py b/tests/conftest.py index 30184da3..f2bdb3b7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -16,6 +16,7 @@ from nbdime.prettyprint import pretty_print_diff import nbformat as nbf import pytest +import docutils import sphinx from sphinx import version_info as sphinx_version_info from sphinx.util.console import nocolor @@ -304,6 +305,7 @@ class FileRegression: r"original_uri=\"[^\"]*\"\s", # TODO: Remove when support for Sphinx<8 is dropped, re.escape(' translated="True"'), + re.escape(' translated="1"'), re.escape(" translation_progress=\"{'total': 4, 'translated': 2}\""), ) @@ -316,4 +318,10 @@ def check(self, data, **kwargs): def _strip_ignores(self, data): for ig in self.ignores: data = re.sub(ig, "", data) + + if docutils.__version_info__ < (0, 22): + data = data.replace('linenos="False"', 'linenos="0"') + data = data.replace('nowrap="False"', 'nowrap="0"') + data = data.replace('linenos="True"', 'linenos="1"') + data = data.replace('internal="True"', 'internal="1"') return data diff --git a/tests/test_eval/test_sphinx.txt b/tests/test_eval/test_sphinx.txt index 0f630937..34d39dc9 100644 --- a/tests/test_eval/test_sphinx.txt +++ b/tests/test_eval/test_sphinx.txt @@ -4,17 +4,17 @@ Inline evaluation - + a = 1 Evaluated inline variable: 1 - + 1 - + import base64 from IPython.display import Image string = "iVBORw0KGgoAAAANSUhEUgAAAHQAAAB0CAYAAABUmhYnAAAEd0lEQVR4Xu2c0ZLjIAwEk///6GzVvZlspWtWksNRnVcwiGmNwHaS5+v1ej38HKPAU6DHsPy3EIGexVOgh/EUqEBPU+Cw9biHCvQwBQ5bjg4V6GEKHLYcHSrQwxQ4bDk6VKCHKXDYcnSoQA9T4LDllB36fD5vlWR9fUvz0+ve9fp0/O7FU7w0n0CXhBSoDiXTRO06FBKKBLLkLvlGgkTp+UvndPzu/ul46Xq7x2/fQ8kR0wtOBaL+1J6uZ+3fPb5Aw0PRtxOWEkigAr3mCJUMuk9cM45uG3ZvJwel8dN4byW8+r1cgWYPVgRaLIlpwqWCT1cgHbr8skOgYUqkgtHwVYfQKZTiTW8rdCgQFWjtt2Pjty3TGdztOB0aHlosuVcHpglJ+h3nUFow7bE6dDOHCjRN2fBty917qEAF+jEHaI+bTlhK0Nsf/aUBpXtYdXy6noDS9dTePf74oYgWRO3dC6b57k6o7vUJFAh3Cz6dMAIV6FWB9FCQlry1f/ejQXLgt9eX6tXu0DSAtL9APysm0OYHI2mCUgVKxxOoQNOcubc/7XnF5yj3LuYPs5Ud+oc5Ry8R6GEpK1CBjlaMuwcvl1xyBC2I8im9T0xva6pPbtL1V+MjPQW6KEQJRAlAggs0vK2oCibQ4g9+LbnXb96THlQBvl5y0yclqYNQAKgAVGIJQHWPpfjf4uv+bUsagECvClCCkL46VIdecyQtKZRhlKGW3OG3LekeQ0DSBOk+1VLCdbdTAqfzlUuuQFPJe/fM9kORQAV6UYBKJslF11NJS0s8xZO2U3zpeO0lNw2g2+HV8dLbKJov1aMKWKDFfyITKKRsegqmjE7H06FpTRHoRwUoQUnu9pJLh4z0EFMdjwRI46ESWwVC8VK7QMN/TRHookDqCB1Knry261AdmmXMdG86xabzd49H83fP1+5QWkB3e7sg4eu06nra46++4K4uqHp9uyACrSKpXS/Q5kMRnUJruN6vnr7Po/VMn9KrepX3UBKgGmD1UVw6P61HoKmi0F+HfhZIhy766NDhU2F66CEgzQXjQRUjjb8aX7tDaYFpwKkgAi0SSAUXaO0Pjkk/HUoKFQ9p0wm/hjcONC2B6W3B24KKv1ZLx0vzgfQoFsyHQJe3LQINHUEZrUNre6wO1aHLw+AvO5QOHdReLbE0/vSeedyhKBWUDh00XpoAAg2/EkIAqD0FlPYXqEDp3Pix/b8/FKUOIMem7fR6j8Yr0fvlYoEWK4JAw0dplOE6dLnrqH5JrCp4NcMFejPQ6h7RnTAUT/eTKkpYiidtH99D04C6bwvS+QX65W8sUMkVaKgAlcRwuLfuNL5Ah/fQKkC6Pi2JKXB6NEjxUTslKF1P7e17KE1YbRfoZwUFuuijQ4v/l5s6VocOOzQFYv9ZBcoldzY8R08VEGiq2Ob9Bbo5oDQ8gaaKbd5foJsDSsMTaKrY5v0FujmgNDyBpopt3l+gmwNKwxNoqtjm/QW6OaA0PIGmim3eX6CbA0rDE2iq2Ob9Bbo5oDS8H8eCMw7yCzx+AAAAAElFTkSuQmCC" diff --git a/tests/test_execute/test_complex_outputs_unrun_auto.xml b/tests/test_execute/test_complex_outputs_unrun_auto.xml index 31937b98..87700f78 100644 --- a/tests/test_execute/test_complex_outputs_unrun_auto.xml +++ b/tests/test_execute/test_complex_outputs_unrun_auto.xml @@ -195,7 +195,7 @@ - + a = b+c The plotting code for a sympy equation (=@eqn:example_sympy). @@ -216,7 +216,7 @@ - + \displaystyle \left(\sqrt{5} i\right)^{\alpha} \left(\frac{1}{2} - \frac{2 \sqrt{5} i}{5}\right) + \left(- \sqrt{5} i\right)^{\alpha} \left(\frac{1}{2} + \frac{2 \sqrt{5} i}{5}\right)
diff --git a/tests/test_execute/test_complex_outputs_unrun_cache.xml b/tests/test_execute/test_complex_outputs_unrun_cache.xml index 31937b98..87700f78 100644 --- a/tests/test_execute/test_complex_outputs_unrun_cache.xml +++ b/tests/test_execute/test_complex_outputs_unrun_cache.xml @@ -195,7 +195,7 @@ <literal_block classes="output text_plain" language="myst-ansi" xml:space="preserve"> <IPython.core.display.Latex object> <container mime_type="text/latex"> - <math_block classes="output text_latex" nowrap="False" number="True" xml:space="preserve"> + <math_block classes="output text_latex" nowrap="0" number="True" xml:space="preserve"> a = b+c <paragraph> The plotting code for a sympy equation (=@eqn:example_sympy). @@ -216,7 +216,7 @@ <container mime_type="image/png"> <image candidates="{'*': '_build/jupyter_execute/e2dfbe330154316cfb6f3186e8f57fc4df8aee03b0303ed1345fc22cd51f66de.png'}" uri="_build/jupyter_execute/e2dfbe330154316cfb6f3186e8f57fc4df8aee03b0303ed1345fc22cd51f66de.png"> <container mime_type="text/latex"> - <math_block classes="output text_latex" nowrap="False" number="True" xml:space="preserve"> + <math_block classes="output text_latex" nowrap="0" number="True" xml:space="preserve"> \displaystyle \left(\sqrt{5} i\right)^{\alpha} \left(\frac{1}{2} - \frac{2 \sqrt{5} i}{5}\right) + \left(- \sqrt{5} i\right)^{\alpha} \left(\frac{1}{2} + \frac{2 \sqrt{5} i}{5}\right) <section ids="interactive-outputs" names="interactive\ outputs"> <title> diff --git a/tests/test_glue/test_parser.txt b/tests/test_glue/test_parser.txt index d2b975b6..d23398ac 100644 --- a/tests/test_glue/test_parser.txt +++ b/tests/test_glue/test_parser.txt @@ -4,25 +4,25 @@ Glue Tests <container cell_index="1" cell_metadata="{}" classes="cell" exec_count="1" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> from myst_nb import glue <container cell_index="2" cell_metadata="{}" classes="cell" exec_count="2" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> glue("key_text1", "text1") glue("key_float", 3.14159) <container classes="cell_output" nb_element="cell_code_output"> - <literal_block classes="output text_plain" language="myst-ansi" linenos="False" xml:space="preserve"> + <literal_block classes="output text_plain" language="myst-ansi" linenos="0" xml:space="preserve"> 'text1' - <literal_block classes="output text_plain" language="myst-ansi" linenos="False" xml:space="preserve"> + <literal_block classes="output text_plain" language="myst-ansi" linenos="0" xml:space="preserve"> 3.14159 <container cell_index="3" cell_metadata="{}" classes="cell" exec_count="3" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> glue("key_undisplayed", "undisplayed", display=False) <container cell_index="4" cell_metadata="{'scrolled': True}" classes="cell" exec_count="4" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> import pandas as pd df = pd.DataFrame({"header": [1, 2, 3]}) @@ -68,7 +68,7 @@ </div> <container cell_index="5" cell_metadata="{}" classes="cell" exec_count="5" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> import matplotlib.pyplot as plt plt.plot([1, 2, 3]) @@ -149,7 +149,7 @@ Math <container cell_index="8" cell_metadata="{}" classes="cell" exec_count="6" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> import sympy as sym f = sym.Function("f") @@ -158,8 +158,8 @@ f = y(n) - 2 * y(n - 1 / sym.pi) - 5 * y(n - 2) glue("sym_eq", sym.rsolve(f, y(n), [1, 4])) <container classes="cell_output" nb_element="cell_code_output"> - <math_block classes="output text_latex" nowrap="False" number="True" xml:space="preserve"> + <math_block classes="output text_latex" nowrap="0" number="True" xml:space="preserve"> \displaystyle \left(\sqrt{5} i\right)^{\alpha} \left(\frac{1}{2} - \frac{2 \sqrt{5} i}{5}\right) + \left(- \sqrt{5} i\right)^{\alpha} \left(\frac{1}{2} + \frac{2 \sqrt{5} i}{5}\right) <target refid="equation-eq-sym"> - <math_block classes="pasted-math" docname="with_glue" ids="equation-eq-sym" label="eq-sym" nowrap="False" number="1" xml:space="preserve"> + <math_block classes="pasted-math" docname="with_glue" ids="equation-eq-sym" label="eq-sym" nowrap="0" number="1" xml:space="preserve"> \displaystyle \left(\sqrt{5} i\right)^{\alpha} \left(\frac{1}{2} - \frac{2 \sqrt{5} i}{5}\right) + \left(- \sqrt{5} i\right)^{\alpha} \left(\frac{1}{2} + \frac{2 \sqrt{5} i}{5}\right) diff --git a/tests/test_parser/test_complex_outputs.xml b/tests/test_parser/test_complex_outputs.xml index 13bdcc7f..d1348155 100644 --- a/tests/test_parser/test_complex_outputs.xml +++ b/tests/test_parser/test_complex_outputs.xml @@ -201,7 +201,7 @@ </table> </div> <container mime_type="text/latex"> - <math_block classes="output text_latex" nowrap="False" number="True" xml:space="preserve"> + <math_block classes="output text_latex" nowrap="0" number="True" xml:space="preserve"> \begin{tabular}{lllrr} \toprule {} & a & b & c & d \\ @@ -227,7 +227,7 @@ <container classes="cell_output" nb_element="cell_code_output"> <container nb_element="mime_bundle"> <container mime_type="text/latex"> - <math_block classes="output text_latex" nowrap="False" number="True" xml:space="preserve"> + <math_block classes="output text_latex" nowrap="0" number="True" xml:space="preserve"> a = b+c <container mime_type="text/plain"> <literal_block classes="output text_plain" language="myst-ansi" xml:space="preserve"> @@ -246,7 +246,7 @@ <container mime_type="image/png"> <image candidates="{'*': '_build/jupyter_execute/8c43e5c8cccf697754876b7fec1b0a9b731d7900bb585e775a5fa326b4de8c5a.png'}" uri="_build/jupyter_execute/8c43e5c8cccf697754876b7fec1b0a9b731d7900bb585e775a5fa326b4de8c5a.png"> <container mime_type="text/latex"> - <math_block classes="output text_latex" nowrap="False" number="True" xml:space="preserve"> + <math_block classes="output text_latex" nowrap="0" number="True" xml:space="preserve"> \displaystyle \left(\sqrt{5} i\right)^{\alpha} \left(\frac{1}{2} - \frac{2 \sqrt{5} i}{5}\right) + \left(- \sqrt{5} i\right)^{\alpha} \left(\frac{1}{2} + \frac{2 \sqrt{5} i}{5}\right) <container mime_type="text/plain"> <literal_block classes="output text_plain" language="myst-ansi" xml:space="preserve"> diff --git a/tests/test_render_outputs/test_basic_run.xml b/tests/test_render_outputs/test_basic_run.xml index 93ab5b60..a9c2fd21 100644 --- a/tests/test_render_outputs/test_basic_run.xml +++ b/tests/test_render_outputs/test_basic_run.xml @@ -6,9 +6,9 @@ some text <container cell_index="1" cell_metadata="{}" classes="cell" exec_count="1" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> a = 1 print(a) <container classes="cell_output" nb_element="cell_code_output"> - <literal_block classes="output stream" language="myst-ansi" linenos="False" xml:space="preserve"> + <literal_block classes="output stream" language="myst-ansi" linenos="0" xml:space="preserve"> 1 diff --git a/tests/test_render_outputs/test_complex_outputs.xml b/tests/test_render_outputs/test_complex_outputs.xml index 811508b2..a593c5bf 100644 --- a/tests/test_render_outputs/test_complex_outputs.xml +++ b/tests/test_render_outputs/test_complex_outputs.xml @@ -1,7 +1,7 @@ <document source="complex_outputs"> <container cell_index="0" cell_metadata="{'init_cell': True, 'slideshow': {'slide_type': 'skip'}}" classes="cell" exec_count="1" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> import matplotlib.pyplot as plt import pandas as pd import sympy as sym @@ -89,13 +89,13 @@ Text Output <container cell_index="11" cell_metadata="{'ipub': {'text': {'format': {'backgroundcolor': '\\color{blue!10}'}}}}" classes="cell" exec_count="2" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> print(""" This is some printed text, with a nicely formatted output. """) <container classes="cell_output" nb_element="cell_code_output"> - <literal_block classes="output stream" language="myst-ansi" linenos="False" xml:space="preserve"> + <literal_block classes="output stream" language="myst-ansi" linenos="0" xml:space="preserve"> This is some printed text, with a nicely formatted output. @@ -105,7 +105,7 @@ Images and Figures <container cell_index="13" cell_metadata="{'ipub': {'figure': {'caption': 'A nice picture.', 'label': 'fig:example', 'placement': '!bh'}}}" classes="cell" exec_count="3" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> Image("example.jpg", height=400) <container classes="cell_output" nb_element="cell_code_output"> <image candidates="{'*': '_build/jupyter_execute/a4c9580c74dacf6f3316a3bd2e2a347933aa4463834dcf1bb8f20b4fcb476ae1.jpg'}" height="400" uri="_build/jupyter_execute/a4c9580c74dacf6f3316a3bd2e2a347933aa4463834dcf1bb8f20b4fcb476ae1.jpg"> @@ -118,7 +118,7 @@ The plotting code for a matplotlib figure (\cref{fig:example_mpl}). <container cell_index="17" cell_metadata="{'ipub': {'code': {'asfloat': True, 'caption': 'a', 'label': 'code:example_mpl', 'widefigure': False}, 'figure': {'caption': '', 'label': 'fig:example_mpl', 'widefigure': False}}}" classes="cell" exec_count="4" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> plt.scatter(np.random.rand(10), np.random.rand(10), label="data label") plt.ylabel(r"a y label with latex $\alpha$") plt.legend(); @@ -131,7 +131,7 @@ The plotting code for a pandas Dataframe table (\cref{tbl:example}). <container cell_index="20" cell_metadata="{'ipub': {'code': {'asfloat': True, 'caption': '', 'label': 'code:example_pd', 'placement': 'H', 'widefigure': False}, 'table': {'alternate': 'gray!20', 'caption': 'An example of a table created with pandas dataframe.', 'label': 'tbl:example', 'placement': 'H'}}}" classes="cell" exec_count="5" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> df = pd.DataFrame(np.random.rand(3, 4), columns=["a", "b", "c", "d"]) df.a = [r"$\delta$", "x", "y"] df.b = ["l", "m", "n"] @@ -193,16 +193,16 @@ Equations (with ipython or sympy) <container cell_index="22" cell_metadata="{'ipub': {'equation': {'label': 'eqn:example_ipy'}}}" classes="cell" exec_count="6" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> Latex("$$ a = b+c $$") <container classes="cell_output" nb_element="cell_code_output"> - <math_block classes="output text_latex" nowrap="False" number="True" xml:space="preserve"> + <math_block classes="output text_latex" nowrap="0" number="True" xml:space="preserve"> a = b+c <paragraph> The plotting code for a sympy equation (=@eqn:example_sympy). <container cell_index="24" cell_metadata="{'ipub': {'code': {'asfloat': True, 'caption': '', 'label': 'code:example_sym', 'placement': 'H', 'widefigure': False}, 'equation': {'environment': 'equation', 'label': 'eqn:example_sympy'}}}" classes="cell" exec_count="7" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> y = sym.Function("y") n = sym.symbols(r"\alpha") f = y(n) - 2 * y(n - 1 / sym.pi) - 5 * y(n - 2) @@ -211,7 +211,7 @@ <image candidates="{'*': '_build/jupyter_execute/8c43e5c8cccf697754876b7fec1b0a9b731d7900bb585e775a5fa326b4de8c5a.png'}" uri="_build/jupyter_execute/8c43e5c8cccf697754876b7fec1b0a9b731d7900bb585e775a5fa326b4de8c5a.png"> <container cell_index="25" cell_metadata="{}" classes="cell" exec_count="7" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> from IPython.display import display, Markdown display(Markdown("**_some_ markdown**")) diff --git a/tests/test_render_outputs/test_complex_outputs_latex.xml b/tests/test_render_outputs/test_complex_outputs_latex.xml index d1c82738..136559de 100644 --- a/tests/test_render_outputs/test_complex_outputs_latex.xml +++ b/tests/test_render_outputs/test_complex_outputs_latex.xml @@ -1,7 +1,7 @@ <document source="complex_outputs"> <container cell_index="0" cell_metadata="{'init_cell': True, 'slideshow': {'slide_type': 'skip'}}" classes="cell" exec_count="1" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> import matplotlib.pyplot as plt import pandas as pd import sympy as sym @@ -89,13 +89,13 @@ Text Output <container cell_index="11" cell_metadata="{'ipub': {'text': {'format': {'backgroundcolor': '\\color{blue!10}'}}}}" classes="cell" exec_count="2" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> print(""" This is some printed text, with a nicely formatted output. """) <container classes="cell_output" nb_element="cell_code_output"> - <literal_block classes="output stream" language="myst-ansi" linenos="False" xml:space="preserve"> + <literal_block classes="output stream" language="myst-ansi" linenos="0" xml:space="preserve"> This is some printed text, with a nicely formatted output. @@ -105,7 +105,7 @@ Images and Figures <container cell_index="13" cell_metadata="{'ipub': {'figure': {'caption': 'A nice picture.', 'label': 'fig:example', 'placement': '!bh'}}}" classes="cell" exec_count="3" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> Image("example.jpg", height=400) <container classes="cell_output" nb_element="cell_code_output"> <image candidates="{'*': '_build/jupyter_execute/a4c9580c74dacf6f3316a3bd2e2a347933aa4463834dcf1bb8f20b4fcb476ae1.jpg'}" height="400" uri="_build/jupyter_execute/a4c9580c74dacf6f3316a3bd2e2a347933aa4463834dcf1bb8f20b4fcb476ae1.jpg"> @@ -118,7 +118,7 @@ The plotting code for a matplotlib figure (\cref{fig:example_mpl}). <container cell_index="17" cell_metadata="{'ipub': {'code': {'asfloat': True, 'caption': 'a', 'label': 'code:example_mpl', 'widefigure': False}, 'figure': {'caption': '', 'label': 'fig:example_mpl', 'widefigure': False}}}" classes="cell" exec_count="4" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> plt.scatter(np.random.rand(10), np.random.rand(10), label="data label") plt.ylabel(r"a y label with latex $\alpha$") plt.legend(); @@ -131,14 +131,14 @@ The plotting code for a pandas Dataframe table (\cref{tbl:example}). <container cell_index="20" cell_metadata="{'ipub': {'code': {'asfloat': True, 'caption': '', 'label': 'code:example_pd', 'placement': 'H', 'widefigure': False}, 'table': {'alternate': 'gray!20', 'caption': 'An example of a table created with pandas dataframe.', 'label': 'tbl:example', 'placement': 'H'}}}" classes="cell" exec_count="5" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> df = pd.DataFrame(np.random.rand(3, 4), columns=["a", "b", "c", "d"]) df.a = [r"$\delta$", "x", "y"] df.b = ["l", "m", "n"] df.set_index(["a", "b"]) df.round(3) <container classes="cell_output" nb_element="cell_code_output"> - <math_block classes="output text_latex" nowrap="False" number="True" xml:space="preserve"> + <math_block classes="output text_latex" nowrap="0" number="True" xml:space="preserve"> \begin{tabular}{lllrr} \toprule {} & a & b & c & d \\ @@ -153,16 +153,16 @@ Equations (with ipython or sympy) <container cell_index="22" cell_metadata="{'ipub': {'equation': {'label': 'eqn:example_ipy'}}}" classes="cell" exec_count="6" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> Latex("$$ a = b+c $$") <container classes="cell_output" nb_element="cell_code_output"> - <math_block classes="output text_latex" nowrap="False" number="True" xml:space="preserve"> + <math_block classes="output text_latex" nowrap="0" number="True" xml:space="preserve"> a = b+c <paragraph> The plotting code for a sympy equation (=@eqn:example_sympy). <container cell_index="24" cell_metadata="{'ipub': {'code': {'asfloat': True, 'caption': '', 'label': 'code:example_sym', 'placement': 'H', 'widefigure': False}, 'equation': {'environment': 'equation', 'label': 'eqn:example_sympy'}}}" classes="cell" exec_count="7" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> y = sym.Function("y") n = sym.symbols(r"\alpha") f = y(n) - 2 * y(n - 1 / sym.pi) - 5 * y(n - 2) @@ -171,7 +171,7 @@ <image candidates="{'*': '_build/jupyter_execute/8c43e5c8cccf697754876b7fec1b0a9b731d7900bb585e775a5fa326b4de8c5a.png'}" uri="_build/jupyter_execute/8c43e5c8cccf697754876b7fec1b0a9b731d7900bb585e775a5fa326b4de8c5a.png"> <container cell_index="25" cell_metadata="{}" classes="cell" exec_count="7" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> from IPython.display import display, Markdown display(Markdown("**_some_ markdown**")) diff --git a/tests/test_render_outputs/test_hide_cell_content.xml b/tests/test_render_outputs/test_hide_cell_content.xml index 66359142..4cd19273 100644 --- a/tests/test_render_outputs/test_hide_cell_content.xml +++ b/tests/test_render_outputs/test_hide_cell_content.xml @@ -5,32 +5,32 @@ <container cell_index="1" cell_metadata="{'tags': ['hide-input']}" classes="cell tag_hide-input" exec_count="1" hide_mode="input" nb_element="cell_code" prompt_hide="Hide code cell {type}" prompt_show="Show code cell {type}"> <HideCodeCellNode classes="above-input" prompt_hide="Hide code cell source" prompt_show="Show code cell source"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> print("hide-input") <container classes="cell_output" nb_element="cell_code_output"> - <literal_block classes="output stream" language="myst-ansi" linenos="False" xml:space="preserve"> + <literal_block classes="output stream" language="myst-ansi" linenos="0" xml:space="preserve"> hide-input <container cell_index="2" cell_metadata="{'tags': ['hide-output']}" classes="cell tag_hide-output" exec_count="2" hide_mode="output" nb_element="cell_code" prompt_hide="Hide code cell {type}" prompt_show="Show code cell {type}"> <container classes="cell_input above-output-prompt" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> print("hide-output") <HideCodeCellNode classes="below-input" prompt_hide="Hide code cell output" prompt_show="Show code cell output"> <container classes="cell_output" nb_element="cell_code_output"> - <literal_block classes="output stream" language="myst-ansi" linenos="False" xml:space="preserve"> + <literal_block classes="output stream" language="myst-ansi" linenos="0" xml:space="preserve"> hide-output <container cell_index="3" cell_metadata="{'tags': ['hide-cell']}" classes="cell tag_hide-cell" exec_count="4" hide_mode="all" nb_element="cell_code" prompt_hide="Hide code cell {type}" prompt_show="Show code cell {type}"> <HideCodeCellNode classes="above-input" prompt_hide="Hide code cell content" prompt_show="Show code cell content"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> print("hide-cell") <container classes="cell_output" nb_element="cell_code_output"> - <literal_block classes="output stream" language="myst-ansi" linenos="False" xml:space="preserve"> + <literal_block classes="output stream" language="myst-ansi" linenos="0" xml:space="preserve"> hide-cell <container cell_index="4" cell_metadata="{'tags': ['hide-cell'], 'mystnb': {'code_prompt_show': 'My show message', 'code_prompt_hide': 'My hide message'}}" classes="cell tag_hide-cell" exec_count="5" hide_mode="all" nb_element="cell_code" prompt_hide="My hide message" prompt_show="My show message"> <HideCodeCellNode classes="above-input" prompt_hide="My hide message" prompt_show="My show message"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> print("hide-cell custom message") <container classes="cell_output" nb_element="cell_code_output"> - <literal_block classes="output stream" language="myst-ansi" linenos="False" xml:space="preserve"> + <literal_block classes="output stream" language="myst-ansi" linenos="0" xml:space="preserve"> hide-cell custom message diff --git a/tests/test_render_outputs/test_merge_streams.xml b/tests/test_render_outputs/test_merge_streams.xml index d944e436..f0399b4f 100644 --- a/tests/test_render_outputs/test_merge_streams.xml +++ b/tests/test_render_outputs/test_merge_streams.xml @@ -1,7 +1,7 @@ <document source="merge_streams"> <container cell_index="0" cell_metadata="{}" classes="cell" exec_count="1" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> import sys print("stdout1", file=sys.stdout) @@ -12,13 +12,13 @@ print("stderr3", file=sys.stderr) 1 <container classes="cell_output" nb_element="cell_code_output"> - <literal_block classes="output stream" language="myst-ansi" linenos="False" xml:space="preserve"> + <literal_block classes="output stream" language="myst-ansi" linenos="0" xml:space="preserve"> stdout1 stdout2 stdout3 - <literal_block classes="output stderr" language="myst-ansi" linenos="False" xml:space="preserve"> + <literal_block classes="output stderr" language="myst-ansi" linenos="0" xml:space="preserve"> stderr1 stderr2 stderr3 - <literal_block classes="output text_plain" language="myst-ansi" linenos="False" xml:space="preserve"> + <literal_block classes="output text_plain" language="myst-ansi" linenos="0" xml:space="preserve"> 1 diff --git a/tests/test_render_outputs/test_merge_streams_parallel.xml b/tests/test_render_outputs/test_merge_streams_parallel.xml index 17254962..1bb52cfe 100644 --- a/tests/test_render_outputs/test_merge_streams_parallel.xml +++ b/tests/test_render_outputs/test_merge_streams_parallel.xml @@ -1,14 +1,14 @@ <document source="merge_streams_parallel"> <container cell_index="0" cell_metadata="{'execution': {'iopub.execute_input': '2024-09-19T21:44:29.809012Z', 'iopub.status.busy': '2024-09-19T21:44:29.808809Z', 'iopub.status.idle': '2024-09-19T21:44:29.978481Z', 'shell.execute_reply': '2024-09-19T21:44:29.977891Z'}}" classes="cell" exec_count="1" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> from concurrent.futures import ProcessPoolExecutor with ProcessPoolExecutor() as executor: for i in executor.map(print, [0] * 10): pass <container classes="cell_output" nb_element="cell_code_output"> - <literal_block classes="output stream" language="myst-ansi" linenos="False" xml:space="preserve"> + <literal_block classes="output stream" language="myst-ansi" linenos="0" xml:space="preserve"> 0 0 0 diff --git a/tests/test_render_outputs/test_metadata_figure.xml b/tests/test_render_outputs/test_metadata_figure.xml index 1ae8143d..74f40129 100644 --- a/tests/test_render_outputs/test_metadata_figure.xml +++ b/tests/test_render_outputs/test_metadata_figure.xml @@ -4,7 +4,7 @@ Formatting code outputs <container cell_index="1" cell_metadata="{'myst': {'figure': {'caption': 'Hey everyone its **party** time!\n', 'name': 'fun-fish'}}}" classes="cell" exec_count="1" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> from IPython.display import Image Image("fun-fish.png") @@ -18,6 +18,6 @@ time! <paragraph> Link: - <reference internal="True" refid="fun-fish"> + <reference internal="1" refid="fun-fish"> <inline classes="std std-ref"> swim to the fish diff --git a/tests/test_render_outputs/test_metadata_image.xml b/tests/test_render_outputs/test_metadata_image.xml index 33d586e3..1b773bae 100644 --- a/tests/test_render_outputs/test_metadata_image.xml +++ b/tests/test_render_outputs/test_metadata_image.xml @@ -4,7 +4,7 @@ Formatting code outputs <container cell_index="1" cell_metadata="{'myst': {'image': {'alt': 'fun-fish', 'classes': 'shadow bg-primary', 'width': '300px'}}}" classes="cell" exec_count="1" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> from IPython.display import Image Image("fun-fish.png") diff --git a/tests/test_render_outputs/test_metadata_image_output.xml b/tests/test_render_outputs/test_metadata_image_output.xml index bd398e43..d4e70ba7 100644 --- a/tests/test_render_outputs/test_metadata_image_output.xml +++ b/tests/test_render_outputs/test_metadata_image_output.xml @@ -4,7 +4,7 @@ Output metadata <container cell_index="1" cell_metadata="{'tags': ['skip-execution']}" classes="cell tag_skip-execution" exec_count="1" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> # Outputs included with width/height in output metadata, # cell is not executed from IPython.display import Image @@ -14,7 +14,7 @@ <image candidates="{'*': '_build/jupyter_execute/a4c9580c74dacf6f3316a3bd2e2a347933aa4463834dcf1bb8f20b4fcb476ae1.jpg'}" height="100" uri="_build/jupyter_execute/a4c9580c74dacf6f3316a3bd2e2a347933aa4463834dcf1bb8f20b4fcb476ae1.jpg" width="500"> <container cell_index="2" cell_metadata="{}" classes="cell" exec_count="1" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> # No outputs, cell is executed, image should have original size (370, 254) from IPython.display import Image diff --git a/tests/test_render_outputs/test_metadata_multiple_image.xml b/tests/test_render_outputs/test_metadata_multiple_image.xml index 2c569e33..a25fb40d 100644 --- a/tests/test_render_outputs/test_metadata_multiple_image.xml +++ b/tests/test_render_outputs/test_metadata_multiple_image.xml @@ -6,7 +6,7 @@ This is a test case with multiple captioned and labelled images <container cell_index="1" cell_metadata="{'myst': {'figure': {'caption': 'Hey everyone its **party** time!\n', 'name': 'fun-fish'}, 'image': {'alt': 'fun-fish', 'classes': 'shadow bg-primary', 'width': '300px'}}}" classes="cell" exec_count="1" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> from IPython.display import Image Image("fun-fish.png") @@ -20,14 +20,14 @@ time! <paragraph> Link: - <reference internal="True" refid="fun-fish"> + <reference internal="1" refid="fun-fish"> <inline classes="std std-ref"> swim to the fish <paragraph> Adding another party fish image to test for multiple images <container cell_index="4" cell_metadata="{'myst': {'figure': {'caption': 'Hey everyone its **party** time again!\n', 'name': 'fun-fish2'}, 'image': {'alt': 'fun-fish2', 'classes': 'shadow bg-primary', 'width': '200px'}}}" classes="cell" exec_count="2" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> from IPython.display import Image Image("fun-fish.png") @@ -41,11 +41,11 @@ time again! <paragraph> Link: - <reference internal="True" refid="fun-fish"> + <reference internal="1" refid="fun-fish"> <inline classes="std std-ref"> swim to the fish <paragraph> Link: - <reference internal="True" refid="fun-fish2"> + <reference internal="1" refid="fun-fish2"> <inline classes="std std-ref"> swim to the fish again diff --git a/tests/test_render_outputs/test_scroll_outputs.xml b/tests/test_render_outputs/test_scroll_outputs.xml index 99d19a0c..6d8969f4 100644 --- a/tests/test_render_outputs/test_scroll_outputs.xml +++ b/tests/test_render_outputs/test_scroll_outputs.xml @@ -4,20 +4,20 @@ Scroll long outputs <container cell_index="1" cell_metadata="{}" classes="cell config_scroll_outputs" exec_count="2" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> for i in range(2): print("short output") <container classes="cell_output" nb_element="cell_code_output"> - <literal_block classes="output stream" language="myst-ansi" linenos="False" xml:space="preserve"> + <literal_block classes="output stream" language="myst-ansi" linenos="0" xml:space="preserve"> short output short output <container cell_index="2" cell_metadata="{}" classes="cell config_scroll_outputs" exec_count="1" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> for i in range(100): print("long output") <container classes="cell_output" nb_element="cell_code_output"> - <literal_block classes="output stream" language="myst-ansi" linenos="False" xml:space="preserve"> + <literal_block classes="output stream" language="myst-ansi" linenos="0" xml:space="preserve"> long output long output long output diff --git a/tests/test_render_outputs/test_stderr_remove.xml b/tests/test_render_outputs/test_stderr_remove.xml index 0ade48ad..f7eeefac 100644 --- a/tests/test_render_outputs/test_stderr_remove.xml +++ b/tests/test_render_outputs/test_stderr_remove.xml @@ -1,14 +1,14 @@ <document source="basic_stderr"> <container cell_index="0" cell_metadata="{}" classes="cell" exec_count="1" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> import sys print("hallo", file=sys.stderr) <container classes="cell_output" nb_element="cell_code_output"> <container cell_index="1" cell_metadata="{'tags': ['remove-stderr']}" classes="cell tag_remove-stderr" exec_count="1" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> import sys print("hallo", file=sys.stderr) diff --git a/tests/test_render_outputs/test_stderr_tag.xml b/tests/test_render_outputs/test_stderr_tag.xml index 923ae5c4..0ed540bf 100644 --- a/tests/test_render_outputs/test_stderr_tag.xml +++ b/tests/test_render_outputs/test_stderr_tag.xml @@ -1,16 +1,16 @@ <document source="basic_stderr"> <container cell_index="0" cell_metadata="{}" classes="cell" exec_count="1" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> import sys print("hallo", file=sys.stderr) <container classes="cell_output" nb_element="cell_code_output"> - <literal_block classes="output stderr" language="myst-ansi" linenos="False" xml:space="preserve"> + <literal_block classes="output stderr" language="myst-ansi" linenos="0" xml:space="preserve"> hallo <container cell_index="1" cell_metadata="{'tags': ['remove-stderr']}" classes="cell tag_remove-stderr" exec_count="1" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> import sys print("hallo", file=sys.stderr) diff --git a/tests/test_render_outputs/test_unknown_mimetype.xml b/tests/test_render_outputs/test_unknown_mimetype.xml index 61d59ff2..06837614 100644 --- a/tests/test_render_outputs/test_unknown_mimetype.xml +++ b/tests/test_render_outputs/test_unknown_mimetype.xml @@ -1,7 +1,7 @@ <document source="unknown_mimetype"> <container cell_index="0" cell_metadata="{}" classes="cell" exec_count="1" nb_element="cell_code"> <container classes="cell_input" nb_element="cell_code_source"> - <literal_block language="ipython3" linenos="False" xml:space="preserve"> + <literal_block language="ipython3" linenos="0" xml:space="preserve"> a = 1 print(a) <container classes="cell_output" nb_element="cell_code_output"> diff --git a/tox.ini b/tox.ini index 42d442e8..f276f897 100644 --- a/tox.ini +++ b/tox.ini @@ -16,7 +16,7 @@ envlist = py313-sphinx8 [testenv] usedevelop = true -[testenv:py{310,311,312,313}-sphinx{5,6,7,8}] +[testenv:py{310,311,312,313,314}-sphinx{5,6,7,8}] extras = testing deps = sphinx5: sphinx>=5,<6