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

Fix __str__ method in SinglepartWriter #791

Merged
merged 4 commits into from
Feb 22, 2024

Conversation

ThosRTanner
Copy link
Contributor

@ThosRTanner ThosRTanner commented Nov 24, 2023

Title

Fix str method in SinglepartWriter

Motivation

The bug here means that whenever you open an s3 connection and switch multipart writing off because the file is small, although the write completes successfully, you get an exception thrown when the code logs a debug message saying it has finished. This makes it look like your transfer has failed.

Tests

Added test

Checklist

Before you create the PR, please make sure you have:

  • Picked a concise, informative and complete title
  • Clearly explained the motivation behind the PR
  • Linked to any existing issues that your PR will be solving
  • Included tests for any new functionality
  • Checked that all unit tests pass

Workflow

Please avoid rebasing and force-pushing to the branch of the PR once a review is in progress.
Rebasing can make your commits look a bit cleaner, but it also makes life more difficult from the reviewer, because they are no longer able to distinguish between code that has already been reviewed, and unreviewed code.

@ThosRTanner ThosRTanner marked this pull request as ready for review November 25, 2023 08:20
@cadnce
Copy link
Contributor

cadnce commented Jan 9, 2024

Nice. LGTM!

@piskvorky piskvorky requested a review from mpenkov January 9, 2024 09:35
@mpenkov
Copy link
Collaborator

mpenkov commented Feb 20, 2024

@ThosRTanner Could you please enable maintainer edits for this PR?

@ThosRTanner
Copy link
Contributor Author

@mpenkov According to my browser, it is enabled

@mpenkov mpenkov merged commit 101bc0d into piskvorky:develop Feb 22, 2024
21 checks passed
@mpenkov
Copy link
Collaborator

mpenkov commented Feb 22, 2024

OK, thank you!

ddelange added a commit to ddelange/smart_open that referenced this pull request Feb 22, 2024
…open into patch-2

* 'develop' of https://github.com/RaRe-Technologies/smart_open:
  fix test, for real this time
  update integration test
  Add advanced usage sections to README.rst (piskvorky#741)
  Add logic for handling large files in MultipartWriter uploads to s3 (piskvorky#796)
  Fix __str__ method in SinglepartWriter (piskvorky#791)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

S3 SinglePartWriter doesn't work
3 participants