1. Need to wait for pytest 8 to actually be released. 2. Need to wait a bit more after that for downstream to catch up a little (a year?). Then we can simplify the stuff done in https://github.com/astropy/astropy/pull/15054