currently CPython development does not have mandatory code reviews. Any core developer is free to push a commit without review by another core dev. Reviews by domain experts (CODEOWNERS) are not enforce as well.
I’m considering to write a PEP to make code reviews mandatory even for core developers. It’s my strong believe that reviews increase code quality and act as knowledge transfer mechanism to reduce the infamous bus factor.
The gist of my PEP idea is:
- PR must be reviewed and approved by another core developer.
- If a file has one or more experts (
code owners), than one expert must approve the PR.
- If no expert responds in reasonable time (days to weeks depending on urgency), then either two core devs or a release manager can approve. In general this should only be done for bug fixes and not for new features.
What do you think?
PS: @Mariatta has reminded me that the automergebot requires review by another core devs. My proposals boils down to: always use the bot and make good use of experts.
- yes, make code reviews mandatory.
- no, keep the current status.