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

Fix pandas scan bug #2478

Merged
merged 1 commit into from
Nov 21, 2023
Merged

Fix pandas scan bug #2478

merged 1 commit into from
Nov 21, 2023

Conversation

acquamarin
Copy link
Collaborator

@acquamarin acquamarin commented Nov 21, 2023

Do you have any pybind11 objects that are members of other C++ structures? One commonly overlooked requirement is that pybind11 objects have to increase their reference count whenever their copy constructor is called. Thus, you need to be holding the GIL to invoke the copy constructor of any C++ class that has a pybind11 member. This can sometimes be very tricky to track for complicated programs Think carefully when you make a pybind11 object a member in another struct.

According to the pybind11 doc, we should grab the GIL in the copy constructor of any class who has a memeber of pybind11 objects.

Copy link

codecov bot commented Nov 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3762306) 91.52% compared to head (a5edea2) 91.51%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2478      +/-   ##
==========================================
- Coverage   91.52%   91.51%   -0.01%     
==========================================
  Files        1024     1024              
  Lines       37796    37800       +4     
==========================================
+ Hits        34591    34594       +3     
- Misses       3205     3206       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@acquamarin acquamarin merged commit ed31305 into master Nov 21, 2023
12 checks passed
@acquamarin acquamarin deleted the pd-scan-fix branch November 21, 2023 04:24
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.

2 participants