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: CLOSED RAWHIDE
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:
: 1969043 (view as bug list)
Depends On:
Blocks: PYTHON3.10 F35FTBFS F35FailsToInstall 1969046
TreeView+ depends on / blocked
 
Reported: 2020-12-14 15:30 UTC by Tomáš Hrnčiar
Modified: 2021-06-10 18:54 UTC (History)
4 users (show)

Fixed In Version: python-nb2plots-0.6-16.20201224.1a7bac4.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-10 18:54:20 UTC
Type: Bug
Embargoed:


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.

Comment 3 Miro Hrončok 2021-06-04 20:15:33 UTC
This is a mass-posted update. Sorry if it is not 100% accurate to this bugzilla.


The Python 3.10 rebuild is in progress in a Koji side tag. If you manage to fix the problem, please commit the fix in the rawhide branch, but don't build the package in regular rawhide.

You can either build the package in the side tag, with:

    $ fedpkg build --target=f35-python

Or you can the build and we will eventually build it for you.

Note that the rebuild is still in progress, so not all (build) dependencies of this package might be available right away.

Thanks.

See also https://fedoraproject.org/wiki/Changes/Python3.10

If you have general questions about the rebuild, please use this mailing list thread: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/G47SGOYIQLRDTWGOSLSWERZSSHXDEDH5/

Comment 4 Miro Hrončok 2021-06-07 22:59:57 UTC
The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build.

Comment 5 Miro Hrončok 2021-06-08 11:29:09 UTC
*** Bug 1969043 has been marked as a duplicate of this bug. ***

Comment 6 Zbigniew Jędrzejewski-Szmek 2021-06-10 18:54:20 UTC
It built fine now, let's close this. It seems likely that the bug was in some other package indeed.


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