The code for the pure-Python backend lives in google/protobuf/internal The order given above is the general priority order, with upb being preferred the most and the python backend preferred the least ...