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

Require Python >= 3.10 (broken on older versions) #1914

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

manics
Copy link
Member

@manics manics commented Jan 25, 2025

The BinderHub Python metadata claims to support Python 3.8, but this isn't tested, and the code base now contains some syntax that requires Python 3.10.

The alternative to bumping the minimum version is to ensure the code is compatible with 3.8 (or 3.9).

BinderHub is broken on Python 3.8:

```
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/runner/work/binderhub/binderhub/binderhub/__main__.py", line 2, in <module>
    from binderhub.app import main
  File "/home/runner/work/binderhub/binderhub/binderhub/app.py", line 45, in <module>
    from .base import VersionHandler
  File "/home/runner/work/binderhub/binderhub/binderhub/base.py", line 13, in <module>
    from .utils import ip_in_networks
  File "/home/runner/work/binderhub/binderhub/binderhub/utils.py", line 172, in <module>
    ip_addr: str, networks: Iterable[ipaddress.IPv4Network | ipaddress.IPv6Network]
```
BinderHub is broken on Python 3.9:

```
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/runner/work/binderhub/binderhub/binderhub/__main__.py", line 2, in <module>
    from binderhub.app import main
  File "/home/runner/work/binderhub/binderhub/binderhub/app.py", line 45, in <module>
    from .base import VersionHandler
  File "/home/runner/work/binderhub/binderhub/binderhub/base.py", line 13, in <module>
    from .utils import ip_in_networks
  File "/home/runner/work/binderhub/binderhub/binderhub/utils.py", line 172, in <module>
    ip_addr: str, networks: Iterable[ipaddress.IPv4Network | ipaddress.IPv6Network]
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants