-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Silence DeprecationWarning by default #51568
Comments
This issue is to track the silencing of DeprecationWarning by default. To start a patch has been attached against trunk which silences |
New patch that includes proposed doc changes. |
Just FYI, there are tabs in your spaces in _warnings.c. |
The second paragraph ("There is also the issue...") is IMO redundant, especially the third sentence ("But because Python is an interpreted language..."). |
warnings_rst_reword.diff proposes slightly different wording on the "Updating Code..." section of documentation. |
Thanks for the feedback, everyone. The tabs have been fixed in the source. As for the docs, I moved the explanation as to why the warnings are silenced to the end of the section and chopped the "compilation" reasoning as it is not the critical reason for the silencing. |
The wording of the documentation flows and is arranged better than before. However, there is a test failure: test_exceptions.testDeprecatedMessageAttribute depends on the deprecation warning always occuring. |
Latest patch adds fixes to test_exceptions test_ascii_formatd to pass. |
Committed in r77402. I am going to wait to see if any doc changes occur before I commit in py3k. For historical reasons, here is the thread that hashed out the reasonsing: http://mail.python.org/pipermail/stdlib-sig/2009-November/000789.html And thanks to everyone who helped out with this! |
Has enough time elapsed yet for py3k merging? |
On Tue, Feb 2, 2010 at 19:00, Benjamin Peterson <report@bugs.python.org> wrote:
Sure. I will try to do it before or at PyCon. |
The -Qwarn/-Qwarnall options are unexpectedly silenced in 2.7. |
So it isn't really unexpected as -Q uses DeprecationWarning which is being silenced by default. So either -Q has to turn DeprecationWarning back on or a new subclass of DeprecationWarning (say IntegerDivisionWarning) needs to be introduced that -Q uses and adds to the warnings filter. And FYI, I did backport the patch but forgot to close the issue. |
Posted to python-dev to solicit feedback on how to handle this. |
The silencing of DeprecationWarnings should also be advertised, so that who writes the code knows that now -Wd should be used explicitly while testing the code. A warning in the "What's new" would be a good place where to start. |
Lowering priority. |
-Q now works like -3 by causing the DeprecationWarning silencing to be skipped. Committed in r80492. |
This still hasn't been ported to py3. |
Making this a 3.2 issue now. |
Brett, by the way, you had spurious changes in subprocess in your last commit. |
I'm tired of svn. I swear I made sure I didn't list that file in what was changed. Anyway, it's been reverted in r80496. |
Merged the lot in r82314. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: