-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Fix segfault on dir of a DataFrame with a unicode surrogate character in the column name #32701
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
BUG: Fix segfault on dir of a DataFrame with a unicode surrogate character in the column name #32701
Changes from 5 commits
bf5d59e
611cca9
6a3e986
27da130
a52e59c
b2593bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -192,7 +192,7 @@ def test_categorical_dtype_utf16(all_parsers, csv_dir_path): | |
pth = os.path.join(csv_dir_path, "utf16_ex.txt") | ||
parser = all_parsers | ||
encoding = "utf-16" | ||
sep = "," | ||
sep = "\t" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why did this change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test failed for some reason. So when I investigated this I noticed that the separator in this file is a tab rather than a ,. So I changed this and the test passed. I am not sure what caused the failure, but I think that the test was wrong to begin with and there is some weird feature interaction that caused the failure. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm yea very strange. I guess since there isn't a comma in this file at all it just reads every line into a single column.... |
||
|
||
expected = parser.read_csv(pth, sep=sep, encoding=encoding) | ||
expected = expected.apply(Categorical) | ||
|
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.
This is interacting with Python objects so it needs to be called with the GIL
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.
Will remove it, I am quite new to cython, so I have to read up a bit on these things.
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.
If you are getting warnings / errors when trying to cythonize you might need a
with gil:
block in your error handlerThere 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.
I am not getting any cython errors, so I am probably good.