Skip to content

Commit 76bbbcd

Browse files
committed
PR feedback
1 parent 6187963 commit 76bbbcd

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

CHANGES/718.bugfix.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
Fix bug where FrozenList could not be pickled/unpickled.
1+
Fixed a bug where FrozenList could not be pickled/unpickled.
2+
3+
Pickling is a requirement for FrozenList to be able to be passed to multiprocessing Processes. Without this
4+
fix, users receive a TypeError upon attempting to pickle a FrozenList.
25
-- by :user:`csm10495`.

frozenlist/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import types
44
from collections.abc import MutableSequence
55
from functools import total_ordering
6-
from typing import Any
76

87
__version__ = "1.8.1.dev0"
98

@@ -105,7 +104,7 @@ def __reduce__(self):
105104
)
106105

107106

108-
def _reconstruct_pyfrozenlist(items: list[Any], frozen: bool) -> "PyFrozenList":
107+
def _reconstruct_pyfrozenlist(items: list[object], frozen: bool) -> "PyFrozenList":
109108
"""Helper function to reconstruct the pure Python FrozenList during unpickling.
110109
This function is needed since otherwise the class renaming confuses pickle."""
111110
fl = PyFrozenList(items)

0 commit comments

Comments
 (0)