Bug 269125 - devel/py-jupyterlab: Requires newer version of importlib_metadata>=4.8.3
Summary: devel/py-jupyterlab: Requires newer version of importlib_metadata>=4.8.3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-23 22:52 UTC by August
Modified: 2023-02-04 07:10 UTC (History)
5 users (show)

See Also:
eduardo: maintainer-feedback? (sunpoet)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description August 2023-01-23 22:52:05 UTC
Hi, when starting /devel/py39-jupyterlab-3.5.0 on FreeBSD 13.1-RELEASE-p5, I get the following errors. All packages are binary installs via pkg. I reproduced the error on my usual system and a fresh install. The result is jupyter-lab opens but see no kernels. jupyter-notebook works and does see the kernels.Thanks.

[E 2023-01-23 14:26:02.059 ServerApp] Uncaught exception GET /api/kernelspecs?1674512760906 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/kernelspecs?1674512760906', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 581, in _build_master
        ws.require(__requires__)
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 909, in require
        needed = self.resolve(parse_requirements(requirements))
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 800, in resolve
        raise VersionConflict(dist, req).with_context(dependent_req)
    pkg_resources.ContextualVersionConflict: (importlib-metadata 4.8.1 (/usr/local/lib/python3.9/site-packages), Requirement.parse('importlib_metadata>=4.8.3'), {'jupyterlab-server'})
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.9/site-packages/tornado/web.py", line 1713, in _execute
        result = await result
      File "/usr/local/lib/python3.9/site-packages/jupyter_server/services/kernelspecs/handlers.py", line 64, in get
        kspecs = await ensure_async(ksm.get_all_specs())
      File "/usr/local/lib/python3.9/site-packages/jupyter_client/kernelspec.py", line 311, in get_all_specs
        d = self.find_kernel_specs()
      File "/usr/local/lib/python3.9/site-packages/jupyter_client/kernelspec.py", line 225, in find_kernel_specs
        from ipykernel.kernelspec import RESOURCES  # type: ignore
      File "/usr/local/lib/python3.9/site-packages/ipykernel/kernelspec.py", line 18, in <module>
        from .debugger import _is_debugpy_available
      File "/usr/local/lib/python3.9/site-packages/ipykernel/debugger.py", line 39, in <module>
        raise e
      File "/usr/local/lib/python3.9/site-packages/ipykernel/debugger.py", line 22, in <module>
        from debugpy.server import api  # noqa
      File "/usr/local/lib/python3.9/site-packages/debugpy/server/__init__.py", line 7, in <module>
        import debugpy._vendored.force_pydevd  # noqa
      File "/usr/local/lib/python3.9/site-packages/debugpy/_vendored/force_pydevd.py", line 36, in <module>
        preimport('pydevd', [
      File "/usr/local/lib/python3.9/site-packages/debugpy/_vendored/__init__.py", line 126, in preimport
        import_module(name)
      File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "/usr/local/lib/python3.9/site-packages/debugpy/_vendored/pydevd/pydevd_plugins/__init__.py", line 5, in <module>
        __import__('pkg_resources').declare_namespace(__name__)
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3260, in <module>
        def _initialize_master_working_set():
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
        f(*args, **kwargs)
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3272, in _initialize_master_working_set
        working_set = WorkingSet._build_master()
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 583, in _build_master
        return cls._build_from_requirements(__requires__)
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 596, in _build_from_requirements
        dists = ws.resolve(reqs, Environment())
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 795, in resolve
        raise DistributionNotFound(req, requirers)
    pkg_resources.DistributionNotFound: The 'importlib_metadata>=4.8.3' distribution was not found and is required by jupyterlab-server
[W 2023-01-23 14:26:02.068 ServerApp] wrote error: 'Unhandled error'
[E 2023-01-23 14:26:02.070 ServerApp] {
      "Host": "localhost:8888",
      "Accept": "*/*",
      "Referer": "http://localhost:8888/lab",
      "User-Agent": "Mozilla/5.0 (X11; FreeBSD amd64; rv:109.0) Gecko/20100101 Firefox/109.0"
    }
[E 2023-01-23 14:26:02.070 ServerApp] 500 GET /api/kernelspecs?1674512760906 (127.0.0.1) 1019.88ms referer=http://localhost:8888/lab
[E 2023-01-23 14:26:02.698 ServerApp] Uncaught exception GET /api/kernelspecs?1674512762087 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/kernelspecs?1674512762087', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 581, in _build_master
        ws.require(__requires__)
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 909, in require
        needed = self.resolve(parse_requirements(requirements))
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 800, in resolve
        raise VersionConflict(dist, req).with_context(dependent_req)
    pkg_resources.ContextualVersionConflict: (importlib-metadata 4.8.1 (/usr/local/lib/python3.9/site-packages), Requirement.parse('importlib_metadata>=4.8.3'), {'jupyterlab-server'})
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.9/site-packages/tornado/web.py", line 1713, in _execute
        result = await result
      File "/usr/local/lib/python3.9/site-packages/jupyter_server/services/kernelspecs/handlers.py", line 64, in get
        kspecs = await ensure_async(ksm.get_all_specs())
      File "/usr/local/lib/python3.9/site-packages/jupyter_client/kernelspec.py", line 311, in get_all_specs
        d = self.find_kernel_specs()
      File "/usr/local/lib/python3.9/site-packages/jupyter_client/kernelspec.py", line 225, in find_kernel_specs
        from ipykernel.kernelspec import RESOURCES  # type: ignore
      File "/usr/local/lib/python3.9/site-packages/ipykernel/kernelspec.py", line 18, in <module>
        from .debugger import _is_debugpy_available
      File "/usr/local/lib/python3.9/site-packages/ipykernel/debugger.py", line 39, in <module>
        raise e
      File "/usr/local/lib/python3.9/site-packages/ipykernel/debugger.py", line 22, in <module>
        from debugpy.server import api  # noqa
      File "/usr/local/lib/python3.9/site-packages/debugpy/server/__init__.py", line 7, in <module>
        import debugpy._vendored.force_pydevd  # noqa
      File "/usr/local/lib/python3.9/site-packages/debugpy/_vendored/force_pydevd.py", line 36, in <module>
        preimport('pydevd', [
      File "/usr/local/lib/python3.9/site-packages/debugpy/_vendored/__init__.py", line 126, in preimport
        import_module(name)
      File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "/usr/local/lib/python3.9/site-packages/debugpy/_vendored/pydevd/pydevd_plugins/__init__.py", line 5, in <module>
        __import__('pkg_resources').declare_namespace(__name__)
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3260, in <module>
        def _initialize_master_working_set():
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
        f(*args, **kwargs)
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3272, in _initialize_master_working_set
        working_set = WorkingSet._build_master()
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 583, in _build_master
        return cls._build_from_requirements(__requires__)
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 596, in _build_from_requirements
        dists = ws.resolve(reqs, Environment())
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 795, in resolve
        raise DistributionNotFound(req, requirers)
    pkg_resources.DistributionNotFound: The 'importlib_metadata>=4.8.3' distribution was not found and is required by jupyterlab-server
[W 2023-01-23 14:26:02.699 ServerApp] wrote error: 'Unhandled error'
[E 2023-01-23 14:26:02.700 ServerApp] {
      "Host": "localhost:8888",
      "Accept": "*/*",
      "Referer": "http://localhost:8888/lab",
      "User-Agent": "Mozilla/5.0 (X11; FreeBSD amd64; rv:109.0) Gecko/20100101 Firefox/109.0"
    }
[E 2023-01-23 14:26:02.700 ServerApp] 500 GET /api/kernelspecs?1674512762087 (127.0.0.1) 522.16ms referer=http://localhost:8888/lab
[W 2023-01-23 14:26:03.713 LabApp] Could not determine jupyterlab build status without nodejs
[E 2023-01-23 14:26:45.131 ServerApp] Uncaught exception GET /api/kernelspecs?1674512804584 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/kernelspecs?1674512804584', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 581, in _build_master
        ws.require(__requires__)
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 909, in require
        needed = self.resolve(parse_requirements(requirements))
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 800, in resolve
        raise VersionConflict(dist, req).with_context(dependent_req)
    pkg_resources.ContextualVersionConflict: (importlib-metadata 4.8.1 (/usr/local/lib/python3.9/site-packages), Requirement.parse('importlib_metadata>=4.8.3'), {'jupyterlab-server'})
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.9/site-packages/tornado/web.py", line 1713, in _execute
        result = await result
      File "/usr/local/lib/python3.9/site-packages/jupyter_server/services/kernelspecs/handlers.py", line 64, in get
        kspecs = await ensure_async(ksm.get_all_specs())
      File "/usr/local/lib/python3.9/site-packages/jupyter_client/kernelspec.py", line 311, in get_all_specs
        d = self.find_kernel_specs()
      File "/usr/local/lib/python3.9/site-packages/jupyter_client/kernelspec.py", line 225, in find_kernel_specs
        from ipykernel.kernelspec import RESOURCES  # type: ignore
      File "/usr/local/lib/python3.9/site-packages/ipykernel/kernelspec.py", line 18, in <module>
        from .debugger import _is_debugpy_available
      File "/usr/local/lib/python3.9/site-packages/ipykernel/debugger.py", line 39, in <module>
        raise e
      File "/usr/local/lib/python3.9/site-packages/ipykernel/debugger.py", line 22, in <module>
        from debugpy.server import api  # noqa
      File "/usr/local/lib/python3.9/site-packages/debugpy/server/__init__.py", line 7, in <module>
        import debugpy._vendored.force_pydevd  # noqa
      File "/usr/local/lib/python3.9/site-packages/debugpy/_vendored/force_pydevd.py", line 36, in <module>
        preimport('pydevd', [
      File "/usr/local/lib/python3.9/site-packages/debugpy/_vendored/__init__.py", line 126, in preimport
        import_module(name)
      File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "/usr/local/lib/python3.9/site-packages/debugpy/_vendored/pydevd/pydevd_plugins/__init__.py", line 5, in <module>
        __import__('pkg_resources').declare_namespace(__name__)
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3260, in <module>
        def _initialize_master_working_set():
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
        f(*args, **kwargs)
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3272, in _initialize_master_working_set
        working_set = WorkingSet._build_master()
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 583, in _build_master
        return cls._build_from_requirements(__requires__)
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 596, in _build_from_requirements
        dists = ws.resolve(reqs, Environment())
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 795, in resolve
        raise DistributionNotFound(req, requirers)
    pkg_resources.DistributionNotFound: The 'importlib_metadata>=4.8.3' distribution was not found and is required by jupyterlab-server
[W 2023-01-23 14:26:45.133 ServerApp] wrote error: 'Unhandled error'
[E 2023-01-23 14:26:45.134 ServerApp] {
      "Host": "localhost:8888",
      "Accept": "*/*",
      "Referer": "http://localhost:8888/lab",
      "User-Agent": "Mozilla/5.0 (X11; FreeBSD amd64; rv:109.0) Gecko/20100101 Firefox/109.0"
    }
[E 2023-01-23 14:26:45.134 ServerApp] 500 GET /api/kernelspecs?1674512804584 (127.0.0.1) 532.23ms referer=http://localhost:8888/lab
[E 2023-01-23 14:27:55.413 ServerApp] Uncaught exception GET /api/kernelspecs?1674512874908 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/kernelspecs?1674512874908', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 581, in _build_master
        ws.require(__requires__)
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 909, in require
        needed = self.resolve(parse_requirements(requirements))
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 800, in resolve
        raise VersionConflict(dist, req).with_context(dependent_req)
    pkg_resources.ContextualVersionConflict: (importlib-metadata 4.8.1 (/usr/local/lib/python3.9/site-packages), Requirement.parse('importlib_metadata>=4.8.3'), {'jupyterlab-server'})
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.9/site-packages/tornado/web.py", line 1713, in _execute
        result = await result
      File "/usr/local/lib/python3.9/site-packages/jupyter_server/services/kernelspecs/handlers.py", line 64, in get
        kspecs = await ensure_async(ksm.get_all_specs())
      File "/usr/local/lib/python3.9/site-packages/jupyter_client/kernelspec.py", line 311, in get_all_specs
        d = self.find_kernel_specs()
      File "/usr/local/lib/python3.9/site-packages/jupyter_client/kernelspec.py", line 225, in find_kernel_specs
        from ipykernel.kernelspec import RESOURCES  # type: ignore
      File "/usr/local/lib/python3.9/site-packages/ipykernel/kernelspec.py", line 18, in <module>
        from .debugger import _is_debugpy_available
      File "/usr/local/lib/python3.9/site-packages/ipykernel/debugger.py", line 39, in <module>
        raise e
      File "/usr/local/lib/python3.9/site-packages/ipykernel/debugger.py", line 22, in <module>
        from debugpy.server import api  # noqa
      File "/usr/local/lib/python3.9/site-packages/debugpy/server/__init__.py", line 7, in <module>
        import debugpy._vendored.force_pydevd  # noqa
      File "/usr/local/lib/python3.9/site-packages/debugpy/_vendored/force_pydevd.py", line 36, in <module>
        preimport('pydevd', [
      File "/usr/local/lib/python3.9/site-packages/debugpy/_vendored/__init__.py", line 126, in preimport
        import_module(name)
      File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "/usr/local/lib/python3.9/site-packages/debugpy/_vendored/pydevd/pydevd_plugins/__init__.py", line 5, in <module>
        __import__('pkg_resources').declare_namespace(__name__)
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3260, in <module>
        def _initialize_master_working_set():
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
        f(*args, **kwargs)
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3272, in _initialize_master_working_set
        working_set = WorkingSet._build_master()
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 583, in _build_master
        return cls._build_from_requirements(__requires__)
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 596, in _build_from_requirements
        dists = ws.resolve(reqs, Environment())
      File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 795, in resolve
        raise DistributionNotFound(req, requirers)
    pkg_resources.DistributionNotFound: The 'importlib_metadata>=4.8.3' distribution was not found and is required by jupyterlab-server
[W 2023-01-23 14:27:56.042 ServerApp] wrote error: 'Unhandled error'
[E 2023-01-23 14:27:56.043 ServerApp] {
      "Host": "localhost:8888",
      "Accept": "*/*",
      "Referer": "http://localhost:8888/lab",
      "User-Agent": "Mozilla/5.0 (X11; FreeBSD amd64; rv:109.0) Gecko/20100101 Firefox/109.0"
    }
[E 2023-01-23 14:27:56.043 ServerApp] 500 GET /api/kernelspecs?1674512874908 (127.0.0.1) 1119.38ms referer=http://localhost:8888/lab
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2023-02-02 17:43:49 UTC
I've also encountered this problem while working on some other port.
py-build fails on ports that depend on devel/py-jupyterlab.

Will update importlib_metadata soon.
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2023-02-04 07:09:40 UTC
Update of devel/py-importlib-metadata to 6.0.0 is committed.
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-02-04 07:10:16 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=89168e9675f410fdf3e9f983eb95c98603cec0c7

commit 89168e9675f410fdf3e9f983eb95c98603cec0c7
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-02-04 07:05:43 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-02-04 07:05:43 +0000

    devel/py-importlib-metadata: Update 4.8.1 → 6.0.0

    Remove upper limitation on version in devel/py-poetry because it
    doesn't change tests outcome.

    This unbreaks devel/py-jupyterlab and also opens path for several
    other ports that depend on the newest devel/py-importlib-metadata
    versions.

    PR:             269125
    Approved by:    portmgr (unbreak devel/py-jupyterlab)

 devel/py-importlib-metadata/Makefile | 7 ++++---
 devel/py-importlib-metadata/distinfo | 6 +++---
 devel/py-poetry/Makefile             | 2 +-
 3 files changed, 8 insertions(+), 7 deletions(-)