@craftyguy best thing would be to make sure that your upstream python packages actually work with python 3.12 and pytest 8 and have a release tagged with all the needed fixes.
For most issues I have bumped into so far there are fixes upstream, but no new release. The time is spent on finding and backporting the correct patch.