Skip to content

Clean Up nogil Warning From Parsers #30369

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 4 commits into from
Jan 2, 2020
Merged

Conversation

WillAyd
Copy link
Member

@WillAyd WillAyd commented Dec 20, 2019

I think just easier to ensure The GIL is acquired within the C function rather than all of the current casting / indirection.

Eliminates the following warning:

warning: pandas/_libs/parsers.pyx:1656:34: Casting a GIL-requiring function into a nogil function circumvents GIL validation

@WillAyd WillAyd added the Clean label Dec 20, 2019
@jbrockmendel
Copy link
Member

presumably the nogil version was for performance. does that turn out not to matter?

@@ -171,12 +171,9 @@ cdef extern from "parser/tokenizer.h":
int64_t skip_first_N_rows
int64_t skipfooter
# pick one, depending on whether the converter requires GIL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment is now extraneous

@WillAyd
Copy link
Member Author

WillAyd commented Dec 20, 2019

Nogil is still in play here; the one function that requires it just explicitly grabs it now

@jreback jreback added this to the 1.0 milestone Dec 20, 2019
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls show all asv's for this, i can't believe this doesn't kill performance.

@WillAyd
Copy link
Member Author

WillAyd commented Dec 21, 2019

Ran the csv benchmarks and they showed no change.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment, otherwise lgtm. ping on green.

@WillAyd
Copy link
Member Author

WillAyd commented Jan 2, 2020

@jreback all green

@jreback jreback merged commit 64ddb07 into pandas-dev:master Jan 2, 2020
@jreback
Copy link
Contributor

jreback commented Jan 2, 2020

thanks @WillAyd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants