Uh oh!
There was an error while loading. Please reload this page.
GH-34577 [Python] Expose eol and null_string csv WriteOptions - #46976
GH-34577 [Python] Expose eol and null_string csv WriteOptions#46976MartinNowak wants to merge 1 commit into
Conversation
AlenkaF
commented
Jul 7, 2025
Thank you for submitting a PR!
|
34366df to
dd3ae8fCompare58c1bd0 to
6907545CompareAlenkaF
commented
Aug 11, 2025
The failures are connected, see: ______________________________test_write_options______________________________deftest_write_options():
cls=WriteOptionsopts=cls()
>check_options_class(
cls, include_header=[True, False], delimiter=[',', '\t', '|'],
eol=['\n', '\r\n'], null_string=['', 'NA'],
quoting_style=['needed', 'none', 'all_valid'])
opt/conda/envs/arrow/lib/python3.9/site-packages/pyarrow/tests/test_csv.py:362: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ opt/conda/envs/arrow/lib/python3.9/site-packages/pyarrow/tests/test_csv.py:111: incheck_options_classopts=cls(**non_defaults)
pyarrow/_csv.pyx:1388: inpyarrow._csv.WriteOptions.__init__
???
pyarrow/_csv.pyx:1446: inpyarrow._csv.WriteOptions.null_string.__set__
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ???
ETypeError: expectedbytes, NoneTypefound |
6907545 to
f95d305Compare
MartinNowak
left a comment
There was a problem hiding this comment.
Was on vacation and it took a bit longer to get back to this. Hope it runs through now 🤞 @AlenkaF.
There was a problem hiding this comment.
???
E TypeError: expected bytes, NoneType found
It found this glorious typo 🤦. Only have semi-working syntax highlighting and didn't have enough time to figure out how to run the tests locally :/.
AlenkaF
commented
Aug 15, 2025
The tests are passing 👍 pyarrow._csv.WriteOptions->pyarrow._csv.WriteOptions(include_header=None, *, batch_size=None, delimiter=None, eol=None, null_string=None, quoting_style=None)
PR01: Parameters {'delimiter', 'null_string', 'eol', 'batch_size', 'quoting_style'} notdocumentedPR04: Parameter"")" hasnotype |
f95d305 to
08fa441CompareThere was a problem hiding this comment.
The tests are passing 👍
But the docstrings need an update:
Needed to escape the backslash to render in final doc rather than to break the doc comment.
MartinNowak
commented
Aug 21, 2025
The macOS failures seem to be apache/orc#2357 and were not present previously f95d305@AlenkaF. |
raulcd
left a comment
There was a problem hiding this comment.
The macOS failures are fixed on main, can you rebase so they are fixed on CI, please?
raulcd
commented
Aug 26, 2025
@github-actions crossbow submit -g python |
Revision: 08fa4412afc3bbb2e1599a4ad9557fe8a0f3a075 Submitted crossbow builds: ursacomputing/crossbow @ actions-c05e9be928 |
08fa441 to
220c3fcCompareThere was a problem hiding this comment.
Thanks for the PR, sorry I took a little to review.
This seems to only be testing that the options class can be generated but is not indeed testing the options, on test_csv.py we have other tests that indeed test the options like:
arrow/python/pyarrow/tests/test_csv.py
Line 1929 in 697f501
or
arrow/python/pyarrow/tests/test_csv.py
Line 1973 in 697f501
Can we test the options are indeed working as expected when writing the CSV?
Thank you for your contribution. Unfortunately, this pull request has been marked as stale because it has had no activity in the past 365 days. Please remove the stale label or comment below, or this PR will be closed in 14 days. Feel free to re-open this if it has been closed in error. If you do not have repository permissions to reopen the PR, please tag a maintainer. |
Rationale for this change
Expose remaining csv write options to pyarrow.
What changes are included in this PR?
Adding
eolandnull_stringto csv.WriteOptions.Are these changes tested?
Yes, testing of setters included.
Are there any user-facing changes?