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

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

Open
mliebischer opened this issue Jun 23, 2020 · 0 comments
Open

Comments

@mliebischer
Copy link

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.

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

1 participant