Correct way to remove all file extensions from a path with pathlib?

If filename.suffixes has multiple extensions eg ('.gz','.foo') it
will strip 7 characters from the end of the file, wrong behaviour
regardless of the actual extension.

Cheers,
Cameron Simpson cs@cskk.id.au