for PETSc v3.20.0
Should work for v3.19.5 and v3.19.6 as well.
C codes (Chapters 1--12) were tested with PETSc v3.20.0 (commit 38aca504f6).
Python codes (Chapters 13--14) were tested with Firedrake commit 3fb16ad47.
Test machine: thelio Ubuntu 22.04.3 LTS