Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose certain transport-specific methods in top layer #664

Merged
merged 6 commits into from
Feb 19, 2022
Merged

Conversation

mpenkov
Copy link
Collaborator

@mpenkov mpenkov commented Oct 20, 2021

Fix #663

Our text decoding and decompression wrappers were hiding some important methods from the user.

It worked in earlier versions of smart_open because the wrappers were disabled by default (read mode was rb).

Also includes some documentation fixups.

@mpenkov mpenkov requested a review from piskvorky October 20, 2021 00:37
Copy link
Owner

@piskvorky piskvorky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really magicky.

Perhaps the layers of indirection/wrapping are necessary, but it makes me really uneasy as a user :(

smart_open/smart_open_lib.py Outdated Show resolved Hide resolved
@mpenkov
Copy link
Collaborator Author

mpenkov commented Oct 20, 2021

Is it the wrapping that's making you uneasy, or the magic to handle to_boto3?

@mpenkov
Copy link
Collaborator Author

mpenkov commented Oct 26, 2021

@piskvorky Ping

@piskvorky
Copy link
Owner

piskvorky commented Oct 26, 2021

Is it the wrapping that's making you uneasy, or the magic to handle to_boto3?

Here, it was the "vertical transfer of attributes" in particular.
But in general, the complexity of wrapping within smart_open makes reading it difficult (esp for new ppl) = magic. The explanatory comments are good though, I have no constructive suggestion. Just a sigh / observation.

@piskvorky piskvorky added this to the 6.0.0 milestone Feb 18, 2022
@mpenkov mpenkov merged commit cc73689 into develop Feb 19, 2022
@mpenkov mpenkov deleted the fix-663 branch February 19, 2022 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Example about querying content type is broken
2 participants