Skip to content

python3 update

Xiaowu Zhang requested to merge mergezope4py3 into master

here are changes that are not compatible in py2 and py3, i use six to keep compatibility

Changes

  1. Data Mapping can't support different data type inside now

    if you first push list, then tuple, it will raise error

    the reason is Data Mapping use BTrees (like OLBTree from Zope/BTrees package) which use keys that must be comparable with < because they are internally stored in a sorted structure.

    but in py3, it raise error when compare between different types, for example, tuple and list

       TypeError: '<' not supported between instances of 'tuple' and 'list'

    i think it's hard to make it supported, so only update test for now

  2. use six to keep compatibility in py2&3 i.e. use if six.PY2 ... else ...

  3. df.to_records has no more convert_datetime64 parameter in recent pandas

    so i remove this parameter in test, the tests are always passed :)

Edited by Xiaowu Zhang

Merge request reports