Beyond iron, a small fraction of the total abundances in the Solar System is made of proton-rich isotopes, the p nuclei. The clear understanding of their production is a fundamental challenge for nuclear astrophysics. The p nuclei constrain the nucleosynthesis in core-collapse and thermonuclear supernovae. The γ process is the most established scenario for the production of the p nuclei, which are produced via different photodisintegration paths starting on heavier nuclei. A large effort from nuclear physics is needed to access the relevant nuclear reaction rates far from the valley of stability. This review describes the production of the heavy proton-rich isotopes by the γ process in stars, and explores the state of the art of experimental nuclear physics to provide nuclear data for stellar nucleosynthesis.