[Python-bugs-list] [ python-Bugs-585598 ] Example uses depricated features.

noreply@sourceforge.net noreply@sourceforge.net
Tue, 23 Jul 2002 13:58:36 -0700


Bugs item #585598, was opened at 2002-07-23 16:28
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=585598&group_id=5470

Category: Documentation
Group: Python 2.2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Chermside (mcherm)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: Example uses depricated features.

Initial Comment:
sys.exc_type, sys.exc_value, and sys.exc_traceback have
been deprecated since Python 1.5 in favor of
sys.exc_info(). Thus, they should probably not appear
as examples in the text of the Python Library Reference.

 On page "3.12 traceback -- Print or retrieve a stack
traceback", I suggest the following changes:

"""
The module uses traceback objects -- this is the object
type that is stored in the variables sys.exc_traceback
and sys.last_traceback and returned as the third item
from sys.exc_info().
"""
 replaced with
"""
The module uses traceback objects -- this is the object
type that is stored in the variables sys.exc_traceback
(deprecated) and sys.last_traceback and returned as the
third item from sys.exc_info().
"""

----------------------------------

"""
print_exc([limit[, file]])
This is a shorthand for `print_exception(sys.exc_type,
sys.exc_value, sys.exc_traceback, limit, file)'. (In
fact, it uses sys.exc_info() to retrieve the same
information in a thread-safe way.) 
"""
 replaced with
"""
print_exc([limit[, file]])
This is a shorthand for `print_exception(sys.exc_type,
sys.exc_value, sys.exc_traceback, limit, file)'. (In
fact, it uses sys.exc_info() to retrieve the same
information in a thread-safe way instead of using the
deprecated variables.) 
"""
-----------------------------------
Sorry that I didn't submit a patch for this, but I'm
not sure how to generate patches, so I figured I'd just
submit it this way. Next time round, I'll try to learn
the patch system to save someone else the work of
retyping it.


----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2002-07-23 16:58

Message:
Logged In: YES 
user_id=33168

$ cvs diff -u [file_list] # generate unified diffs
[file_list] is optional
$ cvs diff -C 5 [file_list] # generate context diffs
[file_list] is optional

Note:  you should use CVS to get the docs prior to editing.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=585598&group_id=5470