Skip to content

readable() from File Object from aws_encryption_sdk.stream always False #73

@Redoubts

Description

@Redoubts

I'm trying to upload a file to an S3 bucket with boto3's upload_fileobj. I wanted to create an StreamEncryptor so that I could chain together the encryption and upload without much copying. But I find that the StreamEncryptor object won't take because it's not compatible.

Compatibility means calling readable() on the object if it exists, and ensuring it returns True. But in this case, my stream object returns False on the call. This is unexpected, because I can call read() and get data -- which seems wrong because False means read() should raise an error.

I can't see where readable is implemented in this class, it seems deep in the base/meta class. But maybe it's not implemented at all and defaulting to this value. But I think it should either return a semantically correct value, or not have this function at all.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions