Bug 1907479 - python-nb2plots fails to build with Python 3.10: SystemError: /builddir/build/BUILD/Python-3.10.0a3/Python/getargs.c:2035: bad argument to internal function
Summary: python-nb2plots fails to build with Python 3.10: SystemError: /builddir/build...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-nb2plots
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jerry James
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2020-12-14 15:30 UTC by Tomáš Hrnčiar
Modified: 2021-02-09 16:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2020-12-14 15:30:54 UTC
python-nb2plots fails to build with Python 3.10.0a3.

jupyter nbconvert --to html example_notebook.ipynb --stdout > \
	_build/html/example_notebook.html
[NbConvertApp] Converting notebook example_notebook.ipynb to html
Traceback (most recent call last):
  File "/usr/bin/jupyter-nbconvert", line 33, in <module>
    sys.exit(load_entry_point('nbconvert==5.6.1', 'console_scripts', 'jupyter-nbconvert')())
  File "/usr/lib/python3.10/site-packages/jupyter_core/application.py", line 270, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/usr/lib/python3.10/site-packages/traitlets/config/application.py", line 845, in launch_instance
    app.start()
  File "/usr/lib/python3.10/site-packages/nbconvert/nbconvertapp.py", line 340, in start
    self.convert_notebooks()
  File "/usr/lib/python3.10/site-packages/nbconvert/nbconvertapp.py", line 510, in convert_notebooks
    self.convert_single_notebook(notebook_filename)
  File "/usr/lib/python3.10/site-packages/nbconvert/nbconvertapp.py", line 481, in convert_single_notebook
    output, resources = self.export_single_notebook(notebook_filename, resources, input_buffer=input_buffer)
  File "/usr/lib/python3.10/site-packages/nbconvert/nbconvertapp.py", line 410, in export_single_notebook
    output, resources = self.exporter.from_filename(notebook_filename, resources=resources)
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/exporter.py", line 179, in from_filename
    return self.from_file(f, resources=resources, **kw)
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/exporter.py", line 197, in from_file
    return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw)
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/html.py", line 95, in from_notebook_node
    return super(HTMLExporter, self).from_notebook_node(nb, resources, **kw)
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/templateexporter.py", line 322, in from_notebook_node
    output = self.template.render(nb=nb_copy, resources=resources)
  File "/usr/lib/python3.10/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/lib/python3.10/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/lib/python3.10/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/../templates/html/full.tpl", line 4, in top-level template code
    
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/../templates/html/basic.tpl", line 128, in top-level template code
    {% block data_html scoped -%}
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/../templates/skeleton/display_priority.tpl", line 60, in top-level template code
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/../templates/skeleton/null.tpl", line 141, in top-level template code
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/../templates/html/full.tpl", line 214, in block "body"
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/../templates/skeleton/null.tpl", line 143, in block "body"
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/../templates/skeleton/null.tpl", line 196, in block "any_cell"
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/../templates/html/basic.tpl", line 199, in block "markdowncell"
    <div class="output_subarea output_text output_error">
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/html.py", line 83, in markdown2html
    return MarkdownWithMath(renderer=renderer).render(source)
  File "mistune.py", line 977, in mistune.Markdown.render
    return self.parse(text)
  File "mistune.py", line 980, in mistune.Markdown.parse
    out = self.output(preprocessing(text))
  File "mistune.py", line 1022, in mistune.Markdown.output
    self.tokens = self.block(text, rules)
  File "mistune.py", line 205, in mistune.BlockLexer.__call__
    return self.parse(text, rules)
  File "mistune.py", line 224, in mistune.BlockLexer.parse
    m = manipulate(text)
  File "mistune.py", line 216, in mistune.BlockLexer.parse.manipulate
    m = rule.match(text)
SystemError: /builddir/build/BUILD/Python-3.10.0a3/Python/getargs.c:2035: bad argument to internal function
make: *** [Makefile:232: example] Error 1

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01827256-python-nb2plots/

For all our attempts to build python-nb2plots with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-nb2plots/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Jerry James 2020-12-14 15:52:01 UTC
From that backtrace, it looks like python-mistune is making the bad call.

Comment 2 Ben Cotton 2021-02-09 15:34:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.


Note You need to log in before you can comment on or make changes to this bug.