Pathlib objects as glob template

Pathlib defines an API which has many implementation. The official “standard” one is the one in the standard library, but many other implementations exists which add s3, gcs, zipfile, git,…
Like:

To maintain consistency across those libraries, it’s important pathlib API supports the use-cases of those implementations.

Also see: https://discuss.python.org/t/make-pathlib-extensible