I attend the older Latin Rite and we still fast from the midnight before. It should be noted that, as a disciplinary measure, to humble the spirit and body, it does not comprise any intrinsic doctrine or 'Tradition'. The Pope could remove the fast altogether if he so chose. It is to remind you that you are to recieve the Body, Blood, Soul and Divinity of Christ. You must fast in order to enter that holy place and celebration where such takes place.
Water and medicine are the only exceptions.
This was modified on by Bl. Pope Paul VI on November 21, 1964§, and are embodied in the canon (rule) you mentioned (919 [§1] of the New Code of Canon Law).
This practice is really quite ancient, though. It was not began by Pope Pius XII. For example, St. Thomas notes, even in the 12th century:
St. Thomas Aquinas, Summa Theologica, 3a Pars, Q80 a.8 Ad5
sacrament ought to enter into the mouth of a Christian before any
other food must not be understood absolutely of all time, otherwise he
who had once eaten or drunk could never afterwards take this
sacrament: but it must be understood of the same day; and although the
beginning of the day varies according to different systems of
reckoning (for some begin their day at noon, some at sunset, others at
midnight, and others at sunrise), the Roman Church begins it at
midnight. Consequently, if any person takes anything by way of food or
drink after midnight, he may not receive this sacrament on that day;
but he can do so if the food was taken before midnight.
Augstine writes in a letter to Januarius, (Letter 54) ~A.D 400:
...for from that time [of the earliest Church] it pleased the Holy
Spirit to appoint, for the honour of so great a sacrament, that the
body of the Lord should take the precedence of all other food entering
the mouth of a Christian; and it is for this reason that the custom
referred to is universally observed.
§ Paul VI, “Concession, on the eucharistic fast,” announced at a public session of Vatican Council II, November 21, 1964: AAS 57 (1965), 186, DOL 272.
You may find this short article useful.
EDIT: The portion of Acta Apostolicae Sedis 57 in question (unfortunately only in Latin) is “Tempus Eucharistici Ieiunii Servandi Reducitur”—the concession on the Eucharistic fast, and says:
In view of the difficulties felt in many countries concerning the
Eucharistic fast, the Supreme Pontiff, graciously acceding to the
petitions of the Bishops, grants that the fast from solid foods be
reduced to one hour before Communion, for both priests and the
faithful. In this grant is included also the use of alcoholic drinks,
observing, however, due moderation.