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
{{ message }}
Repository navigation
check whether safeCPickleDumps(obj): is still needed #189
@sbillinge this method ensures that an object is serialized even if it contains problematic floating-point values by falling back to a simpler serialization protocol if the default one fails.
In Python 3, the pickle module uses more recent protocols, and the SystemError related to frexp() is less likely to occur. So I think the fallback to ASCII protocol (protocol 0) is not necessary any more.
@sbillinge This is along with the utf-8 string issue when dropping py2 support. As I mentioned before this is for serialization protocols. Even if the related error (SystemError related to frexp() as I saw people mentioned) is less likely to occur in py3, it's still no harm to just follow a simpler serialization protocol and have files in the basic ASCII encoding. Also another reason is this function is still being used by other modules so some changes and tests are needed before removing this function.
If we are shooting for cleaning things up as much as possible, then we still want to keep this issue.
This may be another py2 compatibility function. Check where it is used and whether it can be removed.
Write tests to make sure the behavior is still handled.