BUG: doing a class method lookup in __dealloc__ is dangerous
- [x] closes #44253
- [ ] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry

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__`](https://cython.readthedocs.io/en/latest/src/userguide/special_methods.html#finalization-method-dealloc). 

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

Cool!

>rebase on master

Done

 CI is passing thanks @mattip 