Python 3 support in core library