-
-
Notifications
You must be signed in to change notification settings - Fork 564
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
In python-2.7 deprecation warnings are not shown to the user by default #11244
Comments
This comment has been minimized.
This comment has been minimized.
Author: François Bissey |
Attachment: trac_11244_reenable_deprecationwarnings_in_python27.patch.gz new patch to restore deprecation warnings in python 2.7 (now in git format) |
comment:2
There is an issue with
But clearly I am not sure why the original code should give both a warning and a deprecation warning. Of course my patch only let sage display the later. |
comment:3
The code in question
|
comment:4
I see that in fact there are are two related functions being deprecated and this is a way to warn for both at the same time. |
This comment has been minimized.
This comment has been minimized.
Work Issues: fix warnings in sage/combinat/partition.py |
This comment has been minimized.
This comment has been minimized.
Patch to reenable extra deprecation warning in sage/combinat/partition.py. |
This comment has been minimized.
This comment has been minimized.
comment:6
Attachment: trac_11244_fix_combinatpartition_warnings.patch.gz Fixing my mistaken assumptions about warnings in general. |
comment:7
There are more deprecation warnings issued by the standard python mechanism rather than sage's mechanism
|
This comment has been minimized.
This comment has been minimized.
3 more files fixed. double messaging removed in two of them. [rebased on 4.7.alpha5] |
comment:9
Attachment: trac_11244_fixmoredeprecationswarnings.patch.gz |
Use this patch if you base your review on 4.7.1.alpha1 |
This comment has been minimized.
This comment has been minimized.
comment:10
Attachment: trac_11244_fixmoredeprecationswarnings.2.patch.gz |
comment:11
Patches applied to sage-4.7.1.alpha2, then did 'sage -b', followed by 'make testlong'. All tests passed. Positive review! |
Reviewer: Mariah Lenox |
comment:12
Thank you Mariah for the review. Thank you John for the suggestion to make it better. Thank you Steve for pointing the obvious. Thank you all for making this reach this stage. |
Changed work issues from fix warnings in sage/combinat/partition.py to none |
comment:14
Removing the work issue as it was in fact dealt with. |
Merged: sage-4.7.2.alpha0 |
comment:16
(for another ticket) maybe it would be best if we subclassed the warnings to all inherit from a SageWarning class, and then turn on just Sage warnings... |
In python 2.7 deprecation warnings are a developer only feature. Which mean that sage's deprecation warnings are not shown either. A previous patch in #9958 only re-enable deprecation warnings in doctests but not in regular sage sessions.
Apply:
CC: @kini
Component: misc
Author: François Bissey
Reviewer: Mariah Lenox
Merged: sage-4.7.2.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/11244
The text was updated successfully, but these errors were encountered: