Skip to content

Cannot use integers as vertex names #693

@theCapypara

Description

@theCapypara

Describe the bug
Version 0.10.5 of python-igraph introduced a breaking change: It is no longer possible to use integers as vertex names.
In previous versions this was allowed and functioned, I see nothing in the documentation for add_vertex that indicates that this wasn't allowed. This change breaks existing code that used integers as vertex names.

To reproduce
Use python-igraph 0.10.5, create a simple graph and try to add a vertex with a name that is an integer. The following exception is raised:

File ".../site-packages/igraph/basic.py", line 61, in _add_vertex
    raise TypeError("cannot use integers as vertex names; use strings instead")
TypeError: cannot use integers as vertex names; use strings instead

Version information
python-igraph 0.10.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions