Skip to content

use _value2member_map_ for enum value check (Python 3.11 compatibility)#25

Open
chobitsfan wants to merge 1 commit into
openmv:masterfrom
chobitsfan:fix_py_3_11
Open

use _value2member_map_ for enum value check (Python 3.11 compatibility)#25
chobitsfan wants to merge 1 commit into
openmv:masterfrom
chobitsfan:fix_py_3_11

Conversation

@chobitsfan
Copy link
Copy Markdown

The in operator for Enum classes was updated to support value lookups, but in 3.11 and earlier it raises a TypeError: unsupported operand type(s) for 'in': 'int' and 'EnumType'.

3.11 is the latest python version for Raspberry Pi Bookworm / Debian 12.

Tested on a Raspberry Pi (Bookworm / Debian 12, Python 3.11) and a laptop (Ubuntu 24.04, Python 3.12)

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

Successfully merging this pull request may close these issues.

1 participant