Georg Brandl
b4d0ef91a5
#6513 : fix example code: warning categories are classes, not instances.
2009-07-18 09:03:10 +00:00
Benjamin Peterson
72f94f75d6
add versionadded
2009-07-12 16:56:54 +00:00
Brett Cannon
6c4cff0f32
Require implementations for warnings.showwarning() support the 'line' argument.
...
Was a DeprecationWarning for not supporting it since Python 2.6.
Closes issue #3652 .
2009-03-11 04:51:06 +00:00
Georg Brandl
c62ef8b4d9
Remove trailing whitespace.
2009-01-03 20:55:06 +00:00
Nick Coghlan
d2e0938362
Issue #3781 : Final cleanup of warnings.catch_warnings and its usage in the test suite. Closes issue w.r.t. 2.6 (R: Brett Cannon)
2008-09-11 12:11:06 +00:00
Brett Cannon
672237dc6c
warnings.catch_warnings() now returns a list or None instead of the custom
...
WarningsRecorder object. This makes the API simpler to use as no special object
must be learned.
Closes issue 3781.
Review by Benjamin Peterson.
2008-09-09 00:49:16 +00:00
Brett Cannon
3dffcd1a72
Make it more obvious that warnings.catch_warnings() and its arguments should be considered keyword-only.
2008-09-05 03:52:59 +00:00
Andrew M. Kuchling
2dd647b8fc
typo fix
2008-09-02 01:39:18 +00:00
Brett Cannon
1eaf0742d8
Move test.test_support.catch_warning() to the warnings module, rename it
...
catch_warnings(), and clean up the API.
While expanding the test suite, a bug was found where a warning about the
'line' argument to showwarning() was not letting functions with '*args' go
without a warning.
Closes issue 3602.
Code review by Benjamin Peterson.
2008-09-02 01:25:16 +00:00
Andrew M. Kuchling
311c580539
Document the 'line' argument
2008-05-10 17:37:05 +00:00
Brett Cannon
8a232cc385
Add a DeprecationWarning for when warnings.showwarning() is set to a function
...
that lacks support for the new 'line' argument.
2008-05-05 05:32:07 +00:00
Georg Brandl
4aa8df2871
Fix markup.
2008-04-13 07:07:44 +00:00
Brett Cannon
e974689038
Re-implement the 'warnings' module in C. This allows for usage of the
...
'warnings' code in places where it was previously not possible (e.g., the
parser). It could also potentially lead to a speed-up in interpreter start-up
if the C version of the code (_warnings) is imported over the use of the
Python version in key places.
Closes issue #1631171 .
2008-04-12 23:44:07 +00:00
Benjamin Peterson
092a1f7ad7
PyErr_Warn is decrepated. Use PyErr_WarnEx
2008-03-31 21:57:13 +00:00
Brett Cannon
338d41850a
Use a versionchanged directive.
2007-12-09 05:09:37 +00:00
Georg Brandl
2b92f6bab3
Diverse markup fixes.
2007-12-06 01:52:24 +00:00
Christian Heimes
28104c58d2
Expose Py_Py3kWarningFlag as sys.py3kwarning as discussed in #1504
...
Also added a warning.warnpy3k() as convenient method for Python 3.x related deprecation warnings.
2007-11-27 23:16:44 +00:00
Georg Brandl
8ec7f65613
Move the 2.6 reST doc tree in place.
2007-08-15 14:28:01 +00:00