Upstream also hit what was probably this bug when they moved to R 4.6.x.
Their response was to remove the feature that triggers it (which they
seem to think was the only option):
https://github.com/rpy2/rpy2/pull/1241/files#diff-59f3fd61503526281cb537669c488964788676ef0e7c7f648e398d84092668a3
The 3.6.7 package currently being tested on Salsa follows upstream in
removing the feature, but you are welcome to disagree.
(Due to unrelated issues with the R 4.5 -> 4.6 transition, this will not
immediately get rpy2 (or statsmodels) back into testing.)