Message353102
Thanks for the clarification and the answer link. I was also just debugging along the similar lines around how OSError.__reduce__ treats the arguments something like. Custom __reduce__ for aiohttp works as explained in the SO answer.
class SubOSError(OSError):
def __init__(self, foo, os_error, /):
self.foo = foo
self.os_error = os_error
super().__init__(os_error.errno, os_error.strerror)
def __reduce__(self): # Custom __reduce__
return (self.__class__, (self.foo, self.os_error ))
def __reduce__(self): # OSError __reduce__
return (self.__class__, (self.os_error.errno, self.os_error.strerror )) |
|
Date |
User |
Action |
Args |
2019-09-24 17:04:59 | xtreak | set | recipients:
+ xtreak, serhiy.storchaka, davidparks21 |
2019-09-24 17:04:59 | xtreak | set | messageid: <1569344699.23.0.597520688684.issue38254@roundup.psfhosted.org> |
2019-09-24 17:04:59 | xtreak | link | issue38254 messages |
2019-09-24 17:04:59 | xtreak | create | |
|