Skip to content

[Python 3] Invalid type in validation of user property sheet values #58

@mliebischer

Description

@mliebischer

Just found a Python 3 incompatibility at:

PropertySchema.addType(
'long',
lambda x: x is None or isinstance(x, long)

The data type long does not exists anymore in Python 3. long has become int with Python 3.

Possible fix for Python 2 and 3:

PropertySchema.addType(
    'long',
    lambda x: x is None or isinstance(x, six.integer_types)
)

From six documentation:

six.integer_types
Possible integer types. In Python 2, this is long and int, and in Python 3, just int.

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