Skip to content

CLN: clean up parser options #5121

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

Merged
merged 2 commits into from
Oct 5, 2013
Merged

CLN: clean up parser options #5121

merged 2 commits into from
Oct 5, 2013

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Oct 5, 2013

Also add a test to make sure that the C parser options validation is actually
covered

example travis fail:

https://travis-ci.org/pydata/pandas/jobs/12171563

explanation (for the record):

if you print out options before this commit you'll see that they are all overwritten with a single value. Whatever this value is will depend on how the _parser_defaults dictionary happens to be ordered (which is random because of hashing).

This caused a bug because the value of value is retained from the loop over _parser_defaults, and default is not reassigned in the two loops that follow the loop over _parser_defaults, so all the values end up being the same as the last argument that was iterated over from _parser_defaults.

magic explained 🎉

@ghost ghost assigned cpcloud Oct 5, 2013
Also add a test to make sure that the C parser options validation is actually
covered
@jtratner
Copy link
Contributor

jtratner commented Oct 5, 2013

Great work catching this! 👍

@cpcloud
Copy link
Member Author

cpcloud commented Oct 5, 2013

i'm not sure about this factorize argument ... now that i think about it i think it hsould be removed from the signature and set of arguments that are incompatible with the python parser

@cpcloud
Copy link
Member Author

cpcloud commented Oct 5, 2013

@jreback @jtratner comments?

@jreback
Copy link
Contributor

jreback commented Oct 5, 2013

seems fine, any idea what factorize does?

@cpcloud
Copy link
Member Author

cpcloud commented Oct 5, 2013

nothing. wasn't used anywhere in parser.pyx except to be assigned as an instance variable never to be used again

@cpcloud
Copy link
Member Author

cpcloud commented Oct 5, 2013

looks like it was added as an option in c4d36ca and has just been floating around since then doing nothing

cpcloud added a commit that referenced this pull request Oct 5, 2013
@cpcloud cpcloud merged commit bea5051 into pandas-dev:master Oct 5, 2013
@cpcloud cpcloud deleted the parser-options-mania branch October 5, 2013 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants