-
Notifications
You must be signed in to change notification settings - Fork 12
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
rename open_text to open, and open to _open #20
base: master
Are you sure you want to change the base?
Conversation
Restore synch with the VisiData v3.1.1 parallel version of unzip_http.py.
The renaming of these functions was necessary for |
@@ -260,8 +260,8 @@ def open(self, fn): | |||
else: | |||
error(f'unknown compression method {method}') | |||
|
|||
def open_text(self, fn): | |||
return io.TextIOWrapper(self.open(fn)) | |||
def open(self, fn): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ZipFile.open()
API should return a binary stream. So let's keep this as it was and fix VisiData instead.
This is probably vestigial. The interface for RemoteZipFile should be as close to ZipFile as possible. So we should be able to combine these into one check (unfortunately I don't believe RemoteZipFile can inherit from ZipFile though) and always use |
@saulpw It's likely not vestigial, but I'll need a bit of time to dig up the old issues and PRs where we discussed why this change was necessary! |
This is the collection of all the issues that related to this: saulpw/visidata#2110 |
Basically, loading + extracting zip files needed to work locally and remotely: saulpw/visidata@0e1afd8 |
Restore synch with the VisiData v3.1.1 parallel version of unzip_http.py.