use six instead of IPython.py3compat