Normalize fstail output on Python 3
The only remaining test failures are due to changed pickle sizes. I've discovered two reasons for that so far: 1) Python 3 pickles 'native strings' as BINUNICODE, Python 2 pickles 'native strings' as SHORT_BINSTRING, which is 3 bytes shorter. 2) Python 3 and also the 'pickle' module Python 2 pickles tuples like (UserDefinedClass, ) with an extra BINPUT opcode at the end, compared to 'cPickle' in Python 2 when given the same tuple: Python 2.7.3 (default, Sep 26 2012, 21:51:14) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pickle, cPickle >>> class MyClass(object): pass ... >>> len(pickle.dumps((MyClass, None), 1)) 26 >>> len(cPickle.dumps((MyClass, None), 1)) 24 The plan is to switch to zodbpickle instead of the builtin Python 3 pickle, then use encoding=bytes from http://bugs.python.org/issue6784 and fix the class-in-tuple encoding to match Python 2's cPickle.
Showing
Please register or sign in to comment