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
Add deprecation warnings for sympyprinting #2480
Conversation
I would also add a big comment to the top of the file the same effect, so that if anyone ever comes along trying to fix a bug in the extension, they will know that they really should be looking at the SymPy code. |
pass | ||
else: | ||
warnings.warn("The sympyprinting extension in IPython is deprecated, " | ||
"use sympy.interactive.ipythonprinting") |
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.
Should DeprecationWarning be used? This is a question for the IPython guys. DeprecationWarning is the correct warning, but due to a Python core design decision, it is not shown by default, so that almost no one would actually see it. What is your policy on this?
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'd say we shouldn't use DeprecationWarning for that reason. The idea is that developers can turn on a debug flag and see where their code needs to be updated, but users aren't troubled by it. But in this case, we want the user to see it.
I agree with @asmeurer that it would be good to mention its status in the module docstring as well. Other than that, this looks fine. |
@asmeurer requested that this PR be applied to 0.13.1, is that correct? |
The sympyprinting extension has been moved to SymPy as of version 0.7.2. For versions containing the new extension, print a deprecation warning and load the extension from SymPy.
@takluyver @asmeurer I've added the note about the status to the docstring. @minrk Yes, Aaron had mentioned adding this PR to start deprecating on your end as SymPy takes on the printing extension. |
It's not a huge deal, since you guys actually release pretty often, but it is always nice to start deprecation cycles. But it's your decision. |
Okay, if this is finished and merged tomorrow then it will go in, otherwise no big deal to wait one more cycle. |
Right, I think this is finished. Thanks, @flacjacket . @minrk : I'm merging this now, can you take care of applying it to 0.13.1? |
Add deprecation warnings for sympyprinting
The sympyprinting extension has been moved to SymPy for the upcoming 0.7.2 release (see sympy/sympy#1559). For versions containing the new extension, print a deprecation warning and load the extension from SymPy.
applied to 0.13.1 |
The sympyprinting extension has been moved to SymPy for the upcoming 0.7.2 release (see sympy/sympy#1559). For versions containing the new extension, print a deprecation warning and load the extension from SymPy.
* tag 'rel-0.13.1': (27 commits) remove rc for 0.13.1 final 0.13.1.rc3 qtconsole extras_require to whatsnew Backport PR ipython#2492: add missing 'qtconsole' extras_require add 2480 to whatsnew Backport PR ipython#2480: Add deprecation warnings for sympyprinting PR 2384 to whatsnew mark 0.13.1.rc2 Backport PR ipython#2384: Adapt inline backend to changes in matplotlib mark 0.13.1.rc1 update 0.13.1 whatsnew lists Backport PR ipython#2479: use new _winapi instead of removed _subprocess Backport PR ipython#2437: don't let log cleanup prevent engine start Backport PR ipython#2405: clarify TaskScheduler.hwm doc Backport PR ipython#2377: Fix installation of man pages in Python 3 start 0.13.1 whatsnew Backport PR ipython#2373: fix missing imports in core.interactiveshell Backport PR ipython#2365: fix names of notebooks for download/save Backport PR ipython#2345: Remove references to 'version' no longer in argparse. Github issue ipython#2343. Backport PR ipython#2347: adjust division error message checking to account for Python 3 ...
* tag 'rel-0.13.1': (51 commits) remove rc for 0.13.1 final 0.13.1.rc3 qtconsole extras_require to whatsnew Backport PR ipython#2492: add missing 'qtconsole' extras_require add 2480 to whatsnew Backport PR ipython#2480: Add deprecation warnings for sympyprinting PR 2384 to whatsnew mark 0.13.1.rc2 Backport PR ipython#2384: Adapt inline backend to changes in matplotlib mark 0.13.1.rc1 update 0.13.1 whatsnew lists Backport PR ipython#2479: use new _winapi instead of removed _subprocess Backport PR ipython#2437: don't let log cleanup prevent engine start Backport PR ipython#2405: clarify TaskScheduler.hwm doc Backport PR ipython#2377: Fix installation of man pages in Python 3 start 0.13.1 whatsnew Backport PR ipython#2373: fix missing imports in core.interactiveshell Backport PR ipython#2365: fix names of notebooks for download/save Backport PR ipython#2345: Remove references to 'version' no longer in argparse. Github issue ipython#2343. Backport PR ipython#2347: adjust division error message checking to account for Python 3 ...
Add deprecation warnings for sympyprinting
The sympyprinting extension has been moved to SymPy for the upcoming 0.7.2 release (see sympy/sympy#1559). For versions containing the new extension, print a deprecation warning and load the extension from SymPy.