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

Add zstandard compression feature #801

Merged
merged 4 commits into from
Feb 20, 2024
Merged

Add zstandard compression feature #801

merged 4 commits into from
Feb 20, 2024

Conversation

rlrs
Copy link
Contributor

@rlrs rlrs commented Feb 17, 2024

Adds zstandard compression support, as requested in #799.

I made it an optional feature, because it looks like every other feature that has dependencies is also an optional feature.
Obviously this means that the tests only work if the feature is installed.

@mpenkov
Copy link
Collaborator

mpenkov commented Feb 19, 2024

Whoops, looks like the linters failed. Can you please fix the error and push?

@mpenkov
Copy link
Collaborator

mpenkov commented Feb 20, 2024

Never mind, fixed it myself. Thanks for taking care of this!

@mpenkov mpenkov merged commit 403124c into piskvorky:develop Feb 20, 2024
21 checks passed
ddelange added a commit to ddelange/smart_open that referenced this pull request Feb 21, 2024
…open into patch-2

* 'develop' of https://github.com/RaRe-Technologies/smart_open:
  Propagate __exit__ call to underlying filestream (piskvorky#786)
  Retry finalizing multipart s3 upload (piskvorky#785)
  Fix `KeyError: 'ContentRange'` when received full content from S3 (piskvorky#789)
  Add support for SSH connection via aliases from `~/.ssh/config` (piskvorky#790)
  Make calls to smart_open.open() for GCS 1000x faster by avoiding unnecessary GCS API call (piskvorky#788)
  Add zstandard compression feature (piskvorky#801)
  Support moto 4 & 5 (piskvorky#802)
  Secure the connection using SSL when connecting to the FTPS server (piskvorky#793)
  upgrade dev status classifier to stable (piskvorky#798)
  Fix formatting of python code (piskvorky#795)
@ddelange
Copy link
Contributor

Hi 👋

This PR only adds support for reading. @rlrs can you open another PR to fix writing?

In [1]: from smart_open import open

In [2]: with open('~/Downloads/test.zst', 'w') as fp:
   ...:     fp.write('abc')
   ...:
---------------------------------------------------------------------------
UnsupportedOperation                      Traceback (most recent call last)
Cell In[2], line 2
      1 with open('~/Downloads/test.zst', 'w') as fp:
----> 2     fp.write('abc')

UnsupportedOperation: not writable

@mpenkov
Copy link
Collaborator

mpenkov commented Mar 21, 2024

Can you have a look at #812 @ddelange?

If it looks good, we'll make another bugfix release.

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.

3 participants