Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork18.7k
ENH: Implement PDEP-17#61468
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
ENH: Implement PDEP-17#61468
Uh oh!
There was an error while loading.Please reload this page.
Conversation
pandas/errors/__init__.py Outdated
classPandasChangeWarning(Warning): | ||
""" | ||
Warning raised for any an upcoming change. | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Not in love with this name, butPandasDeprecationWarning
is taken below. Bikeshedding here is most welcome!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We could also make this internal if we want to not have it be public.
Seems like the label |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think there should be separate docs about the deprecation policy and these classes, aside from what is in the whatsnew document.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
@Dr-Irv - Thanks for the review! I'm negative on the name |
Maybe a different name would solve that? Maybe |
Currently using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks for working on this!
pandas/errors/__init__.py Outdated
@@ -91,6 +91,96 @@ class PerformanceWarning(Warning): | |||
""" | |||
class PandasChangeWarning(Warning): | |||
""" | |||
Warning raised for any an upcoming change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Warningraisedforanyanupcomingchange. | |
Warningraisedforanyupcomingchange. |
pandas/errors/__init__.py Outdated
See Also | ||
-------- | ||
errors.Pandas4Warning : Class for deprecations to be enforced in pandas 4.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
SeeAlso | |
-------- | |
errors.Pandas4Warning :Classfordeprecationstobeenforcedinpandas4.0. |
@@ -4,13 +4,16 @@ | |||
import inspect | |||
from pandas.errors import Pandas4Warning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Will this test case need to be updated every version? I think having a variable that points to the current version's warning might reduce some of the work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Then that variable will just have to be updated instead, seems about the same amount of work to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I suppose if this is needed in multiple files, then it could become more of a hassle. Will add.
Uh oh!
There was an error while loading.Please reload this page.
I've added some implementation details to PDEP-17, and more details to the whatsnew. If you'd like to see this documented somewhere else, can you detail where. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looking good!
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
@bashtage - pandas_datareader is using the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm good with the current version. I'll let others decide when to merge.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Simon Hawkins <simonjayhawkins@gmail.com>
@mroeschke - this should be ready. |
- :class:`pandas.errors.Pandas5Warning`: Warnings which will be enforced in pandas 5.0. | ||
- :class:`pandas.errors.PandasPendingDeprecationWarning`: Base class of all warnings which emit a ``PendingDeprecationWarning``, independent of the version they will be enforced. | ||
- :class:`pandas.errors.PandasDeprecationWarning`: Base class of all warnings which emit a ``DeprecationWarning``, independent of the version they will be enforced. | ||
- :class:`pandas.errors.PandasFutureWarning`: Base class of all warnings which emit a ``PandasFutureWarning``, independent of the version they will be enforced. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
-:class:`pandas.errors.PandasFutureWarning`: Base class of all warnings which emit a ``PandasFutureWarning``, independent of the version they will be enforced. | |
-:class:`pandas.errors.PandasFutureWarning`: Base class of all warnings which emit a ``FutureWarning``, independent of the version they will be enforced. |
- :class:`pandas.errors.PandasChangeWarning`: Base class of all pandas deprecation warnings. | ||
- :class:`pandas.errors.PandasPendingDeprecationWarning`: Base class of all warnings which emit a ``PendingDeprecationWarning``, independent of the version they will be enforced. | ||
- :class:`pandas.errors.PandasDeprecationWarning`: Base class of all warnings which emit a ``DeprecationWarning``, independent of the version they will be enforced. | ||
- :class:`pandas.errors.PandasFutureWarning`: Base class of all warnings which emit a ``PandasFutureWarning``, independent of the version they will be enforced. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
- :class:`pandas.errors.PandasFutureWarning`: Base class of all warnings which emit a``PandasFutureWarning``, independent of the version they will be enforced. | |
- :class:`pandas.errors.PandasFutureWarning`: Base class of all warnings which emit a``FutureWarning``, independent of the version they will be enforced. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can you think of a linting rule that could remind us to use these new warning classes instead ofFutureWarning
andDeprecationWarning
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can you think of a linting rule that could remind us to use these new warning classes instead of FutureWarning and DeprecationWarning?
Uh oh!
There was an error while loading.Please reload this page.
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.Continuation of#58169
Still needs tests and some cleanup with the docs and decorator arguments, but I'd like to get a first look.
cc@Dr-Irv@Aloqeely