python-autoclass icon indicating copy to clipboard operation
python-autoclass copied to clipboard

Attempt to fix issue #43

Open erocarrera opened this issue 4 years ago • 2 comments

This PR successfully silences the error so autoclass works with Python 3.9. I have not investigated the code in depth to be cable to guarantee it as a full solution.

erocarrera avatar Apr 19 '21 22:04 erocarrera

Thanks a lot @erocarrera ! Sorry for not spotting your PR sooner.

As commented above, it seems that you modified a try/except branch that was dedicated to a special case of python 2... So the issue is rather to understand why the code on python 3.8+ enters this branch at all, in other words to understand why

cls.__bases__ = new_bases

fails in the first place.

smarie avatar May 11 '21 09:05 smarie

(replying to https://github.com/smarie/python-autoclass/pull/44#discussion_r697876595 )

Perfect @erocarrera thanks for the feedback ! Indeed moving to pyfields when possible is probably a better choice. I did not yet found time to fix this autoclass issue, sorry :( we'll see if many users are interested or if they all move away to pyfields, attrs, dataclasses and the like

smarie avatar Aug 31 '21 11:08 smarie