Is your feature request related to a problem? Please describe.
FloPy currently expects strings for some path parameters (files/dirs to read from or write to, etc). #1712 recently added support for pathlib.Path to some internals, allowing path-like objects to be passed e.g. to MFSimulation's ctor.
Describe the solution you'd like
Extending path-like support to all user-facing APIs would be convenient for use with modern pathlib.Path, removing the need to wrap with str(...), without breaking existing string usages. Type hint Union[str, os.PathLike] could be used in the spirit of PEP 519 — further SO discussions here and here. In many cases Path/path-like are already implicitly supported and docstrings could just be updated, but this is not universally true and some refactoring would be needed.
Is your feature request related to a problem? Please describe.
FloPy currently expects strings for some path parameters (files/dirs to read from or write to, etc). #1712 recently added support for
pathlib.Pathto some internals, allowing path-like objects to be passed e.g. toMFSimulation's ctor.Describe the solution you'd like
Extending path-like support to all user-facing APIs would be convenient for use with modern
pathlib.Path, removing the need to wrap withstr(...), without breaking existing string usages. Type hintUnion[str, os.PathLike]could be used in the spirit of PEP 519 — further SO discussions here and here. In many casesPath/path-like are already implicitly supported and docstrings could just be updated, but this is not universally true and some refactoring would be needed.