Skip to content

Commit 7e62fde

Browse files
committed
Drop the pickle/deepcopy singleton support of DEFAULT_FILL_VALUE
Nothing in the package pickles, and the sentinel is always resolved inside an aggregate call. The only case __reduce__ protected - transporting the unresolved sentinel through pickle or deepcopy and passing it back in - is not a realistic scenario; multiprocessing workers import the module themselves, so the singleton exists natively in every process anyway.
1 parent 87948f0 commit 7e62fde

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

‎numpy_groupies/aggregate_common.py‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,6 @@ class _DefaultFillValue:
127127
def __repr__(self):
128128
return "DEFAULT_FILL_VALUE"
129129

130-
def __reduce__(self):
131-
# keep the singleton through pickling and deepcopy
132-
return (_get_default_fill_value, ())
133-
134-
135-
def _get_default_fill_value() -> _DefaultFillValue:
136-
return DEFAULT_FILL_VALUE
137-
138130

139131
DEFAULT_FILL_VALUE = _DefaultFillValue()
140132

0 commit comments

Comments
 (0)