Skip to content

Version check crashes with ValueError: invalid literal for int() with base 10: '0a0' for ipykernel 7.0.0a0 #827

@pllim

Description

@pllim

This line broke when pre-release is available (e.g., ipykernel==7.0.0a0):

ipykernel_version = tuple(map(int, ipykernel.__version__.split(".")))

>   ipykernel_version = tuple(map(int, ipykernel.__version__.split(".")))
E   ValueError: invalid literal for int() with base 10: '0a0'

If you switch to, say, packaging.version.Version check and take account of pre- or dev releases, then it would guard against such breakage.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions