-
Notifications
You must be signed in to change notification settings - Fork 84
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
Update sphinx requirement from <6,>=4 to >=4,<7 #513
Conversation
Updates the requirements on [sphinx](https://github.com/sphinx-doc/sphinx) to permit the latest version. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES) - [Commits](sphinx-doc/sphinx@v4.0.0...v6.2.0) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## master #513 +/- ##
=======================================
Coverage 81.47% 81.47%
=======================================
Files 29 29
Lines 2618 2618
=======================================
Hits 2133 2133
Misses 485 485
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests and sample docs look good!
EDIT: Scratch that we need to explicitly test the new version in the CI/CD
It looks like Python 3.11 is going to cause some minor regression test failures so let's tackle that in another issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something, somewhere, is pinning Sphinx to version 5, so we're not really testing against 6. So we should ensure that is resolved before merging.
Hi, |
apologies if I've missed something in the PR for this issue, but it looks like myst-parser is still set at 0.18. Doesn't that need to be 1.0.0 to pickup the myst-parser sphinx constraint level up to < 7? |
A newer version of sphinx exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged. |
I've been trying to use this PR and looks like pytest is failing with + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.16, pytest-7.3.1, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2
configfile: tox.ini
plugins: remotedata-0.4.0, anyio-3.6.2, datadir-1.4.1, regressions-2.4.2, pytest_param_files-0.3.4
collected 41 items / 2 errors
========================================================================================== ERRORS ===========================================================================================
__________________________________________________________________________ ERROR collecting tests/test_docutils.py __________________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/test_docutils.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_docutils.py:11: in <module>
from myst_nb.docutils_ import Parser
../../BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/docutils_.py:22: in <module>
from myst_parser.parsers.docutils_ import (
E ImportError: cannot import name 'DOCUTILS_EXCLUDED_ARGS' from 'myst_parser.parsers.docutils_' (/usr/lib/python3.8/site-packages/myst_parser/parsers/docutils_.py)
__________________________________________________________________________ ERROR collecting tests/test_execute.py ___________________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/test_execute.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_execute.py:9: in <module>
from myst_nb.sphinx_ import NbMetadataCollector
../../BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: in <module>
from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
===================================================================================== warnings summary ======================================================================================
../../../../../usr/lib/python3.8/site-packages/jupyter_client/connect.py:20
/usr/lib/python3.8/site-packages/jupyter_client/connect.py:20: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
given by the platformdirs library. To remove this warning and
see the appropriate new directories, set the environment variable
`JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
The use of platformdirs will be the default in `jupyter_core` v6
from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write
../../../../../usr/lib/python3.8/site-packages/jupyter_cache/cache/db.py:17
/usr/lib/python3.8/site-packages/jupyter_cache/cache/db.py:17: MovedIn20Warning: The ``declarative_base()`` function is now available as sqlalchemy.orm.declarative_base(). (deprecated since: 2.0) (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
OrmBase = declarative_base()
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================== short test summary info ==================================================================================
ERROR tests/test_docutils.py
ERROR tests/test_execute.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=============================================================================== 2 warnings, 2 errors in 1.38s =============================================================================== |
I've added those two files to --ignore list to test rest of the units and here is the result + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' --ignore tests/test_docutils.py --ignore tests/test_execute.py
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.16, pytest-7.3.1, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2
configfile: tox.ini
plugins: remotedata-0.4.0, anyio-3.6.2, datadir-1.4.1, regressions-2.4.2, pytest_param_files-0.3.4
collected 41 items
tests/test_ansi_lexer.py ........... [ 26%]
tests/test_cli.py F. [ 31%]
tests/test_codecell_file.py EE [ 36%]
tests/test_eval.py E [ 39%]
tests/test_glue.py ....E [ 51%]
tests/test_parser.py EEEE [ 60%]
tests/test_render_outputs.py .EEEEEEEEEEEE [ 92%]
tests/test_text_based.py EEE [100%]
========================================================================================== ERRORS ===========================================================================================
___________________________________________________________________________ ERROR at setup of test_codecell_file ____________________________________________________________________________
sphinx_params = {'conf': {'nb_execution_mode': 'cache', 'source_suffix': {'.md': 'myst-nb'}}, 'files': ('mystnb_codecell_file.md',)}
make_app = <function make_app.<locals>.make at 0x7f2418fc3280>, tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_codecell_file0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
_______________________________________________________________________ ERROR at setup of test_codecell_file_warnings _______________________________________________________________________
sphinx_params = {'conf': {'nb_execution_mode': 'force', 'source_suffix': {'.md': 'myst-nb'}}, 'files': ('mystnb_codecell_file_warnings.md',)}
make_app = <function make_app.<locals>.make at 0x7f2418d22b80>, tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_codecell_file_warnings0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
_______________________________________________________________________________ ERROR at setup of test_sphinx _______________________________________________________________________________
sphinx_params = {'conf': {'nb_execution_mode': 'inline'}, 'files': ('with_eval.md',)}, make_app = <function make_app.<locals>.make at 0x7f2418d22f70>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_sphinx0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
_______________________________________________________________________________ ERROR at setup of test_parser _______________________________________________________________________________
sphinx_params = {'conf': {'nb_execution_mode': 'off'}, 'files': ('with_glue.ipynb',)}, make_app = <function make_app.<locals>.make at 0x7f2418cf5dc0>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_parser0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
_____________________________________________________________________________ ERROR at setup of test_basic_run ______________________________________________________________________________
sphinx_params = {'conf': {'nb_execution_mode': 'off'}, 'files': ('basic_run.ipynb',)}, make_app = <function make_app.<locals>.make at 0x7f24134c7310>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_basic_run0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
__________________________________________________________________________ ERROR at setup of test_complex_outputs ___________________________________________________________________________
sphinx_params = {'conf': {'nb_execution_mode': 'off'}, 'files': ('complex_outputs.ipynb',)}, make_app = <function make_app.<locals>.make at 0x7f2418ef4160>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_complex_outputs0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
__________________________________________________________________________ ERROR at setup of test_toctree_in_ipynb __________________________________________________________________________
sphinx_params = {'buildername': 'latex', 'conf': {'nb_execution_mode': 'off'}, 'files': ('latex_build/index.ipynb', 'latex_build/other.ipynb')}
make_app = <function make_app.<locals>.make at 0x7f241352b310>, tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_toctree_in_ipynb0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
_____________________________________________________________________________ ERROR at setup of test_ipywidgets _____________________________________________________________________________
sphinx_params = {'conf': {'nb_execution_mode': 'off'}, 'files': ('ipywidgets.ipynb',)}, make_app = <function make_app.<locals>.make at 0x7f2418ef4820>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_ipywidgets0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
_____________________________________________________________________________ ERROR at setup of test_basic_run ______________________________________________________________________________
sphinx_params = {'conf': {'nb_execution_mode': 'off'}, 'files': ('basic_run.ipynb',)}, make_app = <function make_app.<locals>.make at 0x7f2418ee9e50>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_basic_run1')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
________________________________________________________________________ ERROR at setup of test_file_level_config_md ________________________________________________________________________
sphinx_params = {'files': ('file_level_config.md',)}, make_app = <function make_app.<locals>.make at 0x7f2418cf9c10>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_file_level_config_md0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
______________________________________________________________________ ERROR at setup of test_file_level_config_ipynb _______________________________________________________________________
sphinx_params = {'files': ('file_level_config.ipynb',)}, make_app = <function make_app.<locals>.make at 0x7f2418cf9dc0>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_file_level_config_ipynb0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
__________________________________________________________________________ ERROR at setup of test_complex_outputs ___________________________________________________________________________
sphinx_params = {'conf': {'nb_execution_mode': 'off'}, 'files': ('complex_outputs.ipynb',)}, make_app = <function make_app.<locals>.make at 0x7f2418fc1ca0>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_complex_outputs1')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
_______________________________________________________________________ ERROR at setup of test_complex_outputs_latex ________________________________________________________________________
sphinx_params = {'buildername': 'latex', 'conf': {'nb_execution_mode': 'off'}, 'files': ('complex_outputs.ipynb',)}, make_app = <function make_app.<locals>.make at 0x7f24134e18b0>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_complex_outputs_latex0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
___________________________________________________________________________ ERROR at setup of test_stderr_remove ____________________________________________________________________________
sphinx_params = {'conf': {'nb_execution_mode': 'off', 'nb_output_stderr': 'remove'}, 'files': ('basic_stderr.ipynb',)}, make_app = <function make_app.<locals>.make at 0x7f24134e1af0>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_stderr_remove0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
_____________________________________________________________________________ ERROR at setup of test_stderr_tag _____________________________________________________________________________
sphinx_params = {'conf': {'nb_execution_mode': 'off'}, 'files': ('basic_stderr.ipynb',)}, make_app = <function make_app.<locals>.make at 0x7f2418cdca60>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_stderr_tag0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
___________________________________________________________________________ ERROR at setup of test_merge_streams ____________________________________________________________________________
sphinx_params = {'conf': {'nb_execution_mode': 'off', 'nb_merge_streams': True}, 'files': ('merge_streams.ipynb',)}, make_app = <function make_app.<locals>.make at 0x7f2418ee9820>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_merge_streams0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
___________________________________________________________________________ ERROR at setup of test_metadata_image ___________________________________________________________________________
sphinx_params = {'conf': {'nb_cell_metadata_key': 'myst', 'nb_execution_mode': 'off'}, 'files': ('metadata_image.ipynb',)}, make_app = <function make_app.<locals>.make at 0x7f24134e1700>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_metadata_image0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
__________________________________________________________________________ ERROR at setup of test_metadata_figure ___________________________________________________________________________
sphinx_params = {'conf': {'nb_cell_metadata_key': 'myst', 'nb_execution_mode': 'off'}, 'files': ('metadata_figure.ipynb',)}, make_app = <function make_app.<locals>.make at 0x7f24134c7940>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_metadata_figure0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
__________________________________________________________________________ ERROR at setup of test_unknown_mimetype __________________________________________________________________________
sphinx_params = {'conf': {'nb_execution_mode': 'off'}, 'files': ('unknown_mimetype.ipynb',)}, make_app = <function make_app.<locals>.make at 0x7f24134c7550>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_unknown_mimetype0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
_________________________________________________________________________ ERROR at setup of test_hide_cell_content __________________________________________________________________________
sphinx_params = {'conf': {'nb_execution_mode': 'off'}, 'files': ('hide_cell_content.ipynb',)}, make_app = <function make_app.<locals>.make at 0x7f2418cf9700>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_hide_cell_content0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
_____________________________________________________________________________ ERROR at setup of test_basic_run ______________________________________________________________________________
sphinx_params = {'conf': {'nb_execution_mode': 'cache', 'source_suffix': {'.md': 'myst-nb'}}, 'files': ('basic_unrun.md',)}, make_app = <function make_app.<locals>.make at 0x7f2418eb61f0>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_basic_run2')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
_________________________________________________________________________ ERROR at setup of test_basic_run_exec_off _________________________________________________________________________
sphinx_params = {'conf': {'nb_execution_mode': 'off', 'source_suffix': {'.md': 'myst-nb'}}, 'files': ('basic_unrun.md',)}, make_app = <function make_app.<locals>.make at 0x7f24134c7dc0>
tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_basic_run_exec_off0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
__________________________________________________________________________ ERROR at setup of test_basic_nometadata __________________________________________________________________________
sphinx_params = {'conf': {'nb_execution_mode': 'off', 'source_suffix': {'.md': 'myst-nb'}}, 'files': ('basic_nometadata.md',)}
make_app = <function make_app.<locals>.make at 0x7f24134e18b0>, tempdir = path('/tmp/pytest-of-tkloczko/pytest-0/test_basic_nometadata0')
@pytest.fixture()
def sphinx_run(sphinx_params, make_app, tempdir):
"""A fixture to setup and run a sphinx build, in a sandboxed folder.
The `myst_nb` extension ius added by default,
and the first file will be set as the materdoc
"""
assert len(sphinx_params["files"]) > 0, sphinx_params["files"]
conf = sphinx_params.get("conf", {})
buildername = sphinx_params.get("buildername", "html")
confoverrides = {
"extensions": ["myst_nb"],
"master_doc": os.path.splitext(sphinx_params["files"][0])[0],
"exclude_patterns": ["_build"],
"nb_execution_show_tb": True,
}
confoverrides.update(conf)
current_dir = os.getcwd()
if "working_dir" in sphinx_params:
from sphinx.testing.path import path
base_dir = path(sphinx_params["working_dir"]) / str(uuid.uuid4())
else:
base_dir = tempdir
srcdir = base_dir / "source"
srcdir.makedirs(exist_ok=True)
os.chdir(base_dir)
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + ll for ll in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
for nb_file in sphinx_params["files"]:
nb_path = TEST_FILE_DIR.joinpath(nb_file)
assert nb_path.exists(), nb_path
(srcdir / nb_file).parent.makedirs(exist_ok=True)
(srcdir / nb_file).write_text(nb_path.read_text(encoding="utf8"))
nocolor()
> app = make_app(buildername=buildername, srcdir=srcdir, confoverrides=confoverrides)
/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.2/tests/conftest.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
/home/tkloczko/rpmbuild/BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
========================================================================================= FAILURES ==========================================================================================
______________________________________________________________________________________ test_quickstart ______________________________________________________________________________________
tmp_path = PosixPath('/tmp/pytest-of-tkloczko/pytest-0/test_quickstart0'), make_app = <function make_app.<locals>.make at 0x7f241a02a9d0>
def test_quickstart(tmp_path: Path, make_app):
"""Test the quickstart CLI builds a valid sphinx project."""
path = tmp_path / "project"
quickstart([str(path)])
assert {p.name for p in path.iterdir()} == {
".gitignore",
"conf.py",
"index.md",
"notebook1.ipynb",
"notebook2.md",
}
> app = make_app(srcdir=sphinx_path(str(path)), buildername="html")
tests/test_cli.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
app_: Any = SphinxTestApp(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
super().__init__(srcdir, confdir, outdir, doctreedir,
/usr/lib/python3.8/site-packages/sphinx/application.py:229: in __init__
self.setup_extension(extension)
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
self.registry.load_extension(self, extname)
/usr/lib/python3.8/site-packages/sphinx/registry.py:455: in load_extension
metadata = setup(app)
../../BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/__init__.py:8: in setup
from .sphinx_ext import sphinx_setup
../../BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_ext.py:23: in <module>
from myst_nb.sphinx_ import (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""The sphinx parser implementation for myst-nb."""
from __future__ import annotations
from collections import defaultdict
from html import escape
import json
from pathlib import Path
import re
from typing import Any, DefaultDict, cast
from docutils import nodes
from markdown_it.token import Token
from markdown_it.tree import SyntaxTreeNode
from myst_parser.config.main import MdParserConfig, merge_file_level
from myst_parser.mdit_to_docutils.base import token_line
> from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
E ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
../../BUILDROOT/python-myst-nb-0.17.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/myst_nb/sphinx_.py:16: ImportError
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
Created myst_nb project at: /tmp/pytest-of-tkloczko/pytest-0/test_quickstart0/project
===================================================================================== warnings summary ======================================================================================
../../../../../usr/lib/python3.8/site-packages/jupyter_client/connect.py:20
/usr/lib/python3.8/site-packages/jupyter_client/connect.py:20: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
given by the platformdirs library. To remove this warning and
see the appropriate new directories, set the environment variable
`JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
The use of platformdirs will be the default in `jupyter_core` v6
from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write
../../../../../usr/lib/python3.8/site-packages/jupyter_cache/cache/db.py:17
/usr/lib/python3.8/site-packages/jupyter_cache/cache/db.py:17: MovedIn20Warning: The ``declarative_base()`` function is now available as sqlalchemy.orm.declarative_base(). (deprecated since: 2.0) (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
OrmBase = declarative_base()
tests/test_cli.py::test_quickstart
tests/test_cli.py::test_quickstart
/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py:26: RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead. Check CHANGES for Sphinx API modifications.
from sphinx.util import progress_message
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================== short test summary info ==================================================================================
ERROR tests/test_codecell_file.py::test_codecell_file - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_codecell_file.py::test_codecell_file_warnings - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_eval.py::test_sphinx - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_glue.py::test_parser - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_parser.py::test_basic_run - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_parser.py::test_complex_outputs - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_parser.py::test_toctree_in_ipynb - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_parser.py::test_ipywidgets - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_render_outputs.py::test_basic_run - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_render_outputs.py::test_file_level_config_md - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_render_outputs.py::test_file_level_config_ipynb - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_render_outputs.py::test_complex_outputs - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_render_outputs.py::test_complex_outputs_latex - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_render_outputs.py::test_stderr_remove - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_render_outputs.py::test_stderr_tag - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_render_outputs.py::test_merge_streams - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_render_outputs.py::test_metadata_image - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_render_outputs.py::test_metadata_figure - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_render_outputs.py::test_unknown_mimetype - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_render_outputs.py::test_hide_cell_content - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_text_based.py::test_basic_run - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_text_based.py::test_basic_run_exec_off - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
ERROR tests/test_text_based.py::test_basic_nometadata - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
FAILED tests/test_cli.py::test_quickstart - ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
==================================================================== 1 failed, 17 passed, 4 warnings, 23 errors in 4.67s ==================================================================== Here is list of installed modules in build env Package Version
----------------------------- -----------------
alabaster 0.7.13
anyio 3.6.2
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
asttokens 2.2.1
attrs 23.1.0
Babel 2.12.1
backcall 0.2.0
beautifulsoup4 4.12.2
bleach 6.0.0
build 0.10.0
cffi 1.15.1
charset-normalizer 3.1.0
click 8.1.3
coconut 2.2.0
colorama 0.4.6
comm 0.1.3
contourpy 1.0.7
cPyparsing 2.4.7.1.2.1
cycler 0.11.0
debugpy 1.6.7
decorator 5.1.1
defusedxml 0.7.1
distro 1.8.0
docutils 0.19
exceptiongroup 1.0.0
executing 1.2.0
fastjsonschema 2.16.3
fonttools 4.39.3
gitdb 4.0.10
GitPython 3.1.30
gpg 1.19.0
greenlet 1.1.3
html5lib 1.1
idna 3.4
imagesize 1.4.1
importlib-metadata 6.6.0
importlib-resources 5.12.0
iniconfig 2.0.0
installer 0.7.0
ipykernel 6.22.0
ipython 8.12.0
ipython-genutils 0.2.0
jedi 0.18.2
Jinja2 3.1.2
jsonschema 4.17.3
jupyter-cache 0.5.0
jupyter_client 8.2.0
jupyter_core 5.3.0
jupyter-events 0.6.3
jupyter_server 2.5.0
jupyter-server-mathjax 0.2.6
jupyter_server_terminals 0.4.4
jupyterlab-pygments 0.1.2
jupytext 1.14.5
kiwisolver 1.4.4
libcomps 0.1.19
markdown-it-py 2.2.0
MarkupSafe 2.1.2
matplotlib 3.6.3
matplotlib-inline 0.1.6
mdit-py-plugins 0.3.5
mdurl 0.1.2
mistune 2.0.5
mpmath 1.3.0
myst-parser 1.0.0
nbclient 0.7.4
nbconvert 7.3.1
nbdime 3.1.1
nbformat 5.8.0
nest-asyncio 1.5.6
numpy 1.24.3
olefile 0.46
packaging 23.1
pandas 2.0.1
pandocfilters 1.5.0
parso 0.8.3
pexpect 4.8.0
pickleshare 0.7.5
Pillow 9.5.0
pkgutil_resolve_name 1.3.10
platformdirs 3.5.0
pluggy 1.0.0
ply 3.11
POAP 0.1.26
prometheus-client 0.16.0
prompt-toolkit 3.0.38
psutil 5.9.2
ptyprocess 0.7.0
pure-eval 0.2.2
py4j 0.10.9.7
pycparser 2.21
Pygments 2.15.1
pyparsing 3.0.9
pyproject_hooks 1.0.0
pyrsistent 0.19.3
pytest 7.3.1
pytest-datadir 1.4.1
pytest_param_files 0.3.4
pytest-regressions 2.4.2
python-dateutil 2.8.2
python-json-logger 2.0.7
pytz 2023.2
PyYAML 6.0
pyzmq 24.0.1
requests 2.28.2
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
Send2Trash 1.8.2
setuptools 67.7.2
six 1.16.0
smmap 5.0.0
sniffio 1.3.0
snowballstemmer 2.2.0
soupsieve 2.4.1
Sphinx 6.2.1
sphinxcontrib-applehelp 1.0.4
sphinxcontrib-devhelp 1.0.2.dev20230415
sphinxcontrib-htmlhelp 2.0.0
sphinxcontrib-jsmath 1.0.1.dev20230415
sphinxcontrib-qthelp 1.0.3.dev20230415
sphinxcontrib-serializinghtml 1.1.5
SQLAlchemy 2.0.12
stack-data 0.6.2
sympy 1.11.1
tabulate 0.9.0
terminado 0.17.1
tinycss2 1.2.1
toml 0.10.2
tomli 2.0.1
tornado 6.2
tqdm 4.65.0
traitlets 5.9.0
typing_extensions 4.5.0
urllib3 1.26.15
wcwidth 0.2.6
webencodings 0.5.1
websocket-client 1.5.1
wheel 0.40.0
zipp 3.15.0 |
Would you consider not using an upper pin if there is no indication that it would break? The current pin seem overly conservative (see the comment from NetworkX for instance.) See #493 |
Am gonna close this one as there's more work being done over in this PR: I don't have strong opinions about upper bounds but would rather focus conversation on getting these PRs merged for now rather than changing policy. I've got maybe like 30 minutes a week to work across these projects so am trying to prioritize getting things merge. |
OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting If you change your mind, just re-open this PR and I'll resolve any conflicts on it. |
Updates the requirements on sphinx to permit the latest version.
Release notes
Sourced from sphinx's releases.
Changelog
Sourced from sphinx's changelog.
... (truncated)
Commits
e7d4c36
Bump to 6.2.0 final4e27a5f
Remove unneeded JavaScript fromsphinx13
themebffb547
Note correct deprecation version forsphinx.util.osutil.cd
59de8d5
Revert "Support and prefer.jinja
to_t
for static templates (#11165)...aee3c0a
Partially revert "Disable localisation when SOURCE_DATE_EPOCH is set (#10949)...186d596
Useoverwrite_file
context manager intest_ext_autodoc_configs
(#11320)77483f2
Add missing test decorator fortest_util_inspect
(#11321)d8f15c7
Increase timeout threshold forlinkcheck
tests (#11326)b430e05
Create a 'search field' component for themes (#11045)e2f66ce
Update CHANGES for PR #11333You can trigger a rebase of this PR by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)