Bug 2220365

Summary: F39FailsToInstall: python3-notebook
Product: [Fedora] Fedora Reporter: Fedora Fails To Install <fti-bugs>
Component: python-notebookAssignee: Lumír Balhar <lbalhar>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: code, ksurma, mhroncok, mtasaka, python-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-notebook-7.0.0b3-3.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-10 22:19:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2135404, 2168845, 2220019, 2220241, 2220244, 2220286, 2220294, 2220357, 2220409, 2220593    

Description Fedora Fails To Install 2023-07-05 19:16:33 UTC
Hello,

Please note that this comment was generated automatically by https://pagure.io/releng/blob/main/f/scripts/ftbfs-fti/follow-policy.py
If you feel that this output has mistakes, please open an issue at https://pagure.io/releng/

Your package (python-notebook) Fails To Install in Fedora 39:

can't install python3-notebook:
  - nothing provides python(abi) = 3.11 needed by python3-notebook-7.0.0b3-1.fc39.noarch
  - nothing provides (python3.11dist(jupyter-server) < 3~~ with python3.11dist(jupyter-server) >= 2.4) needed by python3-notebook-7.0.0b3-1.fc39.noarch
  - nothing provides (python3.11dist(jupyterlab) < 5~~ with python3.11dist(jupyterlab) >= 4) needed by python3-notebook-7.0.0b3-1.fc39.noarch
  - nothing provides (python3.11dist(jupyterlab-server) < 3~~ with python3.11dist(jupyterlab-server) >= 2.22.1) needed by python3-notebook-7.0.0b3-1.fc39.noarch
  - nothing provides (python3.11dist(notebook-shim) < 0.3~~ with python3.11dist(notebook-shim) >= 0.2) needed by python3-notebook-7.0.0b3-1.fc39.noarch
  - nothing provides python3.11dist(tornado) >= 6.2 needed by python3-notebook-7.0.0b3-1.fc39.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-39-x86_64 --config-opts mirrored=False install python3-notebook


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 Ben Beasley 2023-07-05 20:49:12 UTC
$ fedpkg mockbuild --enablerepo=local
=========================== short test summary info ============================
ERROR tests/test_app.py::test_notebook_handler - StopIteration
ERROR tests/test_app.py::test_tree_handler - StopIteration
ERROR tests/test_app.py::test_console_handler - StopIteration
ERROR tests/test_app.py::test_terminals_handler - StopIteration
ERROR tests/test_app.py::test_edit_handler - StopIteration
ERROR tests/test_app.py::test_app - StopIteration
============================== 6 errors in 0.38s ===============================

It seems that calls like

>         # Copy the schema files.
> >       test_data = str(files("jupyterlab_server.test_data").joinpath(""))

are failing like

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.12/importlib/resources/readers.py:92: in joinpath
    return super().joinpath(*descendants)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = MultiplexedPath('/usr/lib/python3.12/site-packages/jupyterlab_server/test
_data')
descendants = ('',), names = <itertools.chain object at 0x7f84ad11d150>

    def joinpath(self, *descendants: StrPath) -> "Traversable":
        """
        Return Traversable resolved with any descendants applied.

        Each descendant should be a path segment relative to self
        and each may contain multiple levels separated by
        ``posixpath.sep`` (``/``).
        """
        if not descendants:
            return self
        names = itertools.chain.from_iterable(
            path.parts for path in map(pathlib.PurePosixPath, descendants)
        )
>       target = next(names)
E       StopIteration

/usr/lib64/python3.12/importlib/resources/abc.py:117: StopIteration

Comment 2 Miro Hrončok 2023-07-07 08:17:26 UTC
I decided to give 7.0.0rc2 a try. Did not help.

Comment 3 Lumír Balhar 2023-07-10 16:29:58 UTC
There is a difference in importlib.resources behavior:

Python 3.11:

>>> from importlib.resources import files
>>> files("jupyterlab_server.test_data")
MultiplexedPath('/usr/lib/python3.11/site-packages/jupyterlab_server/test_data')
>>> files("jupyterlab_server.test_data").joinpath("")
PosixPath('/usr/lib/python3.11/site-packages/jupyterlab_server/test_data')

Python 3.12:

>>> from importlib.resources import files
>>> files("jupyterlab_server.test_data")
MultiplexedPath('/usr/lib/python3.12/site-packages/jupyterlab_server/test_data')
>>> files("jupyterlab_server.test_data").joinpath(".")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.12/importlib/resources/readers.py", line 92, in joinpath
    return super().joinpath(*descendants)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/importlib/resources/abc.py", line 117, in joinpath
    target = next(names)
             ^^^^^^^^^^^
StopIteration


And this seems to be the commit causing it: https://github.com/python/cpython/commit/cea910ebf14d1bd9d8bc0c8a5046e69ae8f5be17