`.next()` is not Python 3 compatible, please use `next(_primitive_root_prime_iter(p))`.