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

Correctly pass boto3 resource to writers #576

Merged
merged 4 commits into from Jan 15, 2021

Conversation

jackluo923
Copy link
Contributor

@jackluo923 jackluo923 commented Jan 3, 2021

Title

Fixed bug where boto3 resource are ignored for object upload

Motivation

@mpenkov
Copy link
Collaborator

mpenkov commented Jan 3, 2021

Thanks for picking this up! Can you please add some tests?

@jackluo923
Copy link
Contributor Author

@mpenkov Would extending test_minio.py under the test directory to handle write request in addition to read request be okay or a separate test file is needed?

@mpenkov
Copy link
Collaborator

mpenkov commented Jan 4, 2021

I think the best way to test this would be a few new test cases in test_s3.py. You could wrap the resource in a Mock object and then check that the resource was correctly re-used by smart_open. Does that make sense?

@mpenkov mpenkov added the bug label Jan 4, 2021
@mpenkov mpenkov changed the title Fixed bug where boto3 resource are ignored for object upload Correctly pass boto3 resource to writers Jan 15, 2021
@mpenkov mpenkov merged commit 7a5fa77 into piskvorky:develop Jan 15, 2021
@mpenkov
Copy link
Collaborator

mpenkov commented Jan 15, 2021

I added the tests myself. Thank you for your contribution @jackluo923 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Boto3 resource ignored for s3 uploads
2 participants