-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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(python): Don't modify user-supplied storage_options
dict (take a shallow-copy)
#15859
fix(python): Don't modify user-supplied storage_options
dict (take a shallow-copy)
#15859
Conversation
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.
Can you add a test for this?
Ideally, we don't always copy, but we create a copy when we add the encoding entry. But that might be micromanaging things 😬
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15859 +/- ##
==========================================
+ Coverage 80.39% 81.37% +0.98%
==========================================
Files 1263 1378 +115
Lines 165387 176827 +11440
Branches 0 3032 +3032
==========================================
+ Hits 132957 143898 +10941
- Misses 32430 32444 +14
- Partials 0 485 +485
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
489b377
to
46156a2
Compare
Done (I think; slightly hard to prove locally as I can't run the AWS tests from here, but the amended test should trigger the relevant codepath).
It's probably safer to do it for everything that comes into this function; otherwise we may end up having the same error again if we extend use of |
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.
Looks good, thanks!
I'll merge when I've fixed the CI.
Closes #15849.
Closes #15850.