https://bugzilla.redhat.com/show_bug.cgi?id=2104977
Miro Hrončok mhroncok@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mhroncok@redhat.com, | |thrnciar@redhat.com
--- Comment #1 from Miro Hrončok mhroncok@redhat.com --- $ meld Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/meld/newdifftab.py", line 106, in on_button_type_toggled self.diff_type.supports_blank()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/meld/newdifftab.py", line 34, in supports_blank return self in (self.File, self.Folder) ^^^^^^^^^ File "/usr/lib64/python3.11/enum.py", line 198, in __get__ raise AttributeError( ^^^^^^^^^^^^^^^^^^^^^ AttributeError: <enum 'DiffType'> member has no attribute 'File'
This is caused by the removal of attribute access to other enum numbers. See e.g.
https://github.com/python/cpython/issues/87328 https://github.com/python/cpython/issues/93910
The enum maintainer insists on removing this functionality. It was already reverted in Python 3.10 but got back to 3.11, where it will probably be reverted again for performance reasons, but this will stop working at some point. Never access other enum members on self. Replace:
return self in (self.File, self.Folder)
With:
return self in (type(self).File, type(self).Folder)
(Or use a pre-saved `cls = type(self)` in case this happens in a loop etc.)
Let me know if you need my help.