[Python-Dev] sys.last_traceback - annoying pdb.pm behaviour

2007-08-18 Thread Alexander Schremmer
Hi there,

when trying to use pdb, I spotted some kind of annoying behaviour of pdb:
for pdb.pm, it still uses sys.last_traceback which is set by code.py

This renders the function unusable in non-interactive contexts ... I suggest
to change pdb.pm to use sys.exc_traceback instead. Any reasons not to do
so?

For Py3k, it might make sense to kill it.

Besides that, some other places in the stdlib reference this attr as well:

idle in 5 places
./lib-tk/Tkinter.py:sys.last_traceback = tb
./traceback.py:sys.last_value, sys.last_traceback, limit, file)'."""
./traceback.py:print_exception(sys.last_type, sys.last_value,
sys.last_traceback,
./pdb.py:post_mortem(sys.last_traceback)
./code.py:type, value, sys.last_traceback = sys.exc_info()
./code.py:sys.last_traceback = tb
./dis.py:tb = sys.last_traceback

Kind regards,
Alexander

___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] sys.last_traceback - annoying pdb behaviour

2007-08-18 Thread Alexander Schremmer
Hi there,

when I tried to use pdb, I spotted some kind of annoying behaviour of pdb:
for pdb.pm, it still uses sys.last_traceback which is set by code.py

This renders the function unusable in non-interactive contexts ... I suggest
to change pdb.pm to use sys.exc_traceback instead. Any reasons not to do
so?

For Py3k, it might make sense to kill it completly.

Besides that, some other places in the stdlib reference this attr as well:

idle in 5 places
./lib-tk/Tkinter.py:        sys.last_traceback = tb
./traceback.py:    sys.last_value, sys.last_traceback, limit, file)'."""
./traceback.py:    print_exception(sys.last_type, sys.last_value,
sys.last_traceback,
./pdb.py:    post_mortem(sys.last_traceback)
./code.py:        type, value, sys.last_traceback = sys.exc_info()
./code.py:            sys.last_traceback = tb
./dis.py:            tb = sys.last_traceback

Kind regards,
Alexander

___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] sys.last_traceback - annoying pdb behaviour

2007-08-18 Thread Guido van Rossum
sys.last_traceback is the only place where you can reliably find the
latest *uncaught* traceback. There is no intention to get rid of it in
Py3k or to change this behavior. If you have another traceback you'd
like to print, you can use pdb.post_mortem(sys.exc_info()[2]).

On 8/18/07, Alexander Schremmer <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> when I tried to use pdb, I spotted some kind of annoying behaviour of pdb:
> for pdb.pm, it still uses sys.last_traceback which is set by code.py
>
> This renders the function unusable in non-interactive contexts ... I suggest
> to change pdb.pm to use sys.exc_traceback instead. Any reasons not to do
> so?
>
> For Py3k, it might make sense to kill it completly.
>
> Besides that, some other places in the stdlib reference this attr as well:
>
> idle in 5 places
> ./lib-tk/Tkinter.py: sys.last_traceback = tb
> ./traceback.py: sys.last_value, sys.last_traceback, limit, file)'."""
> ./traceback.py: print_exception(sys.last_type, sys.last_value,
> sys.last_traceback,
> ./pdb.py: post_mortem(sys.last_traceback)
> ./code.py: type, value, sys.last_traceback = sys.exc_info()
> ./code.py: sys.last_traceback = tb
> ./dis.py: tb = sys.last_traceback
>
> Kind regards,
> Alexander
>
> ___
> Python-Dev mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> http://mail.python.org/mailman/options/python-dev/guido%40python.org
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] sys.last_traceback - annoying pdb behaviour

2007-08-18 Thread Alexander Schremmer
Guido van Rossum wrote:

> On 8/18/07, Alexander Schremmer <[EMAIL PROTECTED]> wrote:

>> when I tried to use pdb, I spotted some kind of annoying behaviour of
>> pdb: for pdb.pm, it still uses sys.last_traceback which is set by code.py
>>
>> This renders the function unusable in non-interactive contexts ... I
>> suggest to change pdb.pm to use sys.exc_traceback instead. Any reasons
>> not to do so?

> sys.last_traceback is the only place where you can reliably find the
> latest *uncaught* traceback. There is no intention to get rid of it in
> Py3k or to change this behavior. If you have another traceback you'd
> like to print, you can use pdb.post_mortem(sys.exc_info()[2]).

Indeed, I did not see that it is also set in pythonrun. How do you think
about changing pdb.pm to use exc_info if last_exception is not set?

Kind regards,
Alexander

___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] sys.last_traceback - annoying pdb behaviour

2007-08-18 Thread Guido van Rossum
On 8/18/07, Alexander Schremmer <[EMAIL PROTECTED]> wrote:
> Indeed, I did not see that it is also set in pythonrun. How do you think
> about changing pdb.pm to use exc_info if last_exception is not set?

That would just confuse you if you're counting on that behavior, and
then some time later last_exception gets set and you suddenly don't
get the behavior you expected. pdb.pm() is *only* for use at the
command-line prompt (that's why its name is so short :-).

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] PEP 11 update - Call for port maintainers to step forward

2007-08-18 Thread skip
I made a quick update to PEP 11, "Removing support for little used
platforms".  I added details about ending support for AtheOS/Syllable and
BeOS.

I also added a yet-to-be-fleshed out section entitled "Platform
Maintainers".  I intend that to the extent possible we document the
responsible parties for various platforms.  Obviously, common platforms like
Windows, Mac OS X, Linux and common Unix platforms (Solaris, *BSD, what
else?)  will continue to be supported by the core Python developer
community, but lesser platforms should have one or more champions, and we
should be able to get ahold of them to determine their continued interest in
supporting Python on their platform(s).  If you are the "owner" of a minor
platform, please drop me a note.  Ones I'm aware of that probably need
specialized support outside the core Python developers include:

IRIX
Tru64 (aka OSF/1 and other names (what else?))
OS2/EMX (Andrew MacIntyre?)
Cygwin
MinGW
HP-UX
AIX
Solaris < version 8
SCO
Unixware

IRIX and Tru64 are likely to go the way of the dodo if someone doesn't step
up soon to offer support.  I don't expect the others to disappear soon, but
they tend to need more specialized support, especially in more "challenging"
areas (shared library support, threading, etc).

If you maintain the platform-specific aspects for any of these platforms,
please let me know.  If you aren't that person but know who is, please pass
this note along to them.  If I've missed any other platforms (I know I must
have have missed something), let me know that as well.

Thanks,

-- 
Skip Montanaro - [EMAIL PROTECTED] - http://www.webfast.com/~skip/
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Summary of Tracker Issues

2007-08-18 Thread Tracker

ACTIVITY SUMMARY (08/12/07 - 08/19/07)
Tracker at http://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue 
number.  Do NOT respond to this message.


 1300 open ( +5) / 11141 closed ( +0) / 12441 total ( +5)

Average duration of open issues: 694 days.
Median duration of open issues: 553 days.

Open Issues Breakdown
   open  1300 ( +5)
pending 0 ( +0)

Issues Created Or Reopened (5)
__

Test 08/17/07
   http://bugs.python.org/issue1000created  loewis 

urllib2 hangs with some documents.   08/12/07
   http://bugs.python.org/issue1772481 created  acreature  

dir() on traceback objects returns an empty list 08/12/07
   http://bugs.python.org/issue1772489 created  collinwinter   

Replacing char* with const char* 08/12/07
   http://bugs.python.org/issue1772673 created  ext-   

exec() doesn't take an open file 08/12/07
   http://bugs.python.org/issue1772686 created  nnorwitz   



Issues Now Closed (1)
_

words able to decode but unable to encode in GB18030   4 days
   http://bugs.python.org/issue1770551 perky  



___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Weekly Python Patch/Bug Summary

2007-08-18 Thread Kurt B. Kaiser
Patch / Bug Summary
___

Patches :  417 open (+13) /  3855 closed ( +0) /  4272 total (+13)
Bugs: 1069 open ( +4) /  6800 closed (+10) /  7869 total (+14)
RFE :  262 open ( -1) /   296 closed ( +1) /   558 total ( +0)

New / Reopened Patches
__

Replacing char* with const char*  (2007-08-12)
   http://python.org/sf/1772673  opened by  eXt

[python-mode] Properly highlight lambda with no arguments  (2007-08-12)
   http://python.org/sf/1772721  opened by  Michal Kwiatkowski

-q (quiet) option for python interpreter  (2007-08-13)
   http://python.org/sf/1772833  opened by  Marcin Wojdyr

Decimal and long hash, compatibly and efficiently  (2007-08-13)
   http://python.org/sf/1772851  opened by  Mark Dickinson

Remove references to _xmlrpclib from xmlrpclib.py  (2007-08-14)
   http://python.org/sf/1773632  opened by  Alan McIntyre

Unify __builtins__ -> __builtin__  (2007-08-15)
   http://python.org/sf/1774369  opened by  Christian Heimes

Add Checkbutton get() and set(value)  (2007-08-14)
   http://python.org/sf/1774370  opened by  Graham Horler

Make it possible to use SVK to develop Python  (2007-08-14)
   http://python.org/sf/1774414  opened by  Collin Winter

Override flags set by IOBase in io.StringIO  (2007-08-15)
   http://python.org/sf/1774828  opened by  Alexandre Vassalotti

Convert str to bytes in io.BytesIO.__init__  (2007-08-15)
   http://python.org/sf/1774833  opened by  Alexandre Vassalotti

zipfile: Allow reading duplicate filenames  (2007-08-15)
   http://python.org/sf/1775025  opened by  Graham Horler

utt-32 codecs  (2007-08-16)
   http://python.org/sf/1775604  opened by  Walter Dörwald

Minor corrections to smtplib  (2007-08-17)
   http://python.org/sf/1776581  opened by  Alan McIntyre

New / Reopened Bugs
___

urllib2 hangs with some documents.  (2007-08-12)
   http://python.org/sf/1772481  opened by  Creature

dir() on traceback objects returns an empty list  (2007-08-11)
CLOSED http://python.org/sf/1772489  opened by  Collin Winter

exec() doesn't take an open file  (2007-08-12)
CLOSED http://python.org/sf/1772686  opened by  Neal Norwitz

chr(128) in u'only ascii' -> TypeError with misleading msg  (2007-08-13)
   http://python.org/sf/1772788  opened by  Pekka Laukkanen

Using telnetlib fails with unicode strings containing only a  (2007-08-13)
   http://python.org/sf/1772794  opened by  Pekka Laukkanen

Py Lib Ref, 3.6.1 String Methods startswith() typo  (2007-08-13)
CLOSED http://python.org/sf/1772890  opened by  arxaaron

xmlrpclib crash when PyXML installed  (2007-08-13)
   http://python.org/sf/1772916  opened by  lplatypus

Binding  fails  (2007-08-15)
   http://python.org/sf/1774736  opened by  Ali Gholami Rudi

Not exiting when running tests  (2007-08-15)
   http://python.org/sf/1774840  opened by  José Pablo "Pupeno" Fernández

Display CallTips for classes using metaclasses.  (2007-08-16)
   http://python.org/sf/1775388  opened by  Noam Raphael

Buffer overflow when listing deeply nested directory  (2007-08-17)
   http://python.org/sf/1776160  opened by  Björn Lindqvist

glob.glob inconsistent  (2007-08-18)
   http://python.org/sf/1776674  opened by  norbidur

tempfile.TemporaryFile differs between platforms  (2007-08-18)
   http://python.org/sf/1776696  opened by  Kenneth Loafman

memoryview('test') is causing a segfault  (2007-08-19)
   http://python.org/sf/1777057  opened by  Christian Heimes

Bugs Closed
___

ERROR - Microsoft Visual C++ Runtime Library  (2007-05-18)
   http://python.org/sf/1721161  closed by  gbrandl

dir() on traceback objects returns an empty list  (2007-08-11)
   http://python.org/sf/1772489  closed by  collinwinter

words able to decode but unable to encode in GB18030  (2007-08-09)
   http://python.org/sf/1770551  closed by  perky

exec() doesn't take an open file  (2007-08-12)
   http://python.org/sf/1772686  closed by  bcannon

Py Lib Ref, 3.6.1 String Methods startswith() typo  (2007-08-13)
   http://python.org/sf/1772890  closed by  gbrandl

decimal.Decimal("trash") produces informationless exception  (2007-08-08)
   http://python.org/sf/1770009  closed by  facundobatista

mark deprecated modules in indexes  (2003-10-02)
   http://python.org/sf/816725  closed by  gbrandl

Python function/method/constant names as HTML-tag IDs  (2005-07-24)
   http://python.org/sf/1243945  closed by  gbrandl

Collapse distutils docs  (2005-12-07)
   http://python.org/sf/1375258  closed by  gbrandl

some section links (previous, up, next) missing last word  (2006-09-15)
   http://python.org/sf/1559142  closed by  gbrandl

RFE Closed
__

-q (quiet) option for python interpreter  (2007-05-30)
   http://python.org/sf/1728488  closed by  wojdyr

___
Python-Dev mailing list
[email protected]
http://mail.python.org/m