gh-137855: Improve import time of `pathlib` (GH-146327)

Improve import time of pathlib
2 files changed