Message 288137 - Python tracker
I got it. removeduppaths() may change relpath in sys.path to absolute path. abs_paths() changes __file__ and __cached__ for consistency with the changed sys.path. I updated PR 167 to call abs_paths() only if removeduppaths() modified sys.path. Strictly speaking, abs_paths() is required only when removeduppaths() converted relpath to absolute path. But because duplicated paths are rare too, I think this approach is practical enough.