Superconductivity and magnetism in La1−xPrxBa2Cu3Oy