That existence of two classes of mortal and venial sins is given by the Council of Trent, session 6, chapter 11, also canons 23-25; session 14, chapter 5).
Session 6, 11:
“From which it is plain, that those are opposed to the orthodox doctrine of religion, who assert that the just man sins, venially at least, in every good work…”
CANON XXIII.-lf any one saith, that a man once justified can sin no more, nor lose grace, and that therefore he that falls and sins was never truly justified; or, on the other hand, that he is able, during his whole life, to avoid all sins, even those that are venial,-except by a special privilege from God, as the Church holds in regard of the Blessed Virgin; let him be anathema.
CANON XXIV.-If any one saith, that the justice received is not preserved and also increased before God through good works; but that the said works are merely the fruits and signs of Justification obtained, but not a cause of the increase thereof; let him be anathema.
CANON XXV.-If any one saith, that, in every good work, the just sins venially at least, or-which is more intolerable still-mortally, and consequently deserves eternal punishments; and that for this cause only he is not damned, that God does not impute those works unto damnation; let him be anathema.
Session 14, 5:
…
But, whereas all mortal sins, even those of thought, render men children of wrath, (b) and enemies of God, it is necessary to seek also for the pardon of them all from God, with an open and modest confession.
…
thecounciloftrent.com/ch6.htm