Bug 2098983 - python-jupyter-console fails to build with Python 3.11: TypeError: Passing coroutines is forbidden, use tasks explicitly.
Summary: python-jupyter-console fails to build with Python 3.11: TypeError: Passing co...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: python-jupyter-console
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Elliott Sales de Andrade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11 F37FTBFS F37FailsToInstall 2098721
TreeView+ depends on / blocked
 
Reported: 2022-06-20 09:38 UTC by Miro Hrončok
Modified: 2022-06-21 17:51 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-21 17:51:09 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github jupyter jupyter_console pull 270 0 None open Use loop.create_task with interact() 2022-06-21 13:00:26 UTC

Description Miro Hrončok 2022-06-20 09:38:29 UTC
Hello,

Please note that this comment was generated automatically. If you feel that this output has mistakes, please contact me via email (mhroncok).

Your package (python-jupyter-console) Fails To Install in Fedora 37:

can't install python3-jupyter-console:
  - nothing provides python3.10dist(pygments) needed by python3-jupyter-console-6.4.3-1.fc37.noarch
  - nothing provides python3.10dist(ipykernel) needed by python3-jupyter-console-6.4.3-1.fc37.noarch
  - nothing provides python3.10dist(ipython) needed by python3-jupyter-console-6.4.3-1.fc37.noarch
  - nothing provides python(abi) = 3.10 needed by python3-jupyter-console-6.4.3-1.fc37.noarch
  - nothing provides ((python3.10dist(prompt-toolkit) < 3 or python3.10dist(prompt-toolkit) > 3) with (python3.10dist(prompt-toolkit) < 3.0.1 or python3.10dist(prompt-toolkit) > 3.0.1) with python3.10dist(prompt-toolkit) < 3.1~~ with python3.10dist(prompt-toolkit) >= 2) needed by python3-jupyter-console-6.4.3-1.fc37.noarch
  - nothing provides python3.10dist(jupyter-client) >= 7 needed by python3-jupyter-console-6.4.3-1.fc37.noarch
  
If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.


If you don't react accordingly to the policy for FTBFS/FTI bugs (https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/), your package may be orphaned in 8+ weeks.


P.S. The data was generated solely from koji buildroot, so it might be newer than the latest compose or the content on mirrors. To reproduce, use the koji/local repo only, e.g. in mock:

    $ mock -r fedora-37-x86_64 --disablerepo='*' --enablerepo=local install python3-jupyter-console


P.P.S. If this bug has been reported in the middle of upgrading multiple dependent packages, please consider using side tags: https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/#updating-inter-dependent-packages

Thanks!

Comment 1 Miro Hrončok 2022-06-20 10:08:35 UTC
This bugzilla is likely a fallout from the Python 3.11 rebuild.

If your package (or some of the dependencies it has) failed to rebuild during the Python 3.11 rebuild, they now fail to install. To fix this, packages need to be rebuilt in Rawhide.

We will slowly triage the bugzillas, but we'd appreciate your help.

If you know this is blocked by an existing reported build failure or another package not yet rebuilt with Python 3.11, please mark it as such by using the "Depends On"/"Blocks" bugzilla fields. That will help us determine what failures to prioritize.

If this is not Python 3.11 related, please remove the PYTHON3.11 blocking tracker.

Thank you and sorry for the inconvenience. Let me know if you need any help.

Comment 2 Miro Hrončok 2022-06-20 11:52:57 UTC
+ jupyter-console --simple-prompt
[IPKernelApp] WARNING | debugpy_stream undefined, debugging will not be enabled
Jupyter console 6.4.3
Python 3.11.0b3 (main, Jun 13 2022, 00:00:00) [GCC 12.1.1 20220507 (Red Hat 12.1.1-1)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.4.0 -- An enhanced Interactive Python. Type '?' for help.
Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/python-jupyter-console-6.4.3-3.fc37.noarch/usr/bin/jupyter-console", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/jupyter_core/application.py", line 269, in launch_instance
    return super().launch_instance(argv=argv, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/traitlets/config/application.py", line 972, in launch_instance
    app.start()
    ^^^^^^^^^^^
  File "/builddir/build/BUILDROOT/python-jupyter-console-6.4.3-3.fc37.noarch/usr/lib/python3.11/site-packages/jupyter_console/app.py", line 148, in start
    self.shell.mainloop()
    ^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILDROOT/python-jupyter-console-6.4.3-3.fc37.noarch/usr/lib/python3.11/site-packages/jupyter_console/ptshell.py", line 667, in mainloop
    _, pending = loop.run_until_complete(main_task)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/nest_asyncio.py", line 89, in run_until_complete
    return f.result()
           ^^^^^^^^^^
  File "/usr/lib64/python3.11/asyncio/futures.py", line 209, in result
    raise self._exception
    ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/asyncio/tasks.py", line 276, in __step
    result = coro.send(None)
             ^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/asyncio/tasks.py", line 424, in wait
    raise TypeError("Passing coroutines is forbidden, use tasks explicitly.")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Passing coroutines is forbidden, use tasks explicitly.
sys:1: RuntimeWarning: coroutine 'ZMQTerminalInteractiveShell.interact' was never awaited

Comment 3 Miro Hrončok 2022-06-20 12:08:25 UTC
loop.run_until_complete(asyncio.create_task(main_task)) ends with:

Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/python-jupyter-console-6.4.3-4.fc37.x86_64/usr/bin/jupyter-console", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/jupyter_core/application.py", line 269, in launch_instance
    return super().launch_instance(argv=argv, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/traitlets/config/application.py", line 972, in launch_instance
    app.start()
    ^^^^^^^^^^^
  File "/builddir/build/BUILDROOT/python-jupyter-console-6.4.3-4.fc37.x86_64/usr/lib/python3.11/site-packages/jupyter_console/app.py", line 148, in start
    self.shell.mainloop()
    ^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILDROOT/python-jupyter-console-6.4.3-4.fc37.x86_64/usr/lib/python3.11/site-packages/jupyter_console/ptshell.py", line 667, in mainloop
    _, pending = loop.run_until_complete(asyncio.create_task(main_task))
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/asyncio/tasks.py", line 380, in create_task
    loop = events.get_running_loop()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: no running event loop




And loop.run_until_complete(loop.create_task(main_task)) ends with the original error:

Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/python-jupyter-console-6.4.3-4.fc37.x86_64/usr/bin/jupyter-console", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/jupyter_core/application.py", line 269, in launch_instance
    return super().launch_instance(argv=argv, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/traitlets/config/application.py", line 972, in launch_instance
    app.start()
    ^^^^^^^^^^^
  File "/builddir/build/BUILDROOT/python-jupyter-console-6.4.3-4.fc37.x86_64/usr/lib/python3.11/site-packages/jupyter_console/app.py", line 148, in start
    self.shell.mainloop()
    ^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILDROOT/python-jupyter-console-6.4.3-4.fc37.x86_64/usr/lib/python3.11/site-packages/jupyter_console/ptshell.py", line 667, in mainloop
    _, pending = loop.run_until_complete(loop.create_task(main_task))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/nest_asyncio.py", line 89, in run_until_complete
    return f.result()
           ^^^^^^^^^^
  File "/usr/lib64/python3.11/asyncio/futures.py", line 209, in result
    raise self._exception
    ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/asyncio/tasks.py", line 276, in __step
    result = coro.send(None)
             ^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/asyncio/tasks.py", line 424, in wait
    raise TypeError("Passing coroutines is forbidden, use tasks explicitly.")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Passing coroutines is forbidden, use tasks explicitly.

Comment 4 Elliott Sales de Andrade 2022-06-21 00:09:27 UTC
Is this a jupyter-console problem, or perhaps something in nest-asyncio instead?

Comment 5 Miro Hrončok 2022-06-21 09:24:47 UTC
I assume this is very likely to be an incompatibility in nest-asyncio: "This module patches asyncio"

Comment 6 Petr Viktorin (pviktori) 2022-06-21 13:00:27 UTC
Turns out it's in jupyter-console after all. 
Upstream PR: https://github.com/jupyter/jupyter_console/pull/270

Comment 7 Miro Hrončok 2022-06-21 17:51:09 UTC
Hello,

Please note that this comment was generated automatically. If you feel that this output has mistakes, please contact me via email (mhroncok).

All subpackages of a package against which this bug was filled are now installable or removed from Fedora 37.

Thanks for taking care of it!


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