Merge pull request #13927 from pytest-dev/patchback/backports/9.0.x/3d80757431c209eaae411909119bcc38a6847739/pr-13922
[PR #13922/3d807574 backport][9.0.x] config: fix `UserWarning: Do not expect file_or_dir` on some Python 3.12 and 3.13 point versions