Closed larsevj closed 10 months ago
One idea for resolving the issue caused by changes to enums in Python 3.11. The changes are mentioned here: https://github.com/python/cpython/issues/100458 https://discuss.python.org/t/inconsistent-behavior-with-python-3-11-enum-mixin-class-behavior/24613 https://docs.python.org/3.11/whatsnew/3.11.html
Note that with the changes I made there is still a difference between the data models for python pre 3.11 and after: With Python 3.10:
print(DataType.RESPONSE) # > DataType.RESPONSE
print(str(DataType.RESPONSE)) # > DataType.RESPONSE
print("%s" % DataType.RESPONSE) # > DataType.RESPONSE
print(f"{DataType.RESPONSE}") # > resp
print("{}".format(DataType.RESPONSE)) # > resp
With python 3.11 this becomes:
print(DataType.RESPONSE) # > resp
print(str(DataType.RESPONSE)) # > resp
print("%s" % DataType.RESPONSE) # > resp
print(f"{DataType.RESPONSE}") # > resp
print("{}".format(DataType.RESPONSE)) # > resp
Issue Resolves #https://github.com/equinor/ert/issues/6574
Approach Short description of the approach
Pre review checklist