API: many custom errors / warnings are not exposed in pandas.errors · Issue #27656 · pandas-dev/pandas (original) (raw)

From #27553 and #27522, I quickly looked at how consistent we are with defining errors and warnings in pandas.errors.

So we have a pandas.errors module which is meant to publicly expose our custom exceptions and warnings.

Some are defined there such as PerformanceWarning, UnsortedIndexError, ParserError, ... (https://github.com/pandas-dev/pandas/blob/bb6135880e5e453d7701764b9f2e4ad3356a68d7/pandas/errors/__init__.py).
But many are not:

Do we want to move them all to the public pandas.errors module?
Are there reasons that some can / should not be moved? Eg should the cython ones be defined in the cython file for performance?
Are there certain custom exceptions/warnings that we rather convert in a built-in one instead of publicly exposing them?
Do we want to move all the io related ones? (those modules are somewhat public)