This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: pdb: fix for #1472251('run/runeval' commands bug)
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: isandler, jakamkon
Priority: low Keywords: patch

Created on 2006-04-18 12:22 by jakamkon, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pdb-run.patch jakamkon, 2006-04-18 12:22 FIx for #1472251
pdb-run-v2.patch jakamkon, 2006-06-19 14:44 FIx for #1472251
Messages (6)
msg50058 - (view) Author: Kuba Kończyk (jakamkon) Date: 2006-04-18 12:22
This simple patch ensure that the first argument to the
'run/runeval' functions is string.See Bug #1472251 for
more details.
msg50059 - (view) Author: Ilya Sandler (isandler) Date: 2006-06-18 22:07
Logged In: YES 
user_id=971153

I am not sure whether the original bug  is indeed a bug.
(see discussion of that bug)...

And even if #1472251 is deemed a bug, the patch has a couple
of unrelated problems:

1. bdb.py should not print anything on stdout

2. current bdb.py's run() accepts code objects, the patch
breaks it.

Should the patch be rejected?
msg50060 - (view) Author: Kuba Kończyk (jakamkon) Date: 2006-06-19 14:44
Logged In: YES 
user_id=1491175

1.Why?bdb.py prints informations about breakpoints to stdout
in bpprint function.

2.This is correct.Comment right before run function should
be updated to point that bdb.py's run could be used also
with code objects.

According to the pdb's documentation, run command should be
invoked only with statement given as a string.Run's argument
checking and error message could be placed in pdb's run
function.I included new patch.What's your opinion?
msg50061 - (view) Author: Ilya Sandler (isandler) Date: 2006-06-25 16:25
Logged In: YES 
user_id=971153

...1.Why?bdb.py prints informations about breakpoints to
stdout in bpprint function....

I am not sure printing to stdout in bpprint was a good
decision! Really, if bdb is intended to be a low-level
debugging module, it should not print anything to stdout...

..I included new patch.What's your opinion?...

A couple of comments:
 1) the latest pdb's output goes through redirection. The
patch does not..
 2) Is it really necessary to restrict pdb's run() to
strings? Being able to pass a code object seems like a
useful thing (I know that pdb docs explicitly say that the
1st arg must be a string)
 3) finally, I guess I am not sure about the general
approach to argument type checking in stdlib. 
(is it really pdb's business to check run() arguments? E.g
if bdb's run() supports other types (say, UserString or
file), pdb's type checking would have to change)...


I guess, I am  -0 on this patch..
msg50062 - (view) Author: Kuba Kończyk (jakamkon) Date: 2006-07-11 13:29
Logged In: YES 
user_id=1491175

There's no uploaded file!  You have to check the
checkbox labeled "Check to Upload & Attach File"
when you upload a file. In addition, even if you
*did* check this checkbox, a bug in SourceForge
prevents attaching a file when *creating* an issue.

Please try again.

(This is a SourceForge annoyance that we can do
nothing about. :-( )
msg50063 - (view) Author: Kuba Kończyk (jakamkon) Date: 2006-07-11 13:29
Logged In: YES 
user_id=1491175

Arguments 2) and 3) convinced me that my patch is not
proper solution.It simply introduces unnecessary
restrictions to bdb.I'll set this to Closed/Rejected.Thanks
for all your comments.
 
History
Date User Action Args
2022-04-11 14:56:16adminsetgithub: 43240
2009-03-21 02:13:27ajaksu2linkissue1472251 dependencies
2006-04-18 12:22:26jakamkoncreate