Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Remove support for put_file_bytes with an iterable of bytes or strings #222

Open
ysimonson opened this issue Aug 17, 2020 · 0 comments
Open

Comments

@ysimonson
Copy link
Contributor

put_file_bytes with an iterable of bytes or strings is deprecated, as any of the alternatives are more pythonic and likely more efficient. It should be remove eventually (perhaps coinciding with pachyderm core v2.0 release?):

if isinstance(value, collections.abc.Iterable) and not isinstance(value, (str, bytes)):
warnings.warn(
"'put_file_bytes' with an iterable 'value' is deprecated, use file-like objects or bytestrings instead",
DeprecationWarning,
)
reqs = put_file_from_iterable_reqs(
value,
file=pfs_proto.File(commit=commit_from(commit), path=path),
delimiter=delimiter,
target_file_datums=target_file_datums,
target_file_bytes=target_file_bytes,
overwrite_index=overwrite_index,
header_records=header_records,
)
return self._req(Service.PFS, "PutFile", req=reqs)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant