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

Removed unused strict struct member in tokenizer #38348

Merged
merged 1 commit into from
Dec 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pandas/_libs/parsers.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ cdef extern from "parser/tokenizer.h":

char commentchar
int allow_embedded_newline
int strict # raise exception on bad CSV */

int usecols

Expand Down
9 changes: 1 addition & 8 deletions pandas/_libs/src/parser/tokenizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ void parser_set_default_options(parser_t *self) {
self->skipinitialspace = 0;
self->quoting = QUOTE_MINIMAL;
self->allow_embedded_newline = 1;
self->strict = 0;

self->expected_fields = -1;
self->error_bad_lines = 0;
Expand Down Expand Up @@ -1031,15 +1030,9 @@ int tokenize_bytes(parser_t *self,
} else if (IS_CARRIAGE(c)) {
END_FIELD();
self->state = EAT_CRNL;
} else if (!self->strict) {
} else {
PUSH_CHAR(c);
self->state = IN_FIELD;
} else {
int64_t bufsize = 100;
self->error_msg = malloc(bufsize);
snprintf(self->error_msg, bufsize,
"delimiter expected after quote in quote");
goto parsingerror;
}
break;

Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/src/parser/tokenizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ typedef struct parser_t {

char commentchar;
int allow_embedded_newline;
int strict; /* raise exception on bad CSV */

int usecols; // Boolean: 1: usecols provided, 0: none provided

Expand Down