Adapt to new API by bogo-python