#PyPA #virtualenv is yet another #Python project that "optimizes" its test suite by using time-machine. Since time-machine works on CPython only, it also keeps supporting #freezegun but you are allowed to use it on PyPy only now.
I really do wonder if this "optimization" actually makes anything faster, and if it outweighs the added complexity. The complexity also falls on downstreams (#Gentoo).
But that's modern development for you! "Shiny! Must have it!"
https://github.com/pypa/virtualenv/commit/fd93dd79be89b21e6e9d43ca2dd1b02b811f6d6f
It gets even better. The test suite now fails if timezone is not UTC — but only when using time-machine. Freezegun works just fine. Makes lots of sense.
@mgorny The scope of this commit perplexes me. It says it stops installing setuptools/wheel for 3.12+ environments, yet it changes the time freezer, adds type hints here and there, removes some pip-related workarounds from the tests... This will be challenging to backport (as we cannot update virtualenv in Fedora due to us still supporting Python 3.6 and 2.7 in tox for folks who need to target RHEL 8 or 7).
@mgorny It seems that freezegun is uninstallable with pip on Python 3.12, which is most likely the reason for this change, but I have to guess.
@hroncok, yeah, my assumption about it being an optimization could have been wrong. Though I'd have preferred if we had one package that worked everywhere...