[ python-Bugs-1188231 ] Rebuilding from source on RH9 fails (_tkinter.so missing)

2005-07-30 Thread SourceForge.net
Bugs item #1188231, was opened at 2005-04-23 04:21
Message generated for change (Comment added) made by green-ghost
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1188231&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Build
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Marty Heyman (mheyman)
Assigned to: Nobody/Anonymous (nobody)
Summary: Rebuilding from source on RH9 fails (_tkinter.so missing)

Initial Comment:
On a Red Hat 9 system, I downloaded the python2.4-2.4.
1-1pydotorg.src.rpm and, following the web page ran "rpm --rebuild .
..". It went a long for a good long while with no apparent errors and 
then said:

---

RPM build errors:
   File not found by glob: /var/tmp/python2.4-2.4.
1-root/usr/lib/python2.4/lib-dynload/_tkinter.so*

---
I looked in the directory and there is, in fact, no _tkinter.so file(s) 
there. 

--
Marty Heyman

--

Comment By: green-ghost (green-ghost)
Date: 2005-07-31 01:35

Message:
Logged In: YES 
user_id=1321225

I had a similar problem compiling python from source on a
(nominally) redhat8 system.  For whatever reason, X11
headers were not installed (probably because it's a server I
only use from an ssh console). YMMV

Try:
apt-get install XFree86-devel
or:
rpm -i XFree86-devel-.rpm

--

Comment By: Martin v. Löwis (loewis)
Date: 2005-05-03 07:16

Message:
Logged In: YES 
user_id=21627

Ah, so it seems you are lacking the X11 header files. They
should have been installed as a dependency on the Tk
headers. So this is either a Redhat bug (for not including a
dependency of the -dev packages) or a local misconfiguration
of some kind (e.g. forcefully installing Tk headers without
all prerequisites present).

--

Comment By: Marty Heyman (mheyman)
Date: 2005-04-23 04:42

Message:
Logged In: YES 
user_id=421967

APOLOGIES: ADDITIONAL INFO FOLLOWS 
---Snip from rebuild output follows
In file included from
/usr/src/redhat/BUILD/Python-2.4.1/Modules/_tkinter.c:67:
/usr/include/tk.h:83:29: X11/Xlib.h: No such file or directory
In file included from
/usr/src/redhat/BUILD/Python-2.4.1/Modules/_tkinter.c:67:
/usr/include/tk.h:581: parse error before "Bool"
/usr/include/tk.h:583: parse error before "event"
/usr/include/tk.h:584: parse error before "root"
/usr/include/tk.h:585: parse error before "subwindow"
/usr/include/tk.h:586: parse error before "time"
/usr/include/tk.h:586: `time' redeclared as different kind
of symbol
/usr/include/time.h:184: previous declaration of `time'
/usr/include/tk.h:591: parse error before "same_screen"
--- snip ends
many more "parse error lines occurred after this. I doubt
they're interesting .
A bit later, another group of failures begins
--Snip starts
In file included from /usr/include/tk.h:1361,
 from
/usr/src/redhat/BUILD/Python-2.4.1/Modules/_tkinter.c:67:
/usr/include/tkDecls.h:37: parse error before '*' token
/usr/include/tkDecls.h:39: parse error before "Tk_3DBorderGC"
/usr/include/tkDecls.h:45: parse error before "Drawable"
/usr/include/tkDecls.h:50: parse error before "Drawable"
/usr/include/tkDecls.h:58: parse error before "XEvent"
--Snip ends
   Again, there are many more similar messages following
those and then:
--Snip starts
/usr/include/tkDecls.h:843: `GC' declared as function
returning a function
... [parse errors]
/usr/include/tkDecls.h:906: `Font' declared as function
returning a function
--Snip ends
There are many such embedded in that group. Then the
messages stop followed by a line that says: "running
build_scripts" ... and things proceed as if all was OK for
hundreds more lines of output before the failure copied into
the original report.

I captured the complete log and can upload it if needed on
request. I'd need to trim it and it doesn't look all that
interesting otherwise but then, what do I know :-)


--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1188231&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1248036 ] error in popen2() reference

2005-07-30 Thread SourceForge.net
Bugs item #1248036, was opened at 2005-07-30 13:51
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248036&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Lorenzo Luengo (lolxp)
Assigned to: Nobody/Anonymous (nobody)
Summary: error in popen2() reference

Initial Comment:
http://www.python.org/doc/2.4/lib/module-popen2.html
says:
popen2( cmd[, bufsize[, mode]])
Executes cmd as a sub-process. Returns the file
objects (child_stdout, child_stdin).

must say:
popen2( cmd[, bufsize[, mode]])
Executes cmd as a sub-process. Returns the file
objects (child_stdin, child_stdout).



--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248036&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1248036 ] error in popen2() reference

2005-07-30 Thread SourceForge.net
Bugs item #1248036, was opened at 2005-07-30 19:51
Message generated for change (Comment added) made by birkenfeld
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248036&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Python 2.4
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Lorenzo Luengo (lolxp)
Assigned to: Nobody/Anonymous (nobody)
Summary: error in popen2() reference

Initial Comment:
http://www.python.org/doc/2.4/lib/module-popen2.html
says:
popen2( cmd[, bufsize[, mode]])
Executes cmd as a sub-process. Returns the file
objects (child_stdout, child_stdin).

must say:
popen2( cmd[, bufsize[, mode]])
Executes cmd as a sub-process. Returns the file
objects (child_stdin, child_stdout).



--

>Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-07-30 20:39

Message:
Logged In: YES 
user_id=1188172

The docs are correct. Note that the popen2.popen2 method has
a different return value than os.popen2.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248036&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1248119 ] pdb 'next' does not skip list comprehension

2005-07-30 Thread SourceForge.net
Bugs item #1248119, was opened at 2005-07-31 09:12
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248119&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Joseph Heled (pepster)
Assigned to: Nobody/Anonymous (nobody)
Summary: pdb 'next' does not skip list comprehension

Initial Comment:
pdb next command forces you to step over each list element.

This seem to be a reincarnation of this old bug.
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=523995&group_id=5470

Version:
Python 2.4.1 (#2, Mar 30 2005, 21:51:10) 
[GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2



--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248119&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1248127 ] set of pdb breakpoint fails

2005-07-30 Thread SourceForge.net
Bugs item #1248127, was opened at 2005-07-31 09:29
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248127&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Joseph Heled (pepster)
Assigned to: Nobody/Anonymous (nobody)
Summary: set of pdb breakpoint fails

Initial Comment:
I can't set any pdb breakpoint. I try the command,

(Pdb) break a:847
Breakpoint 4 at /home/joseph/743/rod/a.py:847

I get the message,

"pdbtrack: Traceback cue not found"

The breakpoint is never activated.

Python 2.4.1 (#2, Mar 30 2005, 21:51:10) 
[GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2


--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248127&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1248127 ] set of pdb breakpoint fails

2005-07-30 Thread SourceForge.net
Bugs item #1248127, was opened at 2005-07-30 14:29
Message generated for change (Comment added) made by isandler
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248127&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Joseph Heled (pepster)
Assigned to: Nobody/Anonymous (nobody)
Summary: set of pdb breakpoint fails

Initial Comment:
I can't set any pdb breakpoint. I try the command,

(Pdb) break a:847
Breakpoint 4 at /home/joseph/743/rod/a.py:847

I get the message,

"pdbtrack: Traceback cue not found"

The breakpoint is never activated.

Python 2.4.1 (#2, Mar 30 2005, 21:51:10) 
[GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2


--

Comment By: Ilya Sandler (isandler)
Date: 2005-07-30 17:07

Message:
Logged In: YES 
user_id=971153

Could you provide an example (if possible a small one)?
There are many reasons why a breakpoint may not be reachable..

Also it seems like you are running pdb under emacs, is it
correct?
Can you reproduce the problem outside of emacs?




--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248127&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1248119 ] pdb 'next' does not skip list comprehension

2005-07-30 Thread SourceForge.net
Bugs item #1248119, was opened at 2005-07-30 14:12
Message generated for change (Comment added) made by isandler
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248119&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Joseph Heled (pepster)
Assigned to: Nobody/Anonymous (nobody)
Summary: pdb 'next' does not skip list comprehension

Initial Comment:
pdb next command forces you to step over each list element.

This seem to be a reincarnation of this old bug.
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=523995&group_id=5470

Version:
Python 2.4.1 (#2, Mar 30 2005, 21:51:10) 
[GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2



--

Comment By: Ilya Sandler (isandler)
Date: 2005-07-30 17:33

Message:
Logged In: YES 
user_id=971153


I changed bdb.py to print the kind of event it receives as
well as as line numbers and here is a session which
illustrates the bug...

 bagira:~/python/dist/src/bug-next1248119> cat t
 #../python
 y=[1,2,3,4]
 x=[ i+1 for i in y]
 print x
 bagira:~/python/dist/src/bug-next1248119> ../python -m pdb t
 event: call; line 1, file 
 event: line; line 1, file 
 event: call; line 2, file t
 event: line; line 2, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(2)?()
 -> y=[1,2,3,4]
 (Pdb) n
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]
 (Pdb) n
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]
 (Pdb) n
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]
 (Pdb) 
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]

So it appears that the interpreter generates "line" events
for every iteration of the loop..

Would this be a bug in the interpreter (and not in pdb/bdb)?




--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248119&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1248119 ] pdb 'next' does not skip list comprehension

2005-07-30 Thread SourceForge.net
Bugs item #1248119, was opened at 2005-07-30 14:12
Message generated for change (Comment added) made by isandler
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248119&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Joseph Heled (pepster)
Assigned to: Nobody/Anonymous (nobody)
Summary: pdb 'next' does not skip list comprehension

Initial Comment:
pdb next command forces you to step over each list element.

This seem to be a reincarnation of this old bug.
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=523995&group_id=5470

Version:
Python 2.4.1 (#2, Mar 30 2005, 21:51:10) 
[GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2



--

Comment By: Ilya Sandler (isandler)
Date: 2005-07-30 17:59

Message:
Logged In: YES 
user_id=971153


A bit more information. I looked into what happens in
ceval.c and apparently the current behaviour is intentional..

Looks like this piece of code:

else if (frame->f_lasti <= *instr_prev) {
/* jumping back in the same line forces a trace event */
result = call_trace(func, obj, frame,
PyTrace_LINE, Py_None);
}

in maybe_call_line_trace() is responsible for the extra
"line" events..
Seems like this piece of code was added to fix bug #765624.
in ceval.c:2.386

So, should this (1248119) bug be dealt with by skipping
extra line events in bdb?

Any thoughts? Or am I totally lost?


--

Comment By: Ilya Sandler (isandler)
Date: 2005-07-30 17:33

Message:
Logged In: YES 
user_id=971153


I changed bdb.py to print the kind of event it receives as
well as as line numbers and here is a session which
illustrates the bug...

 bagira:~/python/dist/src/bug-next1248119> cat t
 #../python
 y=[1,2,3,4]
 x=[ i+1 for i in y]
 print x
 bagira:~/python/dist/src/bug-next1248119> ../python -m pdb t
 event: call; line 1, file 
 event: line; line 1, file 
 event: call; line 2, file t
 event: line; line 2, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(2)?()
 -> y=[1,2,3,4]
 (Pdb) n
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]
 (Pdb) n
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]
 (Pdb) n
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]
 (Pdb) 
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]

So it appears that the interpreter generates "line" events
for every iteration of the loop..

Would this be a bug in the interpreter (and not in pdb/bdb)?




--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248119&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1248199 ] shelve .sync operation not documented

2005-07-30 Thread SourceForge.net
Bugs item #1248199, was opened at 2005-07-31 02:53
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248199&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: paul rubin (phr)
Assigned to: Nobody/Anonymous (nobody)
Summary: shelve .sync operation not documented

Initial Comment:
The shelve documentation doesn't describe how to flush
updates out to the disc file.  Without that, a
long-running server could go for months without writing
out any updates.  A server crash would then lose every
update.  I asked on clpy whether shelve really had such
a severe deficiency.  Thanks to Robert Kern for
mentioning the .sync() method, which does what is
needed.  The doc should definitely mention this. 
Shelve is much less useful without it.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248199&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1248119 ] pdb 'next' does not skip list comprehension

2005-07-30 Thread SourceForge.net
Bugs item #1248119, was opened at 2005-07-30 14:12
Message generated for change (Comment added) made by isandler
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248119&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Joseph Heled (pepster)
Assigned to: Nobody/Anonymous (nobody)
Summary: pdb 'next' does not skip list comprehension

Initial Comment:
pdb next command forces you to step over each list element.

This seem to be a reincarnation of this old bug.
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=523995&group_id=5470

Version:
Python 2.4.1 (#2, Mar 30 2005, 21:51:10) 
[GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2



--

Comment By: Ilya Sandler (isandler)
Date: 2005-07-30 20:20

Message:
Logged In: YES 
user_id=971153

While this behaviour indeed feels like a bug I'm starting to
think that it is not..

Observation1: 'step' should stop at every iteration of a
list comprehension

Observation2: the only difference between 'step' and 'next'
 is that 'step' steps into function calls (which is not the
case here)

So, it seems like 'next' should also stop at every iteration
of a list comprehenstion. Ie current behaviour is not a bug...

Would supporting a numeric argument for the 'next' command
make sense? 

So that 'next 1' would mean "stop when actual line number
increases by at least 1"...




--

Comment By: Ilya Sandler (isandler)
Date: 2005-07-30 17:59

Message:
Logged In: YES 
user_id=971153


A bit more information. I looked into what happens in
ceval.c and apparently the current behaviour is intentional..

Looks like this piece of code:

else if (frame->f_lasti <= *instr_prev) {
/* jumping back in the same line forces a trace event */
result = call_trace(func, obj, frame,
PyTrace_LINE, Py_None);
}

in maybe_call_line_trace() is responsible for the extra
"line" events..
Seems like this piece of code was added to fix bug #765624.
in ceval.c:2.386

So, should this (1248119) bug be dealt with by skipping
extra line events in bdb?

Any thoughts? Or am I totally lost?


--

Comment By: Ilya Sandler (isandler)
Date: 2005-07-30 17:33

Message:
Logged In: YES 
user_id=971153


I changed bdb.py to print the kind of event it receives as
well as as line numbers and here is a session which
illustrates the bug...

 bagira:~/python/dist/src/bug-next1248119> cat t
 #../python
 y=[1,2,3,4]
 x=[ i+1 for i in y]
 print x
 bagira:~/python/dist/src/bug-next1248119> ../python -m pdb t
 event: call; line 1, file 
 event: line; line 1, file 
 event: call; line 2, file t
 event: line; line 2, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(2)?()
 -> y=[1,2,3,4]
 (Pdb) n
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]
 (Pdb) n
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]
 (Pdb) n
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]
 (Pdb) 
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]

So it appears that the interpreter generates "line" events
for every iteration of the loop..

Would this be a bug in the interpreter (and not in pdb/bdb)?




--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248119&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1248119 ] pdb 'next' does not skip list comprehension

2005-07-30 Thread SourceForge.net
Bugs item #1248119, was opened at 2005-07-31 09:12
Message generated for change (Comment added) made by pepster
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248119&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Joseph Heled (pepster)
Assigned to: Nobody/Anonymous (nobody)
Summary: pdb 'next' does not skip list comprehension

Initial Comment:
pdb next command forces you to step over each list element.

This seem to be a reincarnation of this old bug.
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=523995&group_id=5470

Version:
Python 2.4.1 (#2, Mar 30 2005, 21:51:10) 
[GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2



--

>Comment By: Joseph Heled (pepster)
Date: 2005-07-31 18:02

Message:
Logged In: YES 
user_id=86677


You probably never use pdb in a real program, otherwise you
would realize what a serious bummer this is. 

Giving a 'next N' is nice, but will not be a real solution.
Somethims it is not easy to know how many iterations there
are. And when they are nested etc.

If you are convinced this is the desired and reasonable
behaviour for next (a point of view I don't share), at least
have a different command to skip to the next line. I am
sorry but I have no idea if this is easy or hard.

Thanks, Joseph

--

Comment By: Ilya Sandler (isandler)
Date: 2005-07-31 15:20

Message:
Logged In: YES 
user_id=971153

While this behaviour indeed feels like a bug I'm starting to
think that it is not..

Observation1: 'step' should stop at every iteration of a
list comprehension

Observation2: the only difference between 'step' and 'next'
 is that 'step' steps into function calls (which is not the
case here)

So, it seems like 'next' should also stop at every iteration
of a list comprehenstion. Ie current behaviour is not a bug...

Would supporting a numeric argument for the 'next' command
make sense? 

So that 'next 1' would mean "stop when actual line number
increases by at least 1"...




--

Comment By: Ilya Sandler (isandler)
Date: 2005-07-31 12:59

Message:
Logged In: YES 
user_id=971153


A bit more information. I looked into what happens in
ceval.c and apparently the current behaviour is intentional..

Looks like this piece of code:

else if (frame->f_lasti <= *instr_prev) {
/* jumping back in the same line forces a trace event */
result = call_trace(func, obj, frame,
PyTrace_LINE, Py_None);
}

in maybe_call_line_trace() is responsible for the extra
"line" events..
Seems like this piece of code was added to fix bug #765624.
in ceval.c:2.386

So, should this (1248119) bug be dealt with by skipping
extra line events in bdb?

Any thoughts? Or am I totally lost?


--

Comment By: Ilya Sandler (isandler)
Date: 2005-07-31 12:33

Message:
Logged In: YES 
user_id=971153


I changed bdb.py to print the kind of event it receives as
well as as line numbers and here is a session which
illustrates the bug...

 bagira:~/python/dist/src/bug-next1248119> cat t
 #../python
 y=[1,2,3,4]
 x=[ i+1 for i in y]
 print x
 bagira:~/python/dist/src/bug-next1248119> ../python -m pdb t
 event: call; line 1, file 
 event: line; line 1, file 
 event: call; line 2, file t
 event: line; line 2, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(2)?()
 -> y=[1,2,3,4]
 (Pdb) n
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]
 (Pdb) n
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]
 (Pdb) n
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]
 (Pdb) 
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]

So it appears that the interpreter generates "line" events
for every iteration of the loop..

Would this be a bug in the interpreter (and not in pdb/bdb)?




--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248119&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1248127 ] set of pdb breakpoint fails

2005-07-30 Thread SourceForge.net
Bugs item #1248127, was opened at 2005-07-31 09:29
Message generated for change (Comment added) made by pepster
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248127&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Joseph Heled (pepster)
Assigned to: Nobody/Anonymous (nobody)
Summary: set of pdb breakpoint fails

Initial Comment:
I can't set any pdb breakpoint. I try the command,

(Pdb) break a:847
Breakpoint 4 at /home/joseph/743/rod/a.py:847

I get the message,

"pdbtrack: Traceback cue not found"

The breakpoint is never activated.

Python 2.4.1 (#2, Mar 30 2005, 21:51:10) 
[GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2


--

>Comment By: Joseph Heled (pepster)
Date: 2005-07-31 18:30

Message:
Logged In: YES 
user_id=86677

I tried a simple example outside emacs and it worked.

Here is how it fails in emacs -
visit a python buffer
Do C-cC-c  (py-execute-buffer)
run pdb.run("some code")
Try to set a breakpoint - get the "pdbtrack: Traceback cue
not found"
, and breakpoint never executed.

I am not sure if it is supposed to work or not.



--

Comment By: Ilya Sandler (isandler)
Date: 2005-07-31 12:07

Message:
Logged In: YES 
user_id=971153

Could you provide an example (if possible a small one)?
There are many reasons why a breakpoint may not be reachable..

Also it seems like you are running pdb under emacs, is it
correct?
Can you reproduce the problem outside of emacs?




--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1248127&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com