python3.7+ supports hash-based cache generation for build reproducibility. Additionally there is a choice to use unchecked hash-based cache or whatnot: "Hash-based .pyc files come in two variants: checked and unchecked. Python validates checked hash-based .pyc files against the corresponding source files at runtime but doesn’t do so for unchecked hash-based pycs. Unchecked hash-based .pyc files are a useful performance optimization for environments where a system external to Python (e.g., the build system) is responsible for keeping .pyc files up-to-date." This seems relevant to us for use from python_optimize, distutils and elsewhere for python3.7 and newer package owned cache files.
I see https://github.com/gentoo/gentoo/commit/7a9b4f552e4c93525ab8d3a353bf8c4c1aee5537 but not the same thing, I think?
To be honest, I don't think this is a good idea for Gentoo. At least some of Gentoo users are used to being able to edit .py files in site-packages to test something, and making that suddenly (partially) ineffective would be confusing.
Given no further arguments, I still think this is not a good idea.