Skip to content

Commit 90cc615

Browse files
Merge pull request #126 from musicinmybrain/py3.12
Replace IndexedGzipFile.__reduce__ with IndexedGzipFile.__reduce_ex__
2 parents 16229b9 + 4a6b3a1 commit 90cc615

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

indexed_gzip/indexed_gzip.pyx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,11 @@ class IndexedGzipFile(io.BufferedReader):
169169
return self.read(nbytes)
170170

171171

172-
def __reduce__(self):
172+
def __reduce_ex__(self, protocol):
173173
"""Used to pickle an ``IndexedGzipFile``.
174174
175+
:arg protocol: Pickle protocol version
176+
175177
Returns a tuple containing:
176178
- a reference to the ``unpickle`` function
177179
- a tuple containing a "state" object, which can be passed
@@ -1093,7 +1095,7 @@ def unpickle(state):
10931095
"""Create a new ``IndexedGzipFile`` from a pickled state.
10941096
10951097
:arg state: State of a pickled object, as returned by the
1096-
``IndexedGzipFile.__reduce__`` method.
1098+
``IndexedGzipFile.__reduce_ex__`` method.
10971099
10981100
:returns: A new ``IndexedGzipFile`` object.
10991101
"""

0 commit comments

Comments
 (0)