Closed cristianmatache closed 3 years ago
The difference is because there was a long standing bug in Python which I first reported back in 2013. They finally fixed it in Python 3.9.
So the behaviour of wrapt is correct based on how the respective Python versions worked.
The docs for wrapt mention this issue:
The docs need to be updated to mention that the behaviour in Python was finally corrected in Python 3.9 though.
Thank you @GrahamDumpleton. This is very interesting. It is nice that regular methods defined on a metaclass and methods decorated with @classmethod
on a regular class behave the same finally.
In the example above, in Python 3.9 the injected
args
don't include the class while in python 3.8 and lower,args
includes the class object.