Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:
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 )) ---------- type: crash -> behavior _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38254> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com