tmpdir is a legacy interface, and we're actually detecting that they have a read method in some cases and reading their contents to bytes in get_vsi_path, which is not what we should be doing.
Among other things, using tmp_path instead allows us to pass these in as pathlib.Path objects, which we can specifically check for and convert to strings before subsequent processing.
tmpdir
is a legacy interface, and we're actually detecting that they have aread
method in some cases and reading their contents to bytes inget_vsi_path
, which is not what we should be doing.Among other things, using
tmp_path
instead allows us to pass these in aspathlib.Path
objects, which we can specifically check for and convert to strings before subsequent processing.