You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "~/scratch/wrapt_bug.py", line 16, in <module>
print(type(A.add))
AttributeError: 'builtin_function_or_method' object has no attribute '__get__'
If the wrapt patches are removed (commenting out everything before line 9 (import operator)), the program runs as expected
passes my tests, which include more complex uses than the reproducer I showed. I don't have a very complete understanding of descriptors though, so I may be overlooking edge cases. My change to update the condition based on isbuiltin was inspired by this StackOverflow answer: https://stackoverflow.com/a/52140735 . Hopefully it helps guide you all if I misunderstood the response.
Lastly, I'm new to wrapt and tried to read through all the documentation before opening this issue. If I'm misusing the package, please let me know!
The text was updated successfully, but these errors were encountered:
This issue is similar to #256 , but throws a different exception that might be easier to resolve.
Reproducer
Running this program gives
If the wrapt patches are removed (commenting out everything before line 9 (
import operator
)), the program runs as expectedAdditional Details
The
AttributeError
is being thrown onwrapt/src/wrapt/wrappers.py
Line 534 in 5c0997c
Experimenting locally, I found that updating the condition from
passes my tests, which include more complex uses than the reproducer I showed. I don't have a very complete understanding of descriptors though, so I may be overlooking edge cases. My change to update the condition based on
isbuiltin
was inspired by this StackOverflow answer: https://stackoverflow.com/a/52140735 . Hopefully it helps guide you all if I misunderstood the response.Lastly, I'm new to wrapt and tried to read through all the documentation before opening this issue. If I'm misusing the package, please let me know!
The text was updated successfully, but these errors were encountered: