gh-66143: Allow copying and pickling of CodecInfo object (GH-109235)

Co-authored-by: Robert Lehmann <mail@robertlehmann.de>
This commit is contained in:
Furkan Onder 2023-09-29 20:07:09 +03:00 committed by GitHub
parent 7d57288f6d
commit 3439cb0049
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 75 additions and 0 deletions

View file

@ -111,6 +111,9 @@ class CodecInfo(tuple):
(self.__class__.__module__, self.__class__.__qualname__,
self.name, id(self))
def __getnewargs__(self):
return tuple(self)
class Codec:
""" Defines the interface for stateless encoders/decoders.