Skip to content

BUG: doing a class method lookup in __dealloc__ is dangerous #44879

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 1 commit into from
Dec 16, 2021

Conversation

mattip
Copy link
Contributor

@mattip mattip commented Dec 14, 2021

PR #39777 refactored duplicated code, but caused PyPy to fail. This is because __dealloc__ called self.close() which strictly speaking is an attribute lookup, and could fail if the object is partially destroyed, as described in the documentation for __dealloc__.

Does this need a whatsnew entry?

@jreback jreback added this to the 1.4 milestone Dec 14, 2021
@jreback jreback added the IO CSV read_csv, to_csv label Dec 14, 2021
@jreback
Copy link
Contributor

jreback commented Dec 14, 2021

seems reasonable. if you can rebase as just merged pypy3 in our CI :-> (note we only are supporting >= 3.8) in this release

@mattip
Copy link
Contributor Author

mattip commented Dec 14, 2021

just merged pypy3 in our CI

Cool!

rebase on master

Done

@mattip
Copy link
Contributor Author

mattip commented Dec 15, 2021

CI is passing

@jreback jreback merged commit 46ddde7 into pandas-dev:master Dec 16, 2021
@jreback
Copy link
Contributor

jreback commented Dec 16, 2021

thanks @mattip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO CSV read_csv, to_csv
Projects
None yet
2 participants