Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.11.3: pytest is failing #814

Closed
kloczek opened this issue Jul 10, 2021 · 12 comments · Fixed by #815
Closed

1.11.3: pytest is failing #814

kloczek opened this issue Jul 10, 2021 · 12 comments · Fixed by #815

Comments

@kloczek
Copy link

kloczek commented Jul 10, 2021

Just normal build, install and test cycle used on building package from non-root account:

  • "setup.py build"
  • "setup.py install --root </install/prefix>"
  • "pytest with PYTHONPATH pointing to setearch and sitelib inside </install/prefix>
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.11.3-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.11.3-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.11, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, pyfakefs-4.5.0, flaky-3.7.0, hypothesis-6.14.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, cases-3.6.3, Faker-8.10.0
collected 2579 items

. .                                                                                                                                                                  [  0%]
tests/test_active_cells.py ............................                                                                                                              [  1%]
tests/test_auto_ext.py .............................................................x.s.......................                                                       [  4%]
tests/test_black.py ...s........                                                                                                                                     [  4%]
tests/test_cell_id.py .                                                                                                                                              [  5%]
tests/test_cell_metadata.py ............................................................                                                                             [  7%]
tests/test_cells.py ...............                                                                                                                                  [  7%]
tests/test_changelog.py ...                                                                                                                                          [  8%]
tests/test_cli.py .................................................................................................................................................. [ 13%]
.................................................................................................................................................................... [ 20%]
F........................................................................................s................                                                           [ 24%]
tests/test_cli_config.py ...........                                                                                                                                 [ 24%]
tests/test_cm_config.py ............                                                                                                                                 [ 25%]
tests/test_combine.py ..................................................                                                                                             [ 27%]
tests/test_compare.py .....................                                                                                                                          [ 27%]
tests/test_config.py .................                                                                                                                               [ 28%]
tests/test_contentsmanager.py ...................................................................................................................................... [ 33%]
.................................................................................................................................................................... [ 40%]
................................................................................................................................F................................... [ 46%]
..ss                                                                                                                                                                 [ 46%]
tests/test_custom_cell_magics.py .                                                                                                                                   [ 46%]
tests/test_doxygen.py ..........                                                                                                                                     [ 46%]
tests/test_escape_magics.py ...............................................................................                                                          [ 50%]
tests/test_execute.py ......s.                                                                                                                                       [ 50%]
tests/test_formats.py .........................                                                                                                                      [ 51%]
tests/test_header.py ..........                                                                                                                                      [ 51%]
tests/test_hide_remove_input_outputs_rmarkdown.py ........                                                                                                           [ 52%]
tests/test_ipynb_to_R.py ....                                                                                                                                        [ 52%]
tests/test_ipynb_to_myst.py .......ss...                                                                                                                             [ 52%]
tests/test_ipynb_to_py.py ....................                                                                                                                       [ 53%]
tests/test_ipynb_to_rmd.py ........................                                                                                                                  [ 54%]
tests/test_isort.py .                                                                                                                                                [ 54%]
tests/test_jupytext_errors.py ..                                                                                                                                     [ 54%]
tests/test_jupytext_nbconvert_round_trip.py .......................                                                                                                  [ 55%]
tests/test_jupytext_read.py ..                                                                                                                                       [ 55%]
tests/test_knitr_spin.py .                                                                                                                                           [ 55%]
tests/test_load_multiple.py ..                                                                                                                                       [ 55%]
tests/test_markdown_in_code_cells.py ....                                                                                                                            [ 55%]
tests/test_metadata_filter.py .................                                                                                                                      [ 56%]
tests/test_metadata_filters_from_config.py .                                                                                                                         [ 56%]
tests/test_mirror.py ............................................................................................................................................... [ 61%]
..................................................................................F................................................................................. [ 68%]
....F...................................................................................................                                                             [ 72%]
tests/test_nbformat_version.py .......                                                                                                                               [ 72%]
tests/test_paired_paths.py ...................                                                                                                                       [ 73%]
tests/test_pep8.py ...................................................................................................................                               [ 77%]
tests/test_pre_commit_0_ipynb_to_py.py E                                                                                                                             [ 77%]
tests/test_pre_commit_1_sync.py E                                                                                                                                    [ 77%]
tests/test_pre_commit_2_sync_nbstripout.py E                                                                                                                         [ 77%]
tests/test_pre_commit_3_sync_black_nbstripout.py E                                                                                                                   [ 77%]
tests/test_pre_commit_4_sync_execute.py s                                                                                                                            [ 78%]
tests/test_pre_commit_5_reformat_markdown.py E                                                                                                                       [ 78%]
tests/test_pre_commit_mode.py ............                                                                                                                           [ 78%]
tests/test_pre_commit_scripts.py ........                                                                                                                            [ 78%]
tests/test_preserve_empty_cells.py .......                                                                                                                           [ 79%]
tests/test_pytest.py ..                                                                                                                                              [ 79%]
tests/test_read_all_py.py ..........................................................................................................                                 [ 83%]
tests/test_read_dotnet_try_markdown.py ...                                                                                                                           [ 83%]
tests/test_read_folding_markers.py .....                                                                                                                             [ 83%]
tests/test_read_incomplete_rmd.py ...                                                                                                                                [ 83%]
tests/test_read_simple_R.py ............                                                                                                                             [ 84%]
tests/test_read_simple_clojure.py .                                                                                                                                  [ 84%]
tests/test_read_simple_csharp.py .......                                                                                                                             [ 84%]
tests/test_read_simple_groovy.py .                                                                                                                                   [ 84%]
tests/test_read_simple_hydrogen.py .......                                                                                                                           [ 84%]
tests/test_read_simple_ipynb.py .                                                                                                                                    [ 84%]
tests/test_read_simple_java.py .                                                                                                                                     [ 84%]
tests/test_read_simple_julia.py .                                                                                                                                    [ 84%]
tests/test_read_simple_markdown.py ....................................                                                                                              [ 86%]
tests/test_read_simple_matlab.py ..                                                                                                                                  [ 86%]
tests/test_read_simple_nomarker.py ..                                                                                                                                [ 86%]
tests/test_read_simple_pandoc.py ....s                                                                                                                               [ 86%]
tests/test_read_simple_percent.py .....................                                                                                                              [ 87%]
tests/test_read_simple_python.py ................................................                                                                                    [ 89%]
tests/test_read_simple_rmd.py .........                                                                                                                              [ 89%]
tests/test_read_simple_rust.py ...                                                                                                                                   [ 89%]
tests/test_read_simple_scheme.py .                                                                                                                                   [ 89%]
tests/test_read_simple_sphinx.py ...                                                                                                                                 [ 89%]
tests/test_read_write_functions.py .....                                                                                                                             [ 90%]
tests/test_rmd_to_ipynb.py ......                                                                                                                                    [ 90%]
tests/test_save_multiple.py .....................................................                                                                                    [ 92%]
tests/test_stringparser.py ....                                                                                                                                      [ 92%]
tests/test_trust_notebook.py ................................................                                                                                        [ 94%]
tests/test_unicode.py ...............................                                                                                                                [ 95%]
tests/test_using_cli.py .                                                                                                                                            [ 95%]
tests/test_write_does_not_modify_notebook.py ..............................................................................................................          [100%]

================================================================================== ERRORS ==================================================================================
____________________________________________________________ ERROR at setup of test_pre_commit_hook_ipynb_to_py ____________________________________________________________

jupytext_repo_root = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3'

    @pytest.fixture
    def jupytext_repo_rev(jupytext_repo_root):
        """The local revision of this repo, to use in .pre-commit-config.yaml in tests"""
>       return system("git", "rev-parse", "HEAD", cwd=jupytext_repo_root).strip()

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/tests/conftest.py:50:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = ('git', 'rev-parse', 'HEAD'), kwargs = {'cwd': '/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3', 'stdout': -1}, proc = <subprocess.Popen object at 0x7fb217414d60>
out = b'', _ = None

    def system(*args, **kwargs):
        """Execute the given bash command"""
        kwargs.setdefault("stdout", subprocess.PIPE)
        proc = subprocess.Popen(args, **kwargs)
        out, _ = proc.communicate()
        if proc.returncode:
>           raise SystemExit(proc.returncode)
E           SystemExit: 128

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/cli.py:50: SystemExit
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
fatal: not a git repository (or any parent up to mount point /home/tkloczko)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
_______________________________________________________________ ERROR at setup of test_pre_commit_hook_sync ________________________________________________________________

jupytext_repo_root = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3'

    @pytest.fixture
    def jupytext_repo_rev(jupytext_repo_root):
        """The local revision of this repo, to use in .pre-commit-config.yaml in tests"""
>       return system("git", "rev-parse", "HEAD", cwd=jupytext_repo_root).strip()

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/tests/conftest.py:50:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = ('git', 'rev-parse', 'HEAD'), kwargs = {'cwd': '/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3', 'stdout': -1}, proc = <subprocess.Popen object at 0x7fb21741c3a0>
out = b'', _ = None

    def system(*args, **kwargs):
        """Execute the given bash command"""
        kwargs.setdefault("stdout", subprocess.PIPE)
        proc = subprocess.Popen(args, **kwargs)
        out, _ = proc.communicate()
        if proc.returncode:
>           raise SystemExit(proc.returncode)
E           SystemExit: 128

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/cli.py:50: SystemExit
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
fatal: not a git repository (or any parent up to mount point /home/tkloczko)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
__________________________________________________________ ERROR at setup of test_pre_commit_hook_sync_nbstripout __________________________________________________________

jupytext_repo_root = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3'

    @pytest.fixture
    def jupytext_repo_rev(jupytext_repo_root):
        """The local revision of this repo, to use in .pre-commit-config.yaml in tests"""
>       return system("git", "rev-parse", "HEAD", cwd=jupytext_repo_root).strip()

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/tests/conftest.py:50:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = ('git', 'rev-parse', 'HEAD'), kwargs = {'cwd': '/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3', 'stdout': -1}, proc = <subprocess.Popen object at 0x7fb217447670>
out = b'', _ = None

    def system(*args, **kwargs):
        """Execute the given bash command"""
        kwargs.setdefault("stdout", subprocess.PIPE)
        proc = subprocess.Popen(args, **kwargs)
        out, _ = proc.communicate()
        if proc.returncode:
>           raise SystemExit(proc.returncode)
E           SystemExit: 128

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/cli.py:50: SystemExit
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
fatal: not a git repository (or any parent up to mount point /home/tkloczko)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
_______________________________________________________ ERROR at setup of test_pre_commit_hook_sync_black_nbstripout _______________________________________________________
@mwouts
Copy link
Owner

mwouts commented Jul 10, 2021

Hi @kloczek , thanks for reporting this. Indeed some of the tests (eg the ones on the pre-commit hook) assume that the jupytext directory is a git folder.

That assumption does not seem to hold in your case.

Could you please tell us a bit more about your use case, and how I can reproduce? Thanks !

@kloczek
Copy link
Author

kloczek commented Jul 12, 2021

Just tested that patch. Still there are some failing units however it some fails gone.

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.11.3-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.11.3-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.11, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, pyfakefs-4.5.0, flaky-3.7.0, hypothesis-6.14.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, cases-3.6.3, Faker-8.10.0
collected 2579 items

. .                                                                                                                                                                  [  0%]
tests/test_active_cells.py ............................                                                                                                              [  1%]
tests/test_auto_ext.py .............................................................x.s.......................                                                       [  4%]
tests/test_black.py ...s........                                                                                                                                     [  4%]
tests/test_cell_id.py .                                                                                                                                              [  5%]
tests/test_cell_metadata.py ............................................................                                                                             [  7%]
tests/test_cells.py ...............                                                                                                                                  [  7%]
tests/test_changelog.py ...                                                                                                                                          [  8%]
tests/test_cli.py .................................................................................................................................................. [ 13%]
.................................................................................................................................................................... [ 20%]
F........................................................................................s................                                                           [ 24%]
tests/test_cli_config.py ...........                                                                                                                                 [ 24%]
tests/test_cm_config.py ............                                                                                                                                 [ 25%]
tests/test_combine.py ..................................................                                                                                             [ 27%]
tests/test_compare.py .....................                                                                                                                          [ 27%]
tests/test_config.py .................                                                                                                                               [ 28%]
tests/test_contentsmanager.py ...................................................................................................................................... [ 33%]
.................................................................................................................................................................... [ 40%]
................................................................................................................................F................................... [ 46%]
..ss                                                                                                                                                                 [ 46%]
tests/test_custom_cell_magics.py .                                                                                                                                   [ 46%]
tests/test_doxygen.py ..........                                                                                                                                     [ 46%]
tests/test_escape_magics.py ...............................................................................                                                          [ 50%]
tests/test_execute.py ......s.                                                                                                                                       [ 50%]
tests/test_formats.py .........................                                                                                                                      [ 51%]
tests/test_header.py ..........                                                                                                                                      [ 51%]
tests/test_hide_remove_input_outputs_rmarkdown.py ........                                                                                                           [ 52%]
tests/test_ipynb_to_R.py ....                                                                                                                                        [ 52%]
tests/test_ipynb_to_myst.py .......ss...                                                                                                                             [ 52%]
tests/test_ipynb_to_py.py ....................                                                                                                                       [ 53%]
tests/test_ipynb_to_rmd.py ........................                                                                                                                  [ 54%]
tests/test_isort.py .                                                                                                                                                [ 54%]
tests/test_jupytext_errors.py ..                                                                                                                                     [ 54%]
tests/test_jupytext_nbconvert_round_trip.py .......................                                                                                                  [ 55%]
tests/test_jupytext_read.py ..                                                                                                                                       [ 55%]
tests/test_knitr_spin.py .                                                                                                                                           [ 55%]
tests/test_load_multiple.py ..                                                                                                                                       [ 55%]
tests/test_markdown_in_code_cells.py ....                                                                                                                            [ 55%]
tests/test_metadata_filter.py .................                                                                                                                      [ 56%]
tests/test_metadata_filters_from_config.py .                                                                                                                         [ 56%]
tests/test_mirror.py ............................................................................................................................................... [ 61%]
..................................................................................F................................................................................. [ 68%]
....F...................................................................................................                                                             [ 72%]
tests/test_nbformat_version.py .......                                                                                                                               [ 72%]
tests/test_paired_paths.py ...................                                                                                                                       [ 73%]
tests/test_pep8.py ...................................................................................................................                               [ 77%]
tests/test_pre_commit_0_ipynb_to_py.py s                                                                                                                             [ 77%]
tests/test_pre_commit_1_sync.py s                                                                                                                                    [ 77%]
tests/test_pre_commit_2_sync_nbstripout.py s                                                                                                                         [ 77%]
tests/test_pre_commit_3_sync_black_nbstripout.py s                                                                                                                   [ 77%]
tests/test_pre_commit_4_sync_execute.py s                                                                                                                            [ 78%]
tests/test_pre_commit_5_reformat_markdown.py s                                                                                                                       [ 78%]
tests/test_pre_commit_mode.py ............                                                                                                                           [ 78%]
tests/test_pre_commit_scripts.py ........                                                                                                                            [ 78%]
tests/test_preserve_empty_cells.py .......                                                                                                                           [ 79%]
tests/test_pytest.py ..                                                                                                                                              [ 79%]
tests/test_read_all_py.py ..........................................................................................................                                 [ 83%]
tests/test_read_dotnet_try_markdown.py ...                                                                                                                           [ 83%]
tests/test_read_folding_markers.py .....                                                                                                                             [ 83%]
tests/test_read_incomplete_rmd.py ...                                                                                                                                [ 83%]
tests/test_read_simple_R.py ............                                                                                                                             [ 84%]
tests/test_read_simple_clojure.py .                                                                                                                                  [ 84%]
tests/test_read_simple_csharp.py .......                                                                                                                             [ 84%]
tests/test_read_simple_groovy.py .                                                                                                                                   [ 84%]
tests/test_read_simple_hydrogen.py .......                                                                                                                           [ 84%]
tests/test_read_simple_ipynb.py .                                                                                                                                    [ 84%]
tests/test_read_simple_java.py .                                                                                                                                     [ 84%]
tests/test_read_simple_julia.py .                                                                                                                                    [ 84%]
tests/test_read_simple_markdown.py ....................................                                                                                              [ 86%]
tests/test_read_simple_matlab.py ..                                                                                                                                  [ 86%]
tests/test_read_simple_nomarker.py ..                                                                                                                                [ 86%]
tests/test_read_simple_pandoc.py ....s                                                                                                                               [ 86%]
tests/test_read_simple_percent.py .....................                                                                                                              [ 87%]
tests/test_read_simple_python.py ................................................                                                                                    [ 89%]
tests/test_read_simple_rmd.py .........                                                                                                                              [ 89%]
tests/test_read_simple_rust.py ...                                                                                                                                   [ 89%]
tests/test_read_simple_scheme.py .                                                                                                                                   [ 89%]
tests/test_read_simple_sphinx.py ...                                                                                                                                 [ 89%]
tests/test_read_write_functions.py .....                                                                                                                             [ 90%]
tests/test_rmd_to_ipynb.py ......                                                                                                                                    [ 90%]
tests/test_save_multiple.py .....................................................                                                                                    [ 92%]
tests/test_stringparser.py ....                                                                                                                                      [ 92%]
tests/test_trust_notebook.py ................................................                                                                                        [ 94%]
tests/test_unicode.py ...............................                                                                                                                [ 95%]
tests/test_using_cli.py .                                                                                                                                            [ 95%]
tests/test_write_does_not_modify_notebook.py ..............................................................................................................          [100%]

================================================================================= FAILURES =================================================================================
_______________________________________________________________________________ test_rst2md ________________________________________________________________________________

tmpdir = local('/tmp/pytest-of-tkloczko/pytest-43/test_rst2md0'), cwd_tmpdir = local('/tmp/pytest-of-tkloczko/pytest-43/test_rst2md0')

    @requires_sphinx_gallery
    def test_rst2md(tmpdir, cwd_tmpdir):
        tmp_py = "notebook.py"
        tmp_ipynb = "notebook.ipynb"

        # Write notebook in sphinx format
        nb = new_notebook(
            cells=[
                new_markdown_cell("A short sphinx notebook"),
                new_markdown_cell(":math:`1+1`"),
            ]
        )
        write(nb, tmp_py, fmt="py:sphinx")

>       jupytext(
            [
                tmp_py,
                "--from",
                "py:sphinx",
                "--to",
                "ipynb",
                "--opt",
                "rst2md=True",
                "--opt",
                "cell_metadata_filter=-all",
            ]
        )

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/tests/test_cli.py:809:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/cli.py:434: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/cli.py:501: in jupytext_single_file
    notebook = read(nb_file, fmt=fmt, config=config)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/jupytext.py:435: in read
    return read(stream, as_version=as_version, fmt=fmt, config=config, **kwargs)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/jupytext.py:444: in read
    return reads(fp.read(), fmt, config=config, **kwargs)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/jupytext.py:396: in reads
    notebook = reader.reads(text, **kwargs)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/jupytext.py:136: in reads
    cell, pos = reader.read(lines)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/cell_reader.py:142: in read
    pos_next_cell = self.find_cell_content(lines)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupytext.cell_reader.SphinxGalleryScriptCellReader object at 0x7fe1f252f640>
lines = ['"""', 'A short sphinx notebook', '"""', '', '###############################################################################', '# :math:`1+1`']

    def find_cell_content(self, lines):
        """Parse cell till its end and set content, lines_to_next_cell.
        Return the position of next cell start"""
        cell_end_marker, next_cell_start, explicit_eoc = self.find_cell_end(lines)

        # Metadata to dict
        cell_start = 0
        if self.cell_type == "markdown":
            if self.markdown_marker in ['"""', "'''"]:
                # Remove the triple quotes
                if lines[0].strip() == self.markdown_marker:
                    cell_start = 1
                else:
                    lines[0] = lines[0][3:]
                if not explicit_eoc:
                    last = lines[cell_end_marker - 1]
                    lines[cell_end_marker - 1] = last[
                        : last.rfind(self.markdown_marker)
                    ]
            if self.twenty_hash.match(self.markdown_marker):
                cell_start = 1
        else:
            self.metadata = {}

        # Cell content
        source = lines[cell_start:cell_end_marker]
        self.org_content = copy(source)

        if self.cell_type == "code" and self.comment_magics:
            uncomment_magic(source, self.language or self.default_language)

        if self.cell_type == "markdown" and source:
            if self.markdown_marker.startswith(self.comment):
                source = uncomment(source, self.comment)
            if self.rst2md:
                if rst2md:
>                   source = rst2md("\n".join(source)).splitlines()
E                   TypeError: rst2md() missing 3 required positional arguments: 'gallery_conf', 'target_dir', and 'heading_levels'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/cell_reader.py:970: TypeError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
[jupytext] Reading notebook.py in format py:sphinx
____________________________________________________________________________ test_rst2md_option ____________________________________________________________________________

self = <jupytext.contentsmanager.build_jupytext_contents_manager_class.<locals>.JupytextContentsManager object at 0x7fe1d9743a30>, path = 'notebook.py', content = True
type = None, format = None, load_alternative_format = True

    def get(
        self,
        path,
        content=True,
        type=None,
        format=None,
        load_alternative_format=True,
    ):
        """Takes a path for an entity and returns its model"""
        path = path.strip("/")
        ext = os.path.splitext(path)[1]

        # Not a notebook?
        if (
            not self.file_exists(path)
            or self.dir_exists(path)
            or (type is not None and type != "notebook")
        ):
            return self.super.get(path, content, type, format)

        config = self.get_config(path, use_cache=content is False)
        if ext not in self.all_nb_extensions(config):
            return self.super.get(path, content, type, format)

        fmt = preferred_format(ext, config.preferred_jupytext_formats_read)
        if ext == ".ipynb":
            model = self.super.get(path, content, type="notebook", format=format)
        else:
            model = self.super.get(path, content, type="file", format=format)
            model["type"] = "notebook"
            if content:
                # We may need to update these keys, inherited from text files formats
                # Cf. https://github.com/mwouts/jupytext/issues/659
                model["format"] = "json"
                model["mimetype"] = None
                try:
>                   model["content"] = jupytext.reads(
                        model["content"], fmt=fmt, config=config
                    )

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/contentsmanager.py:215:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

text = '# ---\n# jupyter:\n#   jupytext:\n#     text_representation:\n#       extension: .py\n#       format_name: sphinx\n# ...hinx notebook\n"""\n\n###############################################################################\n# :math:`1+1`\n'
fmt = {'extension': '.py', 'format_name': 'sphinx'}, as_version = nbformat.NO_CONVERT
config = <jupytext.contentsmanager.build_jupytext_contents_manager_class.<locals>.JupytextContentsManager object at 0x7fe1d9743a30>, kwargs = {}, ext = '.py'
format_name = 'sphinx', format_options = {}, reader = <jupytext.jupytext.TextNotebookConverter object at 0x7fe1d9743eb0>

    def reads(text, fmt=None, as_version=nbformat.NO_CONVERT, config=None, **kwargs):
        """
        Read a notebook from a string

        :param text: the text representation of the notebook
        :param fmt: (optional) the jupytext format like `md`, `py:percent`, ...
        :param as_version: see nbformat.reads
        :param config: (optional) a Jupytext configuration object
        :param kwargs: (not used) additional parameters for nbformat.reads
        :return: the notebook
        """
        fmt = copy(fmt) if fmt else divine_format(text)
        fmt = long_form_one_format(fmt)
        ext = fmt["extension"]

        if ext == ".ipynb":
            nb = nbformat.reads(text, as_version, **kwargs)
            (version, version_minor) = nbformat.reader.get_version(nb)
            if version != 4:
                warnings.warn(
                    f"Notebooks in nbformat version {version}.{version_minor} are not supported by Jupytext. "
                    f"Please consider converting them to nbformat version 4.x with "
                    f"'jupyter nbconvert --to notebook --inplace'"
                )
            return nb

        format_name = read_format_from_metadata(text, ext) or fmt.get("format_name")

        if format_name:
            format_options = {}
        else:
            format_name, format_options = guess_format(text, ext)

        if format_name:
            fmt["format_name"] = format_name

        fmt.update(format_options)
        reader = TextNotebookConverter(fmt, config)
>       notebook = reader.reads(text, **kwargs)

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/jupytext.py:396:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupytext.jupytext.TextNotebookConverter object at 0x7fe1d9743eb0>
s = '# ---\n# jupyter:\n#   jupytext:\n#     text_representation:\n#       extension: .py\n#       format_name: sphinx\n# ...hinx notebook\n"""\n\n###############################################################################\n# :math:`1+1`\n'
_ = {}, lines = ['"""', 'A short sphinx notebook', '"""', '', '###############################################################################', '# :math:`1+1`']
cells = [{'id': 'cell-7026', 'cell_type': 'code', 'metadata': {}, 'execution_count': None, 'source': '%matplotlib inline', 'outputs': []}]
metadata = {'jupytext': {'rst2md': False, 'text_representation': {'extension': '.py', 'format_name': 'sphinx', 'format_version': '1.1', 'jupytext_version': '1.11.3'}}}
jupyter_md = ['jupyter:', '  jupytext:', '    text_representation:', '      extension: .py', '      format_name: sphinx', "      format_version: '1.1'", ...]
header_cell = None, pos = 10, default_language = 'python'

    def reads(self, s, **_):
        """Read a notebook represented as text"""
        if self.fmt.get("format_name") == "pandoc":
            return md_to_notebook(s)

        if self.fmt.get("format_name") == MYST_FORMAT_NAME:
            return myst_to_notebook(s)

        lines = s.splitlines()

        cells = []
        metadata, jupyter_md, header_cell, pos = header_to_metadata_and_cell(
            lines,
            self.implementation.header_prefix,
            self.implementation.extension,
            self.fmt.get(
                "root_level_metadata_as_raw_cell",
                self.config.root_level_metadata_as_raw_cell
                if self.config is not None
                else True,
            ),
        )
        default_language = default_language_from_metadata_and_ext(
            metadata, self.implementation.extension
        )
        self.update_fmt_with_notebook_options(metadata, read=True)

        if header_cell:
            cells.append(header_cell)

        lines = lines[pos:]

        if (
            self.implementation.format_name
            and self.implementation.format_name.startswith("sphinx")
        ):
            cells.append(new_code_cell(source="%matplotlib inline"))

        cell_metadata_json = False

        while lines:
            reader = self.implementation.cell_reader_class(self.fmt, default_language)
>           cell, pos = reader.read(lines)

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/jupytext.py:136:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupytext.cell_reader.SphinxGalleryScriptCellReader object at 0x7fe1d97186d0>
lines = ['"""', 'A short sphinx notebook', '"""', '', '###############################################################################', '# :math:`1+1`']

    def read(self, lines):
        """Read one cell from the given lines, and return the cell,
        plus the position of the next cell
        """

        # Do we have an explicit code marker on the first line?
        self.metadata_and_language_from_option_line(lines[0])

        if self.metadata and "language" in self.metadata:
            self.language = self.metadata.pop("language")

        # Parse cell till its end and set content, lines_to_next_cell
>       pos_next_cell = self.find_cell_content(lines)

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/cell_reader.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupytext.cell_reader.SphinxGalleryScriptCellReader object at 0x7fe1d97186d0>
lines = ['"""', 'A short sphinx notebook', '"""', '', '###############################################################################', '# :math:`1+1`']

    def find_cell_content(self, lines):
        """Parse cell till its end and set content, lines_to_next_cell.
        Return the position of next cell start"""
        cell_end_marker, next_cell_start, explicit_eoc = self.find_cell_end(lines)

        # Metadata to dict
        cell_start = 0
        if self.cell_type == "markdown":
            if self.markdown_marker in ['"""', "'''"]:
                # Remove the triple quotes
                if lines[0].strip() == self.markdown_marker:
                    cell_start = 1
                else:
                    lines[0] = lines[0][3:]
                if not explicit_eoc:
                    last = lines[cell_end_marker - 1]
                    lines[cell_end_marker - 1] = last[
                        : last.rfind(self.markdown_marker)
                    ]
            if self.twenty_hash.match(self.markdown_marker):
                cell_start = 1
        else:
            self.metadata = {}

        # Cell content
        source = lines[cell_start:cell_end_marker]
        self.org_content = copy(source)

        if self.cell_type == "code" and self.comment_magics:
            uncomment_magic(source, self.language or self.default_language)

        if self.cell_type == "markdown" and source:
            if self.markdown_marker.startswith(self.comment):
                source = uncomment(source, self.comment)
            if self.rst2md:
                if rst2md:
>                   source = rst2md("\n".join(source)).splitlines()
E                   TypeError: rst2md() missing 3 required positional arguments: 'gallery_conf', 'target_dir', and 'heading_levels'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/cell_reader.py:970: TypeError

During handling of the above exception, another exception occurred:

tmpdir = local('/tmp/pytest-of-tkloczko/pytest-43/test_rst2md_option0')

    @requires_sphinx_gallery
    def test_rst2md_option(tmpdir):
        tmp_py = str(tmpdir.join("notebook.py"))

        # Write notebook in sphinx format
        nb = new_notebook(
            cells=[
                new_markdown_cell("A short sphinx notebook"),
                new_markdown_cell(":math:`1+1`"),
            ]
        )
        write(nb, tmp_py, fmt="py:sphinx")

        cm = jupytext.TextFileContentsManager()
        cm.sphinx_convert_rst2md = True
        cm.root_dir = str(tmpdir)

>       nb2 = cm.get("notebook.py")["content"]

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/tests/test_contentsmanager.py:1205:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupytext.contentsmanager.build_jupytext_contents_manager_class.<locals>.JupytextContentsManager object at 0x7fe1d9743a30>, path = 'notebook.py', content = True
type = None, format = None, load_alternative_format = True

    def get(
        self,
        path,
        content=True,
        type=None,
        format=None,
        load_alternative_format=True,
    ):
        """Takes a path for an entity and returns its model"""
        path = path.strip("/")
        ext = os.path.splitext(path)[1]

        # Not a notebook?
        if (
            not self.file_exists(path)
            or self.dir_exists(path)
            or (type is not None and type != "notebook")
        ):
            return self.super.get(path, content, type, format)

        config = self.get_config(path, use_cache=content is False)
        if ext not in self.all_nb_extensions(config):
            return self.super.get(path, content, type, format)

        fmt = preferred_format(ext, config.preferred_jupytext_formats_read)
        if ext == ".ipynb":
            model = self.super.get(path, content, type="notebook", format=format)
        else:
            model = self.super.get(path, content, type="file", format=format)
            model["type"] = "notebook"
            if content:
                # We may need to update these keys, inherited from text files formats
                # Cf. https://github.com/mwouts/jupytext/issues/659
                model["format"] = "json"
                model["mimetype"] = None
                try:
                    model["content"] = jupytext.reads(
                        model["content"], fmt=fmt, config=config
                    )
                except Exception as err:
                    self.log.error(
                        u"Error while reading file: %s %s", path, err, exc_info=True
                    )
>                   raise HTTPError(500, str(err))
E                   tornado.web.HTTPError: HTTP 500: Internal Server Error (rst2md() missing 3 required positional arguments: 'gallery_conf', 'target_dir', and 'heading_levels')

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/contentsmanager.py:222: HTTPError
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
ERROR    traitlets:contentsmanager.py:219 Error while reading file: notebook.py rst2md() missing 3 required positional arguments: 'gallery_conf', 'target_dir', and 'heading_levels'
Traceback (most recent call last):
  File "/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/contentsmanager.py", line 215, in get
    model["content"] = jupytext.reads(
  File "/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/jupytext.py", line 396, in reads
    notebook = reader.reads(text, **kwargs)
  File "/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/jupytext.py", line 136, in reads
    cell, pos = reader.read(lines)
  File "/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/cell_reader.py", line 142, in read
    pos_next_cell = self.find_cell_content(lines)
  File "/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/cell_reader.py", line 970, in find_cell_content
    source = rst2md("\n".join(source)).splitlines()
TypeError: rst2md() missing 3 required positional arguments: 'gallery_conf', 'target_dir', and 'heading_levels'
__________________ test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/tests/notebooks/ipynb_julia/julia_benchmark_plotly_barchart.ipynb] ___________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/tests/notebooks/ipynb_julia/julia_benchmark_plotly_barchart.ipynb', no_jupytext_version_number = None

    @requires_pandoc
    @pytest.mark.parametrize(
        "nb_file",
        list_notebooks("ipynb", skip="(functional|Notebook with|flavors|invalid|305)"),
    )
    def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(nb_file, "md:pandoc", "ipynb_to_pandoc")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/tests/test_mirror.py:137:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/tests/test_mirror.py:79: in assert_conversion_same_as_mirror
    compare(actual, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

actual = '---\njupyter:\n  kernelspec:\n    display_name: Julia 1.1.1\n    language: julia\n    name: \'julia-1.1\'\n  nbformat...\n            response["url"],\n            "/700/700\' width=\'750\'></iframe>")\ndisplay("text/html", s)\n```\n:::\n'
expected = '---\njupyter:\n  kernelspec:\n    display_name: Julia 1.1.1\n    language: julia\n    name: julia-1.1\n  nbformat: 4\...\n            response["url"],\n            "/700/700\' width=\'750\'></iframe>")\ndisplay("text/html", s)\n```\n:::\n'
actual_name = 'actual', expected_name = 'expected', return_diff = False

    def compare(
        actual, expected, actual_name="actual", expected_name="expected", return_diff=False
    ):
        """Compare two strings, lists or dict-like objects"""
        if actual != expected:
            diff = difflib.unified_diff(
                _multilines(expected),
                _multilines(actual),
                expected_name,
                actual_name,
                lineterm="",
            )
            if expected_name == "" and actual_name == "":
                diff = list(diff)[2:]
            diff = "\n".join(diff)
            if return_diff:
                return diff
>           raise AssertionError("\n" + diff)
E           AssertionError:
E           --- expected
E           +++ actual
E           @@ -3,7 +3,7 @@
E              kernelspec:
E                display_name: Julia 1.1.1
E                language: julia
E           -    name: julia-1.1
E           +    name: 'julia-1.1'
E              nbformat: 4
E              nbformat_minor: 1
E            ---

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/compare.py:47: AssertionError
______________________________ test_sphinx_md_to_ipynb[/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/tests/notebooks/sphinx/plot_notebook.py] ______________________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/tests/notebooks/sphinx/plot_notebook.py', no_jupytext_version_number = None

    @requires_sphinx_gallery
    @pytest.mark.parametrize("nb_file", list_notebooks("sphinx"))
    def test_sphinx_md_to_ipynb(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(
            nb_file,
            {"extension": ".ipynb", "format_name": "sphinx", "rst2md": True},
            "sphinx-rst2md_to_ipynb",
            compare_notebook=True,
        )

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/tests/test_mirror.py:211:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/tests/test_mirror.py:45: in assert_conversion_same_as_mirror
    notebook = jupytext.read(nb_file, fmt=fmt)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/jupytext.py:435: in read
    return read(stream, as_version=as_version, fmt=fmt, config=config, **kwargs)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/jupytext.py:444: in read
    return reads(fp.read(), fmt, config=config, **kwargs)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/jupytext.py:396: in reads
    notebook = reader.reads(text, **kwargs)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/jupytext.py:136: in reads
    cell, pos = reader.read(lines)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/cell_reader.py:142: in read
    pos_next_cell = self.find_cell_content(lines)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupytext.cell_reader.SphinxGalleryScriptCellReader object at 0x7fe1c0c1ff70>
lines = ['"""', 'Notebook styled examples', '========================', '', 'The gallery is capable of transforming Python files into reStructuredText files', 'with a notebook structure. For this to be used you need to respect some syntax', ...]

    def find_cell_content(self, lines):
        """Parse cell till its end and set content, lines_to_next_cell.
        Return the position of next cell start"""
        cell_end_marker, next_cell_start, explicit_eoc = self.find_cell_end(lines)

        # Metadata to dict
        cell_start = 0
        if self.cell_type == "markdown":
            if self.markdown_marker in ['"""', "'''"]:
                # Remove the triple quotes
                if lines[0].strip() == self.markdown_marker:
                    cell_start = 1
                else:
                    lines[0] = lines[0][3:]
                if not explicit_eoc:
                    last = lines[cell_end_marker - 1]
                    lines[cell_end_marker - 1] = last[
                        : last.rfind(self.markdown_marker)
                    ]
            if self.twenty_hash.match(self.markdown_marker):
                cell_start = 1
        else:
            self.metadata = {}

        # Cell content
        source = lines[cell_start:cell_end_marker]
        self.org_content = copy(source)

        if self.cell_type == "code" and self.comment_magics:
            uncomment_magic(source, self.language or self.default_language)

        if self.cell_type == "markdown" and source:
            if self.markdown_marker.startswith(self.comment):
                source = uncomment(source, self.comment)
            if self.rst2md:
                if rst2md:
>                   source = rst2md("\n".join(source)).splitlines()
E                   TypeError: rst2md() missing 3 required positional arguments: 'gallery_conf', 'target_dir', and 'heading_levels'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/cell_reader.py:970: TypeError
============================================================================= warnings summary =============================================================================
tests/test_cli.py::test_utf8_out_331
  /usr/lib/python3.8/site-packages/nbconvert/exporters/html.py:110: DeprecationWarning: 'contextfilter' is renamed to 'pass_context', the old name will be removed in Jinja 3.1.
    def markdown2html(self, context, source):

tests/test_cli.py::test_cli_expect_errors
  /home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/cli.py:332: DeprecationWarning: The --pre-commit argument is deprecated. Please consider switching to the pre-commit.com framework (let us know at https://github.com/mwouts/jupytext/issues if that is an issue for you)
    warnings.warn(

tests/test_cli.py::test_format_prefix_suffix
  [warning] You have passed a file name to the '--to' option, when a format description was expected. Maybe you want to use the '-o' option instead?

tests/test_cm_config.py::test_incorrect_config_message[jupytext.toml-not_a_jupytext_option = true]
tests/test_cm_config.py::test_incorrect_config_message[jupytext.toml-not_a_jupytext_option = true]
tests/test_cm_config.py::test_incorrect_config_message[.jupytext.py-c.not_a_jupytext_option = True]
tests/test_cm_config.py::test_incorrect_config_message[.jupytext.py-c.not_a_jupytext_option = True]
  [warning] Passing unrecognized arguments to super(JupytextConfiguration).__init__(not_a_jupytext_option=True).
  object.__init__() takes exactly one argument (the instance to initialize)
  This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.

tests/test_contentsmanager.py: 48 warnings
  [warning] GObject.GError is deprecated; use GLib.GError instead

tests/test_pre_commit_scripts.py::test_manual_call_of_pre_commit_hook
  [warning] The --pre-commit argument is deprecated. Please consider switching to the pre-commit.com framework (let us know at https://github.com/mwouts/jupytext/issues if that is an issue for you)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_auto_ext.py:36: No file_extension in language_info
SKIPPED [1] tests/test_black.py:67: autopep8 not found
SKIPPED [1] tests/test_cli.py:1188: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [2] tests/test_contentsmanager.py:1765: jupyterfs is not available
SKIPPED [1] tests/test_execute.py:150: irkernel is not installed
SKIPPED [1] tests/test_ipynb_to_myst.py:162: myst is available
SKIPPED [1] tests/test_ipynb_to_myst.py:171: myst is available
SKIPPED [1] tests/test_pre_commit_0_ipynb_to_py.py:16: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_1_sync.py:17: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_2_sync_nbstripout.py:14: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_3_sync_black_nbstripout.py:13: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_4_sync_execute.py:15: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_5_reformat_markdown.py:15: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_read_simple_pandoc.py:82: Pandoc is installed
XFAIL tests/test_auto_ext.py::test_auto_from_kernelspecs_works[/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/tests/notebooks/ipynb_sage/sage_print_hello.ipynb]
  reason: Sage notebooks have Python in their language_info metadata, see #727
FAILED tests/test_cli.py::test_rst2md - TypeError: rst2md() missing 3 required positional arguments: 'gallery_conf', 'target_dir', and 'heading_levels'
FAILED tests/test_contentsmanager.py::test_rst2md_option - tornado.web.HTTPError: HTTP 500: Internal Server Error (rst2md() missing 3 required positional arguments: 'gal...
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/tests/notebooks/ipynb_julia/julia_benchmark_plotly_barchart.ipynb] - Asse...
FAILED tests/test_mirror.py::test_sphinx_md_to_ipynb[/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/tests/notebooks/sphinx/plot_notebook.py] - TypeError: rst2md() missing...
============================================== 4 failed, 2557 passed, 15 skipped, 1 xfailed, 56 warnings in 201.38s (0:03:21) ==============================================

@mwouts
Copy link
Owner

mwouts commented Jul 12, 2021

That's right, thanks for the feedback.

I think that the rst2md errors should be fixed by the PR above.

Finally, for the last one, test_ipynb_to_pandoc, I guess you have an not-so recent version of pandoc, so I'll proceed similarly and put a minimum requirement on the version of pandoc for that test.

@mwouts
Copy link
Owner

mwouts commented Jul 12, 2021

Hi @kloczek , I expect to have fixed the last 4 errors, would you mind giving a try to the latest dev version? Thanks

@kloczek
Copy link
Author

kloczek commented Jul 12, 2021

Firs I must upgrade pandoc.
Will back with results as soon as will have upgraded my pandoc package to latest version.

@mwouts
Copy link
Owner

mwouts commented Jul 13, 2021

Thanks! Well in fact you won't need to upgrade pandoc - thanks to the latest commits, the corresponding tests will be skipped if the test set detects that you don't have pandoc >= 2.11

@kloczek
Copy link
Author

kloczek commented Jul 13, 2021

Just tested 1.11.3 + all patches committed to the master and looks like in that case none of the test units are failing. There are some warnings but that is all.

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.11.3-2.1.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.11.3-2.1.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.11, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, pyfakefs-4.5.0, flaky-3.7.0, hypothesis-6.14.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, cases-3.6.3, Faker-8.10.0
collected 2584 items

. .                                                                                                                                                                  [  0%]
tests/test_active_cells.py ............................                                                                                                              [  1%]
tests/test_auto_ext.py .............................................................x.s.......................                                                       [  4%]
tests/test_black.py ...s........                                                                                                                                     [  4%]
tests/test_cell_id.py .                                                                                                                                              [  4%]
tests/test_cell_metadata.py ............................................................                                                                             [  7%]
tests/test_cells.py ...............                                                                                                                                  [  7%]
tests/test_changelog.py ...                                                                                                                                          [  8%]
tests/test_cli.py .................................................................................................................................................. [ 13%]
........................................................sssssssssssssss............................................................................................. [ 20%]
s........................................................................ssssssss...s....s................                                                           [ 24%]
tests/test_cli_config.py ...........                                                                                                                                 [ 24%]
tests/test_cm_config.py ............                                                                                                                                 [ 25%]
tests/test_combine.py ..................................................                                                                                             [ 26%]
tests/test_compare.py .....................                                                                                                                          [ 27%]
tests/test_config.py .................                                                                                                                               [ 28%]
tests/test_contentsmanager.py ...................................................sssssssssssssssss.................................................................. [ 33%]
.................................................................................................................................................................... [ 39%]
................................................................................................................................s................................... [ 46%]
..ss                                                                                                                                                                 [ 46%]
tests/test_custom_cell_magics.py .                                                                                                                                   [ 46%]
tests/test_doxygen.py ..........                                                                                                                                     [ 46%]
tests/test_escape_magics.py ................................................................................                                                         [ 50%]
tests/test_execute.py ......s.                                                                                                                                       [ 50%]
tests/test_formats.py ......................s..                                                                                                                      [ 51%]
tests/test_header.py ..........                                                                                                                                      [ 51%]
tests/test_hide_remove_input_outputs_rmarkdown.py ........                                                                                                           [ 51%]
tests/test_ipynb_to_R.py ....                                                                                                                                        [ 52%]
tests/test_ipynb_to_myst.py .......ss...                                                                                                                             [ 52%]
tests/test_ipynb_to_py.py ....................                                                                                                                       [ 53%]
tests/test_ipynb_to_rmd.py ........................                                                                                                                  [ 54%]
tests/test_isort.py .                                                                                                                                                [ 54%]
tests/test_jupytext_errors.py ..                                                                                                                                     [ 54%]
tests/test_jupytext_nbconvert_round_trip.py .......................                                                                                                  [ 55%]
tests/test_jupytext_read.py ..                                                                                                                                       [ 55%]
tests/test_knitr_spin.py .                                                                                                                                           [ 55%]
tests/test_load_multiple.py ..                                                                                                                                       [ 55%]
tests/test_markdown_in_code_cells.py ....                                                                                                                            [ 55%]
tests/test_metadata_filter.py .................                                                                                                                      [ 56%]
tests/test_metadata_filters_from_config.py .                                                                                                                         [ 56%]
tests/test_mirror.py ............................................................................................................................................... [ 61%]
..................................................................................sssssssssssssssss..........................................sssssssssss............ [ 68%]
...ss...................................................................................................                                                             [ 72%]
tests/test_nbformat_version.py .......                                                                                                                               [ 72%]
tests/test_paired_paths.py ......................                                                                                                                    [ 73%]
tests/test_pep8.py ...................................................................................................................                               [ 77%]
tests/test_pre_commit_0_ipynb_to_py.py s                                                                                                                             [ 77%]
tests/test_pre_commit_1_sync.py s                                                                                                                                    [ 77%]
tests/test_pre_commit_2_sync_nbstripout.py s                                                                                                                         [ 77%]
tests/test_pre_commit_3_sync_black_nbstripout.py s                                                                                                                   [ 78%]
tests/test_pre_commit_4_sync_execute.py s                                                                                                                            [ 78%]
tests/test_pre_commit_5_reformat_markdown.py s                                                                                                                       [ 78%]
tests/test_pre_commit_mode.py ............                                                                                                                           [ 78%]
tests/test_pre_commit_scripts.py .......s                                                                                                                            [ 78%]
tests/test_preserve_empty_cells.py .......                                                                                                                           [ 79%]
tests/test_pytest.py ..                                                                                                                                              [ 79%]
tests/test_read_all_py.py ..........................................................................................................                                 [ 83%]
tests/test_read_dotnet_try_markdown.py ...                                                                                                                           [ 83%]
tests/test_read_folding_markers.py .....                                                                                                                             [ 83%]
tests/test_read_incomplete_rmd.py ...                                                                                                                                [ 83%]
tests/test_read_simple_R.py ............                                                                                                                             [ 84%]
tests/test_read_simple_clojure.py .                                                                                                                                  [ 84%]
tests/test_read_simple_csharp.py .......                                                                                                                             [ 84%]
tests/test_read_simple_groovy.py .                                                                                                                                   [ 84%]
tests/test_read_simple_hydrogen.py .......                                                                                                                           [ 84%]
tests/test_read_simple_ipynb.py .                                                                                                                                    [ 84%]
tests/test_read_simple_java.py .                                                                                                                                     [ 84%]
tests/test_read_simple_julia.py .                                                                                                                                    [ 84%]
tests/test_read_simple_markdown.py ....................................                                                                                              [ 86%]
tests/test_read_simple_matlab.py ..                                                                                                                                  [ 86%]
tests/test_read_simple_nomarker.py ..                                                                                                                                [ 86%]
tests/test_read_simple_pandoc.py sssss                                                                                                                               [ 86%]
tests/test_read_simple_percent.py ......................                                                                                                             [ 87%]
tests/test_read_simple_python.py ................................................                                                                                    [ 89%]
tests/test_read_simple_rmd.py .........                                                                                                                              [ 89%]
tests/test_read_simple_rust.py ...                                                                                                                                   [ 89%]
tests/test_read_simple_scheme.py .                                                                                                                                   [ 89%]
tests/test_read_simple_sphinx.py ...                                                                                                                                 [ 90%]
tests/test_read_write_functions.py .....                                                                                                                             [ 90%]
tests/test_rmd_to_ipynb.py ......                                                                                                                                    [ 90%]
tests/test_save_multiple.py .....................................................                                                                                    [ 92%]
tests/test_stringparser.py ....                                                                                                                                      [ 92%]
tests/test_trust_notebook.py ................................................                                                                                        [ 94%]
tests/test_unicode.py ...............................                                                                                                                [ 95%]
tests/test_using_cli.py .                                                                                                                                            [ 95%]
tests/test_write_does_not_modify_notebook.py ..............................................................................................................          [100%]

============================================================================= warnings summary =============================================================================
jupytext/cell_reader.py:20
  /home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/cell_reader.py:20: UserWarning: Sphinx Gallery in version 0.8.2 is not supported by Jupytext. Please use sphinx-gallery<=0.7.0 instead. If that is an issue, feel free to report it at https://github.com/mwouts/jupytext/issues, or even better, prepare a PR to handle the new signature of sphinx_gallery.notebook.rst2md.
    warnings.warn(

tests/test_cli.py::test_utf8_out_331
  /usr/lib/python3.8/site-packages/nbconvert/exporters/html.py:110: DeprecationWarning: 'contextfilter' is renamed to 'pass_context', the old name will be removed in Jinja 3.1.
    def markdown2html(self, context, source):

tests/test_cli.py::test_cli_expect_errors
  /home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/cli.py:332: DeprecationWarning: The --pre-commit argument is deprecated. Please consider switching to the pre-commit.com framework (let us know at https://github.com/mwouts/jupytext/issues if that is an issue for you)
    warnings.warn(

tests/test_cli.py::test_format_prefix_suffix
  [warning] You have passed a file name to the '--to' option, when a format description was expected. Maybe you want to use the '-o' option instead?

tests/test_cm_config.py::test_incorrect_config_message[jupytext.toml-not_a_jupytext_option = true]
tests/test_cm_config.py::test_incorrect_config_message[jupytext.toml-not_a_jupytext_option = true]
tests/test_cm_config.py::test_incorrect_config_message[.jupytext.py-c.not_a_jupytext_option = True]
tests/test_cm_config.py::test_incorrect_config_message[.jupytext.py-c.not_a_jupytext_option = True]
  [warning] Passing unrecognized arguments to super(JupytextConfiguration).__init__(not_a_jupytext_option=True).
  object.__init__() takes exactly one argument (the instance to initialize)
  This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.

tests/test_contentsmanager.py: 48 warnings
  [warning] GObject.GError is deprecated; use GLib.GError instead

tests/test_pre_commit_scripts.py::test_manual_call_of_pre_commit_hook
  [warning] The --pre-commit argument is deprecated. Please consider switching to the pre-commit.com framework (let us know at https://github.com/mwouts/jupytext/issues if that is an issue for you)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_auto_ext.py:36: No file_extension in language_info
SKIPPED [1] tests/test_black.py:67: autopep8 not found
SKIPPED [15] tests/test_cli.py:557: pandoc>=2.11 is not available
SKIPPED [1] tests/test_cli.py:795: sphinx_gallery is not available
SKIPPED [3] tests/test_cli.py:991: pandoc>=2.11 is not available
SKIPPED [5] tests/test_cli.py:1005: pandoc>=2.11 is not available
SKIPPED [1] tests/test_cli.py:1075: pandoc>=2.11 is not available
SKIPPED [1] tests/test_cli.py:1188: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [17] tests/test_contentsmanager.py:180: pandoc>=2.11 is not available
SKIPPED [1] tests/test_contentsmanager.py:1188: sphinx_gallery is not available
SKIPPED [2] tests/test_contentsmanager.py:1765: jupyterfs is not available
SKIPPED [1] tests/test_execute.py:150: irkernel is not installed
SKIPPED [1] tests/test_formats.py:324: pandoc>=2.11 is not available
SKIPPED [1] tests/test_ipynb_to_myst.py:162: myst is available
SKIPPED [1] tests/test_ipynb_to_myst.py:171: myst is available
SKIPPED [17] tests/test_mirror.py:131: pandoc>=2.11 is not available
SKIPPED [11] tests/test_mirror.py:151: sphinx_gallery is not available
SKIPPED [1] tests/test_mirror.py:202: sphinx_gallery is not available
SKIPPED [1] tests/test_mirror.py:208: sphinx_gallery is not available
SKIPPED [1] tests/test_pre_commit_0_ipynb_to_py.py:16: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_1_sync.py:17: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_2_sync_nbstripout.py:14: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_3_sync_black_nbstripout.py:13: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_4_sync_execute.py:15: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_5_reformat_markdown.py:15: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_scripts.py:335: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:13: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:35: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:50: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:64: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:82: Pandoc is installed
XFAIL tests/test_auto_ext.py::test_auto_from_kernelspecs_works[/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/tests/notebooks/ipynb_sage/sage_print_hello.ipynb]
  reason: Sage notebooks have Python in their language_info metadata, see #727
=================================================== 2487 passed, 94 skipped, 1 xfailed, 57 warnings in 176.64s (0:02:56) ===================================================

So I think that you can close that ticket.

It is yet another small detail which bothers me.
As I'm packaging python modules during build procedure is used python modules dependencies generator.
That generator is based on fedora one (with few my changes).
Using that generator I found that jupytext after packaging has some unresolved dependencies.
All because markdown-it-py plugins module.
To fix that I've added below patch

--- a/setup.py~ 2021-06-10 06:07:36.000000000 +0100
+++ b/setup.py  2021-07-12 03:49:32.001643552 +0100
@@ -36,7 +36,7 @@
         "nbformat",
         "pyyaml",
         "toml",
-        "markdown-it-py[plugins]~=1.0",
+        "mdit-py-plugins",
     ],
     python_requires="~=3.6",
     extras_require={
--- a/requirements.txt~ 2021-06-10 06:07:36.000000000 +0100
+++ b/requirements.txt  2021-07-12 03:48:37.806538754 +0100
@@ -1,4 +1,4 @@
 nbformat
 pyyaml
 toml
-markdown-it-py[plugins]~=1.0
+mdit-py-plugins

pip is able to resolve dependencies with square brackets however all packaging software does not allow use square brackets in dependencies.

@kloczek
Copy link
Author

kloczek commented Jul 13, 2021

That patch it is only quick hack to prove that rpm dependencies are OK.
Of course it should be without dropping version regexp.

@mwouts
Copy link
Owner

mwouts commented Jul 14, 2021

Interesting... I have prepared a PR above, you will let me know if that solves the last point.

Regarding the warnings, some warnings are issued on purpose during the tests to make sure the warnings do exists... I'm sure there is a way to catch expected warnings, but unless you tell me that is a problem I might not investigate further.

@kloczek
Copy link
Author

kloczek commented Jul 14, 2021

Just tested that:

[tkloczko@barrel SPECS]$ rpmbuild -ba --with check python-jupytext.spec
warning: Downloading https://github.com/mwouts/jupytext//archive/v1.11.3/python-jupytext-1.11.3.tar.gz to /home/tkloczko/rpmbuild/SOURCES/python-jupytext-1.11.3.tar.gz
warning: Downloading https://github.com/mwouts/jupytext//commit/c3fb4fa6.patch#/python-jupytext-Update-contributing.md-link-804.patch to /home/tkloczko/rpmbuild/SOURCES/python-jupytext-Update-contributing.md-link-804.patch
warning: Downloading https://github.com/mwouts/jupytext//commit/b508b1c4.patch#/python-jupytext-Use-local-links-link-to-developing.md.patch to /home/tkloczko/rpmbuild/SOURCES/python-jupytext-Use-local-links-link-to-developing.md.patch
warning: Downloading https://github.com/mwouts/jupytext//commit/b32c4b42.patch#/python-jupytext-The-cell_markers-option-are-more-conveniently-set-in.patch to /home/tkloczko/rpmbuild/SOURCES/python-jupytext-The-cell_markers-option-are-more-conveniently-set-in.patch
warning: Downloading https://github.com/mwouts/jupytext//commit/76ce21c7.patch#/python-jupytext-Skip-the-pre-commit-tests-when-the-Jupytext-folder-i.patch to /home/tkloczko/rpmbuild/SOURCES/python-jupytext-Skip-the-pre-commit-tests-when-the-Jupytext-folder-i.patch
warning: Downloading https://github.com/mwouts/jupytext//commit/f40d42cd.patch#/python-jupytext-The-rst2md-option-requires-sphinx_gallery-0.7.0-817.patch to /home/tkloczko/rpmbuild/SOURCES/python-jupytext-The-rst2md-option-requires-sphinx_gallery-0.7.0-817.patch
warning: Downloading https://github.com/mwouts/jupytext//commit/a1b02e39.patch#/python-jupytext-Require-Pandoc-2.11-in-the-tests-818.patch to /home/tkloczko/rpmbuild/SOURCES/python-jupytext-Require-Pandoc-2.11-in-the-tests-818.patch
warning: Downloading https://github.com/mwouts/jupytext//commit/d881c191.patch#/python-jupytext-Jupytext-formats-use-while-paths-might-use-either-or.patch to /home/tkloczko/rpmbuild/SOURCES/python-jupytext-Jupytext-formats-use-while-paths-might-use-either-or.patch
warning: Downloading https://github.com/mwouts/jupytext//commit/70f0a969.patch#/python-jupytext-System-assigns-of-the-form-var-cmd-are-commented-out.patch to /home/tkloczko/rpmbuild/SOURCES/python-jupytext-System-assigns-of-the-form-var-cmd-are-commented-out.patch
warning: Downloading https://github.com/mwouts/jupytext//pull/822.patch#/python-jupytext-Explicit-dependency-on-mdit-py-plugins.patch to /home/tkloczko/rpmbuild/SOURCES/python-jupytext-Explicit-dependency-on-mdit-py-plugins.patch
warning: Macro expanded in comment on line 19: %{name}-change_markdown-it-py-plugins_dependency.patch

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.ttvymT
+ umask 022
+ cd /home/tkloczko/rpmbuild/BUILD
+ cd /home/tkloczko/rpmbuild/BUILD
+ rm -rf jupytext-1.11.3
+ /usr/bin/gzip -dc /home/tkloczko/rpmbuild/SOURCES/python-jupytext-1.11.3.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd jupytext-1.11.3
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/python-jupytext-man3_level.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/python-jupytext-Update-contributing.md-link-804.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/python-jupytext-Use-local-links-link-to-developing.md.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/python-jupytext-The-cell_markers-option-are-more-conveniently-set-in.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/python-jupytext-Skip-the-pre-commit-tests-when-the-Jupytext-folder-i.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/python-jupytext-The-rst2md-option-requires-sphinx_gallery-0.7.0-817.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/python-jupytext-Require-Pandoc-2.11-in-the-tests-818.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/python-jupytext-Jupytext-formats-use-while-paths-might-use-either-or.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/python-jupytext-System-assigns-of-the-form-var-cmd-are-commented-out.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/python-jupytext-Explicit-dependency-on-mdit-py-plugins.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ RPM_EC=0
++ jobs -p
+ exit 0

[..]

Processing files: python-jupytext-1.11.3-2.2.fc35.noarch
Provides: config(python-jupytext) = 1.11.3-2.2.fc35 python-jupytext = 1.11.3-2.2.fc35 python3.8dist(jupytext) = 1.11.4~~dev0 python3dist(jupytext) = 1.11.4~~dev0
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: (python3.8dist(markdown-it-py) >= 1 with python3.8dist(markdown-it-py) < 2) /usr/bin/python3 python(abi) = 3.8 python3.8dist(mdit-py-plugins) python3.8dist(nbformat) python3.8dist(pyyaml) python3.8dist(toml)
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.11.3-2.2.fc35.x86_64
Wrote: /home/tkloczko/rpmbuild/SRPMS/python-jupytext-1.11.3-2.2.fc35.src.rpm
Wrote: /home/tkloczko/rpmbuild/RPMS/python-jupytext-1.11.3-2.2.fc35.noarch.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.ynzTYk
+ umask 022
+ cd /home/tkloczko/rpmbuild/BUILD
+ cd jupytext-1.11.3
+ /usr/bin/rm -rf /home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.11.3-2.2.fc35.x86_64
+ RPM_EC=0
++ jobs -p
+ exit 0

And generated package dependencies with your patch looks now like below:

[tkloczko@barrel RPMS]$ rpm -qp --qf "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" python-jupytext-1.11.3-2.2.fc35.noarch.rpm
(python3.8dist(markdown-it-py) >= 1 with python3.8dist(markdown-it-py) < 2)       <<<< HERE!!!
/usr/bin/python3
config(python-jupytext) = 1.11.3-2.2.fc35
python(abi) = 3.8
python3.8dist(mdit-py-plugins)
python3.8dist(nbformat)
python3.8dist(pyyaml)
python3.8dist(toml)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsZstd) <= 5.4.18-1
rpmlib(RichDependencies) <= 4.12.0-1
rpmlib(TildeInVersions) <= 4.10.0-1

So looks like with that PR ot should be OK.

Thank you very much :)

@kloczek
Copy link
Author

kloczek commented Jul 14, 2021

A just FTR .. pytest still shows some warnings

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.11.3-2.2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.11.3-2.2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.11, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, pyfakefs-4.5.0, flaky-3.7.0, hypothesis-6.14.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, cases-3.6.3, Faker-8.10.0
collected 2584 items

. .                                                                                                                                                                  [  0%]
tests/test_active_cells.py ............................                                                                                                              [  1%]
tests/test_auto_ext.py .............................................................x.s.......................                                                       [  4%]
tests/test_black.py ...s........                                                                                                                                     [  4%]
tests/test_cell_id.py .                                                                                                                                              [  4%]
tests/test_cell_metadata.py ............................................................                                                                             [  7%]
tests/test_cells.py ...............                                                                                                                                  [  7%]
tests/test_changelog.py ...                                                                                                                                          [  8%]
tests/test_cli.py .................................................................................................................................................. [ 13%]
........................................................sssssssssssssss............................................................................................. [ 20%]
s........................................................................ssssssss...s....s................                                                           [ 24%]
tests/test_cli_config.py ...........                                                                                                                                 [ 24%]
tests/test_cm_config.py ............                                                                                                                                 [ 25%]
tests/test_combine.py ..................................................                                                                                             [ 26%]
tests/test_compare.py .....................                                                                                                                          [ 27%]
tests/test_config.py .................                                                                                                                               [ 28%]
tests/test_contentsmanager.py ...................................................sssssssssssssssss.................................................................. [ 33%]
.................................................................................................................................................................... [ 39%]
................................................................................................................................s................................... [ 46%]
..ss                                                                                                                                                                 [ 46%]
tests/test_custom_cell_magics.py .                                                                                                                                   [ 46%]
tests/test_doxygen.py ..........                                                                                                                                     [ 46%]
tests/test_escape_magics.py ................................................................................                                                         [ 50%]
tests/test_execute.py ......s.                                                                                                                                       [ 50%]
tests/test_formats.py ......................s..                                                                                                                      [ 51%]
tests/test_header.py ..........                                                                                                                                      [ 51%]
tests/test_hide_remove_input_outputs_rmarkdown.py ........                                                                                                           [ 51%]
tests/test_ipynb_to_R.py ....                                                                                                                                        [ 52%]
tests/test_ipynb_to_myst.py .......ss...                                                                                                                             [ 52%]
tests/test_ipynb_to_py.py ....................                                                                                                                       [ 53%]
tests/test_ipynb_to_rmd.py ........................                                                                                                                  [ 54%]
tests/test_isort.py .                                                                                                                                                [ 54%]
tests/test_jupytext_errors.py ..                                                                                                                                     [ 54%]
tests/test_jupytext_nbconvert_round_trip.py .......................                                                                                                  [ 55%]
tests/test_jupytext_read.py ..                                                                                                                                       [ 55%]
tests/test_knitr_spin.py .                                                                                                                                           [ 55%]
tests/test_load_multiple.py ..                                                                                                                                       [ 55%]
tests/test_markdown_in_code_cells.py ....                                                                                                                            [ 55%]
tests/test_metadata_filter.py .................                                                                                                                      [ 56%]
tests/test_metadata_filters_from_config.py .                                                                                                                         [ 56%]
tests/test_mirror.py ............................................................................................................................................... [ 61%]
..................................................................................sssssssssssssssss..........................................sssssssssss............ [ 68%]
...ss...................................................................................................                                                             [ 72%]
tests/test_nbformat_version.py .......                                                                                                                               [ 72%]
tests/test_paired_paths.py ......................                                                                                                                    [ 73%]
tests/test_pep8.py ...................................................................................................................                               [ 77%]
tests/test_pre_commit_0_ipynb_to_py.py s                                                                                                                             [ 77%]
tests/test_pre_commit_1_sync.py s                                                                                                                                    [ 77%]
tests/test_pre_commit_2_sync_nbstripout.py s                                                                                                                         [ 77%]
tests/test_pre_commit_3_sync_black_nbstripout.py s                                                                                                                   [ 78%]
tests/test_pre_commit_4_sync_execute.py s                                                                                                                            [ 78%]
tests/test_pre_commit_5_reformat_markdown.py s                                                                                                                       [ 78%]
tests/test_pre_commit_mode.py ............                                                                                                                           [ 78%]
tests/test_pre_commit_scripts.py .......s                                                                                                                            [ 78%]
tests/test_preserve_empty_cells.py .......                                                                                                                           [ 79%]
tests/test_pytest.py ..                                                                                                                                              [ 79%]
tests/test_read_all_py.py ..........................................................................................................                                 [ 83%]
tests/test_read_dotnet_try_markdown.py ...                                                                                                                           [ 83%]
tests/test_read_folding_markers.py .....                                                                                                                             [ 83%]
tests/test_read_incomplete_rmd.py ...                                                                                                                                [ 83%]
tests/test_read_simple_R.py ............                                                                                                                             [ 84%]
tests/test_read_simple_clojure.py .                                                                                                                                  [ 84%]
tests/test_read_simple_csharp.py .......                                                                                                                             [ 84%]
tests/test_read_simple_groovy.py .                                                                                                                                   [ 84%]
tests/test_read_simple_hydrogen.py .......                                                                                                                           [ 84%]
tests/test_read_simple_ipynb.py .                                                                                                                                    [ 84%]
tests/test_read_simple_java.py .                                                                                                                                     [ 84%]
tests/test_read_simple_julia.py .                                                                                                                                    [ 84%]
tests/test_read_simple_markdown.py ....................................                                                                                              [ 86%]
tests/test_read_simple_matlab.py ..                                                                                                                                  [ 86%]
tests/test_read_simple_nomarker.py ..                                                                                                                                [ 86%]
tests/test_read_simple_pandoc.py sssss                                                                                                                               [ 86%]
tests/test_read_simple_percent.py ......................                                                                                                             [ 87%]
tests/test_read_simple_python.py ................................................                                                                                    [ 89%]
tests/test_read_simple_rmd.py .........                                                                                                                              [ 89%]
tests/test_read_simple_rust.py ...                                                                                                                                   [ 89%]
tests/test_read_simple_scheme.py .                                                                                                                                   [ 89%]
tests/test_read_simple_sphinx.py ...                                                                                                                                 [ 90%]
tests/test_read_write_functions.py .....                                                                                                                             [ 90%]
tests/test_rmd_to_ipynb.py ......                                                                                                                                    [ 90%]
tests/test_save_multiple.py .....................................................                                                                                    [ 92%]
tests/test_stringparser.py ....                                                                                                                                      [ 92%]
tests/test_trust_notebook.py ................................................                                                                                        [ 94%]
tests/test_unicode.py ...............................                                                                                                                [ 95%]
tests/test_using_cli.py .                                                                                                                                            [ 95%]
tests/test_write_does_not_modify_notebook.py ..............................................................................................................          [100%]

============================================================================= warnings summary =============================================================================
jupytext/cell_reader.py:20
  /home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/cell_reader.py:20: UserWarning: Sphinx Gallery in version 0.8.2 is not supported by Jupytext. Please use sphinx-gallery<=0.7.0 instead. If that is an issue, feel free to report it at https://github.com/mwouts/jupytext/issues, or even better, prepare a PR to handle the new signature of sphinx_gallery.notebook.rst2md.
    warnings.warn(

tests/test_cli.py::test_utf8_out_331
  /usr/lib/python3.8/site-packages/nbconvert/exporters/html.py:110: DeprecationWarning: 'contextfilter' is renamed to 'pass_context', the old name will be removed in Jinja 3.1.
    def markdown2html(self, context, source):

tests/test_cli.py::test_cli_expect_errors
  /home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/jupytext/cli.py:332: DeprecationWarning: The --pre-commit argument is deprecated. Please consider switching to the pre-commit.com framework (let us know at https://github.com/mwouts/jupytext/issues if that is an issue for you)
    warnings.warn(

tests/test_cli.py::test_format_prefix_suffix
  [warning] You have passed a file name to the '--to' option, when a format description was expected. Maybe you want to use the '-o' option instead?

tests/test_cm_config.py::test_incorrect_config_message[jupytext.toml-not_a_jupytext_option = true]
tests/test_cm_config.py::test_incorrect_config_message[jupytext.toml-not_a_jupytext_option = true]
tests/test_cm_config.py::test_incorrect_config_message[.jupytext.py-c.not_a_jupytext_option = True]
tests/test_cm_config.py::test_incorrect_config_message[.jupytext.py-c.not_a_jupytext_option = True]
  [warning] Passing unrecognized arguments to super(JupytextConfiguration).__init__(not_a_jupytext_option=True).
  object.__init__() takes exactly one argument (the instance to initialize)
  This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.

tests/test_contentsmanager.py: 48 warnings
  [warning] GObject.GError is deprecated; use GLib.GError instead

tests/test_pre_commit_scripts.py::test_manual_call_of_pre_commit_hook
  [warning] The --pre-commit argument is deprecated. Please consider switching to the pre-commit.com framework (let us know at https://github.com/mwouts/jupytext/issues if that is an issue for you)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_auto_ext.py:36: No file_extension in language_info
SKIPPED [1] tests/test_black.py:67: autopep8 not found
SKIPPED [15] tests/test_cli.py:557: pandoc>=2.11 is not available
SKIPPED [1] tests/test_cli.py:795: sphinx_gallery is not available
SKIPPED [3] tests/test_cli.py:991: pandoc>=2.11 is not available
SKIPPED [5] tests/test_cli.py:1005: pandoc>=2.11 is not available
SKIPPED [1] tests/test_cli.py:1075: pandoc>=2.11 is not available
SKIPPED [1] tests/test_cli.py:1188: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [17] tests/test_contentsmanager.py:180: pandoc>=2.11 is not available
SKIPPED [1] tests/test_contentsmanager.py:1188: sphinx_gallery is not available
SKIPPED [2] tests/test_contentsmanager.py:1765: jupyterfs is not available
SKIPPED [1] tests/test_execute.py:150: irkernel is not installed
SKIPPED [1] tests/test_formats.py:324: pandoc>=2.11 is not available
SKIPPED [1] tests/test_ipynb_to_myst.py:162: myst is available
SKIPPED [1] tests/test_ipynb_to_myst.py:171: myst is available
SKIPPED [17] tests/test_mirror.py:131: pandoc>=2.11 is not available
SKIPPED [11] tests/test_mirror.py:151: sphinx_gallery is not available
SKIPPED [1] tests/test_mirror.py:202: sphinx_gallery is not available
SKIPPED [1] tests/test_mirror.py:208: sphinx_gallery is not available
SKIPPED [1] tests/test_pre_commit_0_ipynb_to_py.py:16: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_1_sync.py:17: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_2_sync_nbstripout.py:14: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_3_sync_black_nbstripout.py:13: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_4_sync_execute.py:15: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_5_reformat_markdown.py:15: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_scripts.py:335: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:13: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:35: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:50: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:64: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:82: Pandoc is installed
XFAIL tests/test_auto_ext.py::test_auto_from_kernelspecs_works[/home/tkloczko/rpmbuild/BUILD/jupytext-1.11.3/tests/notebooks/ipynb_sage/sage_print_hello.ipynb]
  reason: Sage notebooks have Python in their language_info metadata, see #727
=================================================== 2487 passed, 94 skipped, 1 xfailed, 57 warnings in 171.98s (0:02:51) ===================================================

@mwouts
Copy link
Owner

mwouts commented Jul 14, 2021

Great news!
I need to do some research on how to filter out the warnings, so I'll do that in a separate issue: #823.
And thank you for your work on the rpm package (and I'll release the next version 1.11.4 very soon)

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

Successfully merging a pull request may close this issue.

2 participants