-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
API: many custom errors / warnings are not exposed in pandas.errors #27656
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
Comments
I think the _config and tslibs should be defined where they currently are and imported into pandas.errors. The others I don't have strong opinions on. |
For the tslibs, do you think this will have a performance impact, or is it only for the "being self-contained" reason? (note that if all errors are defined in |
My motivation here is the self-containment, yah. I think in the case of OutOfBoundsDatetime there was a structural reason why it couldn't be moved to pd.errors, but I don't remember it off the top of my head. |
brainstorming how to write tests for this, we could do something like:
We could use |
take |
Hello, I just started to work on this and wanted to follow up on the this because I think I may be on the wrong page. Thank you for the code by the way. I was initially thinking we would get the pandas exceptions that aren't in My idea doesn't seem to match yours. I'm not quite following how we use |
Pandas 1.5.0 was released earlier this morning and moved an exception class we use. Routine CI caught this backwards-incompatible change affecting our error handling for `augur filter --query …` evaluation. I audited for usage of other exceptions moved in the same upstream change (as noted in the release notes) and found none in Augur. Resolves: <#1049> Related-to: <pandas-dev/pandas#27656>
Pandas 1.5.0 was released earlier this morning and moved an exception class we use. Routine CI caught this backwards-incompatible change affecting our error handling for `augur filter --query …` evaluation. I audited for usage of other exceptions moved in the same upstream change (as noted in the release notes) and found none in Augur. Resolves: <#1049> Related-to: <pandas-dev/pandas#27656>
Pandas 1.5.0 was released earlier this morning and moved an exception class we use. Routine CI caught this backwards-incompatible change affecting our error handling for `augur filter --query …` evaluation. I audited for usage of other exceptions moved in the same upstream change (as noted in the release notes) and found none in Augur. Resolves: <#1049> Related-to: <pandas-dev/pandas#27656>
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)
The text was updated successfully, but these errors were encountered: