[3.12] gh-109782: Ensure os.path.isdir has the same signature on all platforms (GH-109790)
#110233
+15
−13