Repository navigation
fix(streaming): keep CsvTransform options intact across repeated use - #8565
Conversation
d275445 to
551d5d9
Compare
leandrodamascena
left a comment
There was a problem hiding this comment.
Nice catch @ArfiArfath21, and thanks for the clear repro! I confirmed the second use of the same CsvTransform fails on develop and works with this change, with options left intact. Approving. Heads-up: this and #8566 touch the same import line in test_s3_object.py, so whichever lands second will need a quick rebase.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8565 +/- ##
========================================
Coverage 96.93% 96.93%
========================================
Files 318 318
Lines 15998 15999 +1
Branches 1419 1419
========================================
+ Hits 15507 15508 +1
Misses 349 349
Partials 142 142 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
CsvTransform.transform popped 'encoding' and 'newline' from its own transform_options, so reusing an instance (or letting S3Object re-create its transformed stream) silently fell back to utf-8. Work on a copy instead.
551d5d9 to
5ef2ce0
Compare
|
Rebased onto |
|
leandrodamascena
left a comment
There was a problem hiding this comment.
Re-approving after the rebase on top of #8566, the change is identical. Thanks!



Issue number: closes #8563
Summary
Changes
CsvTransform.transform()no longer popsencodingandnewlinefrom its owntransform_options; it works on a copy. Adds a regression test that applies oneCsvTransform(encoding="latin-1", delimiter=";")to two objects.User experience
Before: the second use of the same
CsvTransforminstance (or a re-createdS3Objecttransformed stream) silently decoded as UTF-8 and could raiseUnicodeDecodeErroror return wrong text. After: every use honours the configured options.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.
AI assistance disclosure: prepared with Claude Code; I reviewed the change and ran the tests locally.