[Patches] [ python-Patches-542562 ] clean up trace.py

noreply@sourceforge.net noreply@sourceforge.net
Wed, 18 Dec 2002 11:38:19 -0800


Patches item #542562, was opened at 2002-04-11 16:34
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=542562&group_id=5470

Category: Demos and tools
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Zooko O'Whielacronx (zooko)
Assigned to: Skip Montanaro (montanaro)
Summary: clean up trace.py

Initial Comment:
moderately interesting changes:
 * bugfix: remove "feature" of ignoring files in the
tmpdir, as I was trying to run it on file in the tmpdir
and couldn't figure out why it gave no answer!  I think
the original motivation for that feature (spurious
"/tmp/" filenames for builtin functions??) has gone
away, but I'm not sure.
 * add more usage docs and warning about common mistake

pretty mundane changes:
 * remove unnecessary checks for backwards
compatibility with a version that never escaped from my
(Zooko's) laptop
 * add a future-compatible check: if the interpreter
offers an attribute called `sys.optimized', and it is
"true", and the user is trying to do something that
can't be done with an optimizing interpreter, then
error out


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

>Comment By: Zooko O'Whielacronx (zooko)
Date: 2002-12-18 19:38

Message:
Logged In: YES 
user_id=52562

I merged my patch to current HEAD (-r1.12) and removed a
bunch of it.

Important changes (from current HEAD):

 * don't ignore files in $TMPDIR
 * add "--list-funcs" mode to usage string

Minor changes (from current HEAD):

 * remove all code which was solely for backwards
compatibility with a version that nobody except me ever had.
 * I updated some inline docs to point to
sf.net/projects/pyutil instead of its ancestor
sf.net/projects/mojonation.

(Change from previous patch: I removed the part that mwh so
gleefully pointed out that I aint gonna need.)


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

Comment By: Michael Hudson (mwh)
Date: 2002-11-22 14:21

Message:
Logged In: YES 
user_id=6656

I haven't looked at the patch, but:

>  * add doc about usage and about how it will silently fail
> if invoked with -O

This probably isn't true any more.  I hacked trace.py to use
co_lnotab when I removed SET_LINENO.

> * add a future-compatible check: if the interpreter
> offers an attribute called `sys.optimized', and it is
> "true", and the user is trying to do something that
> can't be done with an optimizing interpreter, then
> error out 

I want to shout "YAGNI!" for some reason...

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

Comment By: Zooko O'Whielacronx (zooko)
Date: 2002-11-22 14:14

Message:
Logged In: YES 
user_id=52562

Here are the changes in 20995:
 * bugfix: remove "feature" of ignoring files in the
tmpdir, as I was trying to run it on a file in the tmpdir
and couldn't figure out why it gave no answer! I think
the original motivation for that feature (spurious
"/tmp/" filenames for builtin functions??) has gone
away, but I'm not sure. 
 * add feature "--listfuncs" which prints out whether each
func was invoked or not, rather than how many times each
func was invoked
 * remove unnecessary checks for backwards
compatibility with a version that never escaped from my
(Zooko's) laptop
 * add doc about usage and about how it will silently fail
if invoked with -O
 * add a future-compatible check: if the interpreter
offers an attribute called `sys.optimized', and it is
"true", and the user is trying to do something that
can't be done with an optimizing interpreter, then
error out 
 * add some commented-out debug print statements

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

Comment By: Martin v. Löwis (loewis)
Date: 2002-11-22 09:14

Message:
Logged In: YES 
user_id=21627

I have now applied file 25252 as trace.py 1.10.

Skip, what is your opinion on file 20995? It applies cleanly
and looks reasonable (even though I haven't tried to
understand it all).

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

Comment By: Martin v. Löwis (loewis)
Date: 2002-10-07 21:21

Message:
Logged In: YES 
user_id=21627

Skip, what kind of processing do you plan for this patch?

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

Comment By: Zooko O'Whielacronx (zooko)
Date: 2002-06-17 15:12

Message:
Logged In: YES 
user_id=52562

This patch removes the change log, as per GvR's request.

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

Comment By: Zooko O'Whielacronx (zooko)
Date: 2002-06-17 14:57

Message:
Logged In: YES 
user_id=52562

I'll remove the change log and submit a patch momentarily. 
I'm afraid I cannot legally remove the copyright notice (or
more precisely: my removing the copyright notice from the
text would have no legal effect, and you can do it as well
as I can), since I am not Autonomous Zones Industries, Inc.

(AZI was my employer at the time I wrote and submitted that
patch.)

Regards,

Zooko


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

Comment By: Martin v. Löwis (loewis)
Date: 2002-04-14 10:27

Message:
Logged In: YES 
user_id=21627

Can you also provide the other cleanup that Guido requested
(change of license, removal of change logs, etc)?

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

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