Repository navigation
Fix enum py310 - #985
Fix enum py310#985tacaswell wants to merge 3 commits into
Conversation
Python 3.10 makes a number of changes to Enum and its sub-classes. Under the new default behavior of IntFlag the fact that we have `0b1b1` as a flag, but not `0b100` is considered a class definition time error (preventing import of ophyd). This opts back into allowing our (unorthodox) definition to import again and hides the new features behind a version gate. python/cpython#24215
|
Some rethinking of the enum will indeed be necessary (see previous PR/issue attempting to change the values), but agreement on what should be done will be the tough part. |
Is that not always the case ? |
prjemian
left a comment
There was a problem hiding this comment.
Anything that makes Kind easier to understand will be welcome. I am not committed to anything other than the single name use cases (omitted, config, normal, hinted, and not the multiple cases such as this contrived example: omitted | config).
|
In practice we seem to have a simple ordering of |
|
It looks like upstream is going to back off of this change (by default) https://bugs.python.org/issue44242#msg394593 so this should be put on hold. |
|
This did get reverted upstream, closing. |
We may want to take this as an opportunity to re-think the Kind enum?
Python 3.10 makes a number of changes to Enum and its sub-classes. Under the new default behavior of IntFlag the fact that we have
0b1b1as a flag, but not0b100is considered a class definition time error (preventing import of ophyd).This opts back into allowing our (unorthodox) definition to import again and hides the new features behind a version gate.
python/cpython#24215