Is it possibel for fabric.{put, get} to support Pathlib.Path constructs
Author: sandeep-ghCreated Jan 19, 2025Updated Aug 10, 2026
LabelsFeatureNeeds patch
Right now passing a Path object yields error:
File "/home/adming/Execution/cloudworks/venv/lib/python3.12/site-packages/fabric/connection.py", line 897, in get
return Transfer(self).get(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adming/Execution/cloudworks/venv/lib/python3.12/site-packages/fabric/transfer.py", line 137, in get
local = local.format(
^^^^^^^^^^^^
AttributeError: 'PosixPath' object has no attribute 'format'Can we support Path implicitly instead of typecast to str.
Thanks
- s
Source: fabric/fabric