Open jleibs opened 1 year ago
As a workaround, does it work if you add:
from pyarrow.pandas_compat import _pandas_api
at the top level of your program (before main shuts down)?
This seems to be a transitive consequence of https://github.com/python/cpython/issues/86813#issuecomment-1246097184
Just to note, I was able to reproduce the error with pandas==2.1.1
and dev version of pyarrow (15.0.0.dev
). The issue doesn't happen if I add the import as Weston suggested at the top level of the program.
cc @pitrou
This should be trivial to workaround in PyArrow.
Describe the bug, including details regarding any error messages, version, and platform.
This is a relatively straightforward problem in which a thread that is continuing to run during shutdown tries to register an atexit handler.
This only happens if the
pandas
library is installed causing the associated shims to be used. This happens regardless of whether or not pandas is in-use by the application.The problem can be avoided by making sure to join all theads before main exits, but this is not generally required by python so should be considered a bug.
Context to reproduce:
requirements.txt
main.py
Run:
Component(s)
Python