Except JPII goes on to say in his catechism:
If, however, non-lethal means are sufficient to defend and protect people's safety from the aggressor, authority will limit itself to such means, as these are more in keeping with the concrete conditions of the common good and more in conformity to the dignity of the human person. Today, in fact, as a consequence of the possibilities which the state has for effectively preventing crime, by rendering one who has committed an offense incapable of doing harm - without definitely taking away from him the possibility of redeeming himself - the cases in which the execution of the offender is an absolute necessity "are very rare, if not practically non-existent."
So, although JPII makes mention of traditional Catholic teaching, he most certainly gives the impression that it is no longer applicable.
Is it any wonder why Francis believes and teaches as he does?
JPII was wrong on the death penalty.