Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes on its imporing typing.BytesString with Python 3.14.0a2 #127

Open
kLiHz opened this issue Nov 22, 2024 · 1 comment
Open

Crashes on its imporing typing.BytesString with Python 3.14.0a2 #127

kLiHz opened this issue Nov 22, 2024 · 1 comment

Comments

@kLiHz
Copy link

kLiHz commented Nov 22, 2024

I recently ran Jupyter Lab on Python 3.14.0a2 and got errors like this (see log below). I checked Python 3.14's documentation and it says typing.ByteString is removed. Although Jupyter Lab doesn't seems to be using it, Python 3.14 crashes on .py imports that uses typing.ByteString (I commented out that line and Jupyter Lab seems to be working). Anyway, it's said to be deprecated since Python 3.9.

I'd like to do something but I don't think I'm familiar with these 😥, so I'm more like just reporting this. I hope it may help!

By the way, I'm not sure if there's other deprecations, but from overrides import overrides can be executed without errors after commenting out Line 50 of typing_utlis.py.

See Python Traceback
Traceback (most recent call last):
  File "/home/user/python-3.14.0a2/bin/jupyter-lab", line 5, in <module>
    from jupyterlab.labapp import main
  File "/home/user/python-3.14.0a2/lib/python3.14/site-packages/jupyterlab/__init__.py", line 8, in <module>
    from .handlers.announcements import (
    ...<3 lines>...
    )
  File "/home/user/python-3.14.0a2/lib/python3.14/site-packages/jupyterlab/handlers/announcements.py", line 15, in <module>
    from jupyterlab_server.translation_utils import translator
  File "/home/user/python-3.14.0a2/lib/python3.14/site-packages/jupyterlab_server/__init__.py", line 6, in <module>
    from .app import LabServerApp
  File "/home/user/python-3.14.0a2/lib/python3.14/site-packages/jupyterlab_server/app.py", line 10, in <module>
    from jupyter_server.extension.application import ExtensionApp, ExtensionAppJinjaMixin
  File "/home/user/python-3.14.0a2/lib/python3.14/site-packages/jupyter_server/extension/application.py", line 17, in <module>
    from jupyter_server.serverapp import ServerApp
  File "/home/user/python-3.14.0a2/lib/python3.14/site-packages/jupyter_server/serverapp.py", line 107, in <module>
    from jupyter_server.gateway.managers import (
    ...<3 lines>...
    )
  File "/home/user/python-3.14.0a2/lib/python3.14/site-packages/jupyter_server/gateway/managers.py", line 27, in <module>
    from ..services.kernels.kernelmanager import (
    ...<3 lines>...
    )
  File "/home/user/python-3.14.0a2/lib/python3.14/site-packages/jupyter_server/services/kernels/kernelmanager.py", line 27, in <module>
    from overrides import overrides
  File "/home/user/python-3.14.0a2/lib/python3.14/site-packages/overrides/__init__.py", line 8, in <module>
    from overrides.overrides import __VERSION__, overrides, override
  File "/home/user/python-3.14.0a2/lib/python3.14/site-packages/overrides/overrides.py", line 26, in <module>
    from overrides.signature import ensure_signature_is_compatible
  File "/home/user/python-3.14.0a2/lib/python3.14/site-packages/overrides/signature.py", line 6, in <module>
    from .typing_utils import get_args, issubtype
  File "/home/user/python-3.14.0a2/lib/python3.14/site-packages/overrides/typing_utils.py", line 50, in <module>
    typing.ByteString: bytes,  # https://docs.python.org/3/library/typing.html#typing.ByteString
    ^^^^^^^^^^^^^^^^^
  File "/home/user/python-3.14.0a2/lib/python3.14/typing.py", line 3831, in __getattr__
    raise AttributeError(f"module {__name__!r} has no attribute {attr!r}")
AttributeError: module 'typing' has no attribute 'ByteString'
@mkorpela
Copy link
Owner

Thanks @kLiHz ! Have to tackle this before the release https://peps.python.org/pep-0745/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants