You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A direct frozen BoxList cannot be pickled on develop (8364ce582dd4b4ff0d753e3efffa4b8675e809bc). The error occurs with every pickle protocol, including an empty list:
BoxList.__init__ installs a local function on the instance to reject mutating methods. Pickle serializes those instance attributes, but cannot reference a locally defined function. The guard does not capture any local state, so using a module-level guard would make it serializable while retaining the same mutation errors after loading.
Expected: pickle round-trips preserve the values, box_options, and the existing frozen mutation guards. Ordinary mutable lists should continue to round-trip and remain mutable.
This is separate from #260 / PR #322 (nested Box options lost during unpickling) and #308 / PR #309 (nested Box subclass selection). PR #58 addressed older Python 3.7 pickling and outer-list freezing, but the local-function failure remains on current develop. No existing issue/PR for this specific failure was found in the full PR history or frozen/BoxList pickle searches.
Reproduced with the pure-Python implementation on CPython 3.14.6 / macOS. The Cython implementation also needs validation before submitting a fix. The contribution target is develop as specified in CONTRIBUTING.rst.
Activity