Graham Dumpleton
Graham Dumpleton
Latest version of wrapt requires Python 3.6+ and in https://github.com/GrahamDumpleton/wrapt/pull/261 someone recently suggested requiring Python 3.8+. So maybe someone wants to have a go at a separate PR now which...
Not sure. There has to be special code for certain dunder attributes in the pure Python implementation because of how the Python object model works. ``` class _ObjectProxyMethods(object): # We...
Do you get a nice stack traceback so we know which access is the problem?
This may have more to do with strange Python rules about lookup order for `__doc__` when mixing Python derived class, with C base class vs Python base class. Behaviour between...
The disparity with the C object proxy base class will be because it uses a C level getter/setter function slot for handling access to `__doc__`. A property in pure Python...
Wasn't a case of choosing one over the other for a reason. When doing C based Python objects you just use the most obvious mechanism it provides for it. These...
If the question was more around why bother with C implementation at all, was because back in Python 2.X days when machines were slower, any pure Python overhead could be...
Thanks for the confirmation that raising `AttributeError` avoids issue as suspected it might. The trick of using multiple inheritance so the exception type is both `AttributeError` and `ValueError` is also...
Are you using a callable for `enabled` or a literal boolean?
Yeah, for that use case it would indeed be helpful. The `enabled` argument being able to be a callable was only added sometime after the patching functions were created and...