I'm unable to build Python 3.6.12 using PyEnv on macOS 13.0 as well as Ubuntu 22.10. Bumping the patch version fixes that issue on both systems.
A workaround is to add .python-version to your local git excludes and then do pyenv local 3.6.15, but this won't persist when you switch branches. Another workaround is to disable pyenv, but then you're potentially not running the test suite against the oldest supported Python version.