[issue1516078] dbhash __len__ not reliable

2008-01-22 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Works for me in 2.5 and 2.4 isn't getting bug fixes anymore.

>>> import dbhash
>>> d = dbhash.open('x.db', 'w')
>>> d['e'] = 'Eee'
>>> d['f'] = 'Ffff'
>>> len(d)
2
>>> len(d)
2

It was likely fixed by this:


r46684 | gregory.p.smith | 2006-06-05 16:59:37 -0700 (Mon, 05 Jun 2006)
| 5 line
s

- bsddb: the __len__ method of a DB object has been fixed to return correct
  results.  It could previously incorrectly return 0 in some cases.
  Fixes SF bug 1493322 (pybsddb bug 1184012).

--
nosy: +gregory.p.smith
resolution:  -> fixed
status: open -> closed

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1541671] bsddb can't use unicode filenames

2008-01-22 Thread Gregory P. Smith

Changes by Gregory P. Smith:


--
priority: normal -> low
resolution:  -> wont fix
status: open -> closed

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1571754] Building using Sleepycat db 4.5.20 is broken

2008-01-22 Thread Gregory P. Smith

Gregory P. Smith added the comment:

4.5 support was put in a while back

--
nosy: +gregory.p.smith
resolution:  -> fixed
status: open -> closed

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1910] _threading_local should use with

2008-01-22 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I appreciate the patch submission but am going to reject it.  The 
try/finally form is faster.  In general, I think we only want to do 
this in code that isn't performance critical and that would be made 
much cleaner.

--
nosy: +rhettinger
resolution:  -> rejected
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1910] _threading_local should use with

2008-01-22 Thread Christian Heimes

Christian Heimes added the comment:

Thanks! :)
Lot's of code doesn't use the with statement yet. Feel free to
contribute more fixes.

--
keywords: +easy, patch
nosy: +tiran
priority:  -> low

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1912] Segmentation fault

2008-01-22 Thread Christian Heimes

Christian Heimes added the comment:

I don't think it's a bug in Python. The crash occurs inside the sip or
qt module, which means it's either a bug in sip, qt or pyqt. Please take
the bug to riverbank computing. Their code might have a memory leak or
reference counting issue.

--
nosy: +tiran
resolution:  -> invalid
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1736] Two bugs of FCICreate (PC/_msi.c)

2008-01-22 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto:


--
title: Three bugs of FCICreate (PC/_msi.c) -> Two bugs of FCICreate (PC/_msi.c)

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1912] Segmentation fault

2008-01-22 Thread Matti Punkeri

Matti Punkeri added the comment:

And the program is running on SuSE Linux, 2.6.11.4-20a-default, gcc 
version 3.3.5

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1912] Segmentation fault

2008-01-22 Thread Matti Punkeri

New submission from Matti Punkeri:

Python seg faults after 20-30 hours. The running Python application is 
a Qt based user interface which handles several SSH threads. Backtrace 
is attached.

--
files: backtrace.txt
messages: 61558
nosy: mpunkeri
severity: major
status: open
title: Segmentation fault
type: crash
versions: Python 2.4
Added file: http://bugs.python.org/file9270/backtrace.txt

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1736] Three bugs of FCICreate (PC/_msi.c)

2008-01-22 Thread Hirokazu Yamamoto

Hirokazu Yamamoto added the comment:

Sorry, I lied. What I said in bug 2 was totally wrong.
Meaning of 'i' was changed from original code and my patch.
There is no problem about buffer length. Thank you.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1819] Speed hack for function calls with named parameters

2008-01-22 Thread Guido van Rossum

Guido van Rossum added the comment:

Nice idea, but why set the priority to high?  I have no immediate time
to review this and probably won't for a while.

--
priority: high -> normal

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1911] webbrowser.open firefox 3 issues

2008-01-22 Thread Guido van Rossum

Guido van Rossum added the comment:

OK, since it's so simple I'll take it if noone else does. But anyone
else who feels like backporting this please go ahead!

--
assignee:  -> gvanrossum
keywords: +easy, patch
priority:  -> high

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1911] webbrowser.open firefox 3 issues

2008-01-22 Thread Jon Wilson

Jon Wilson added the comment:

I'm running 2.6.23.9 linux kernel fedora 8.

I've gone ahead and downloaded the subversion checkout of the
webbrowser.py file to see the differences.  The svn version fixes the
issue, so then I went a hunting as to why.

In the 2.5 version, with a version of firefox running out of my home
directory (but still in my path) webbrowser calles BackgroundBrowser
instead of UnixBrowser.

BackgroundBrowser calls subprocess.Popen(cmdline), where cmdline is a
tuble in form ['/browser/path', '"http://example.com";'], and subprocess
doesn't use/like the double quotes (probably legacy os.popen format)

The difference in the two webbrowser scripts that fixes it is thus:

446a445,455
> # The default Gnome browser
> if _iscommand("gconftool-2"):
> # get the web browser string from gconftool
> gc = 'gconftool-2 -g /desktop/gnome/url-handlers/http/command
2>/dev/n
ull'
> out = os.popen(gc)
> commd = out.read().strip()
> retncode = out.close()
> 
> # if successful, register it
> if retncode is None and commd:
> register("gnome", None, BackgroundBrowser(commd.split()))
448,456c457
< # The default GNOME browser
< if "GNOME_DESKTOP_SESSION_ID" in os.environ and
_iscommand("gnome-open"):
< register("gnome-open", None, BackgroundBrowser("gnome-open"))
< 
< # The default KDE browser
< if "KDE_FULL_SESSION" in os.environ and _iscommand("kfmclient"):
< register("kfmclient", Konqueror, Konqueror("kfmclient"))
< 
< # The Mozilla/Netscape browsers

so it appears to be a problem with gconf that python has to work around.

see:  https://bugs.launchpad.net/ubuntu/+source/python2.5/+bug/83974


So as long as it is in trunk 2.5.2 should fix it! (the patch is not in
2.5.1).  thanks.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1911] webbrowser.open firefox 3 issues

2008-01-22 Thread Guido van Rossum

Guido van Rossum added the comment:

What platform?

How come?

Got a fix that doesn't break for other browsers?

There's a 1-2 week window at most for getting fixes into 2.5.2!

--
nosy: +gvanrossum

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1911] webbrowser.open firefox 3 issues

2008-01-22 Thread Jon Wilson

New submission from Jon Wilson:

webbrowser.open('http://example.com')

opens something like:

file:///path/to/home/directory/"http://example.com";

in firefox 3 beta 2.  this behavior of firefox will most like not change
in the stable release.

--
components: Extension Modules
messages: 61552
nosy: elessar
severity: normal
status: open
title: webbrowser.open firefox 3 issues
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1910] _threading_local should use with

2008-01-22 Thread Benjamin Peterson

New submission from Benjamin Peterson:

I was reading _threading_local and noticed it didn't use the with
statment, yet. So, I cooked up this trivial patch. I hope this isn't to
small. Thanks for your time.

--
components: Library (Lib)
files: _threading_local-with-stmt.diff
messages: 61551
nosy: gutworth
severity: normal
status: open
title: _threading_local should use with
versions: Python 2.6
Added file: http://bugs.python.org/file9269/_threading_local-with-stmt.diff

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1651] Limit the max size of PyUnicodeObject->defenc?

2008-01-22 Thread Guido van Rossum

Guido van Rossum added the comment:

You wish.  In practice (unfortunately) it's still used quite a bit.  It
would be a good project to eradicate the need, but I see it as low priority.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1651] Limit the max size of PyUnicodeObject->defenc?

2008-01-22 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

For Py3k you can get rid of the cached default encoded version of the
Unicode object altogether:

This was only needed to make the Unicode/string auto-coercion mechanism
efficient in Python 2.x. In Py3k, you'll only do such conversions at the
IO-boundaries and explicitly, so caching the converted value is no
longer necessary.

--
nosy: +lemburg

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1034053] unittest.py patch: add skipped test functionality

2008-01-22 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola':


--
nosy: +giampaolo.rodola

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1651] Limit the max size of PyUnicodeObject->defenc?

2008-01-22 Thread Guido van Rossum

Guido van Rossum added the comment:

> * choose not to care, as the conversion looks rather rare

Yes.

> * incref the return value of _PyUnicode_AsDefaultEncodedString(),
> and convert the 20 or so places in which that function is used to
> properly decref the value when done

No. I suspect you'll find it quite difficult to pick a place where to do
the decref in some cases.

--
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1651] Limit the max size of PyUnicodeObject->defenc?

2008-01-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The default encoding version is generated lazily, and only from a couple
of places (if I believe my grepping through the py3k sources).
So we can:
 * choose not to care, as the conversion looks rather rare
 * incref the return value of _PyUnicode_AsDefaultEncodedString(), and
convert the 20 or so places in which that function is used to properly
decref the value when done

--
nosy: +pitrou

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1743] IDLE fails to launch

2008-01-22 Thread Martin v. Löwis

Martin v. Löwis added the comment:

As a follow-up, it appears that Windows didn't allow truncating hidden
or system files since Windows 2000. If you change the flags on .idlerc
to hidden in (say) W2k3, IDLE will also fail to start - so it's not a
Vista issue.

The question is why the folder "sudenly" became hidden - Python has no
API to make it so.

In any case, the proper solution is to delete the file rather than
overwriting it, perhaps like so

def save_overwrite_open(fname):
  try:
return open(fname,"w")
  except IOError:
os.unlink(fname)
return open(fname,"w")

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1743] IDLE fails to launch

2008-01-22 Thread Martin v. Löwis

Martin v. Löwis added the comment:

I've studied the problem with Process Monitor. If a file is hidden,
open(f, "w") fails, whereas os.open(f, os.W_OK|os.O_CREAT) succeeds.

In the succeeding call, process monitor reports

Desired Access: Generic Read/Write
Disposition:OpenIf
Options:Synchronous IO Non-Alert, Non-Directory File
Attributes: N
ShareMode:  Read, Write
AllocationSize: 0
OpenResult: Opened

In the failing call, it reports

Desired Access: Generic Write, Read Attributes
Disposition:OverwriteIf
Options:Synchronous IO Non-Alert, Non-Directory File
Attributes: N
ShareMode:  Read, Write
AllocationSize: 0

I then tried os.open(f, os.W_OK|os.CREAT|os.O_TRUNC) which also fails,
giving

Desired Access: Generic Read/Write
Disposition:OverwriteIf
Options:Synchronous IO Non-Alert, Non-Directory File
Attributes: N
ShareMode:  Read, Write
AllocationSize: 0

So it fails for FILE_OVERWRITE_IF, but succeeds for FILE_OPEN_IF. These 
map back to CREATE_ALWAYS and OPEN_ALWAYS - apparently, you can't 
truncate a hidden file on Vista.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1577] shutil.move() does not use os.rename() if dst is a directory

2008-01-22 Thread Guido van Rossum

Guido van Rossum added the comment:

Antoine: please just ignore me, even though I may once have written this
code, I clearly don't understand it any more. :-)

All we need now is a patch and someone to review it, right?

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1906] Distinguish between cfunction, cvar and cmacro

2008-01-22 Thread Georg Brandl

Georg Brandl added the comment:

"cmacro" is only for non-function-like macros, see the docs.

--
resolution:  -> invalid
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1221598] ftplib storbinary/storlines callback function

2008-01-22 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Another one. On line 542:

-# Note that the RFC doesn't say anything about 'SIZE'
+# SIZE command is defined in RFC-3659

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1577] shutil.move() does not use os.rename() if dst is a directory

2008-01-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Raghuram, I had understood that, I was answering Guido's objection :-)

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1577] shutil.move() does not use os.rename() if dst is a directory

2008-01-22 Thread Raghuram Devarakonda

Raghuram Devarakonda added the comment:

`shutil.move(source_file, destination_dir)` does move source_file to
destination_dir but the point is that even when source and destinations
are on the same file system, it still "copies" the data when there is no
need for it. The reason is explained in the very first comment.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1577] shutil.move() does not use os.rename() if dst is a directory

2008-01-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't see where there is a change in semantics. Today,
`shutil.move(source_file, destination_dir)` already moves source_file
inside the destination_dir (it doesn't replace the latter with the former).
Is there a misunderstanding?

--
nosy: +pitrou
versions: +Python 2.6 -Python 2.5

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1679] tokenizer permits invalid hex integer

2008-01-22 Thread Martin Rinehart

Martin Rinehart added the comment:

re 0x == 0

Thanks!

Added file: http://bugs.python.org/file9268/unnamed

__
Tracker <[EMAIL PROTECTED]>

__re 0x == 0Thanks!

___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1221598] ftplib storbinary/storlines callback function

2008-01-22 Thread Gregory P. Smith

Gregory P. Smith added the comment:

thanks.  applied (well, they will be when svn.python.org comes back)

On 1/22/08, Giampaolo Rodola' <[EMAIL PROTECTED]> wrote:
>
>
> Giampaolo Rodola' added the comment:
>
> Could I propose the following docstring corrections?
>
>

Added file: http://bugs.python.org/file9267/unnamed

_
Tracker <[EMAIL PROTECTED]>

_thanks.  applied (well, they will be when http://svn.python.org";>svn.python.org comes back)On 1/22/08, Giampaolo 
Rodola' 
[EMAIL PROTECTED]> wrote:Giampaolo Rodola' added the comment:
Could I propose the following docstring 
corrections?

___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1909] Backport: Mixing default keyword arguments with *args

2008-01-22 Thread Christian Heimes

Christian Heimes added the comment:

Raymond Hettinger wrote:
> Raymond Hettinger added the comment:
> 
> I mistakenly thought you had done this for Py3.0.

You're welcome, pal! :) I've created a backport of the kw only functions
for 2.6 but that doesn't make me an expert on grammar.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1909] Backport: Mixing default keyword arguments with *args

2008-01-22 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I mistakenly thought you had done this for Py3.0.

--
assignee: tiran -> 

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1909] Backport: Mixing default keyword arguments with *args

2008-01-22 Thread Christian Heimes

Christian Heimes added the comment:

Why have you assigned the bug to me? I ain't no grammar expert.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1121416] zip incorrectly and incompletely documented

2008-01-22 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Added wording to guarantee left-to-right evaluation.  See revision 60203.

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1866] const arg for PyInt_FromString

2008-01-22 Thread phil

Changes by phil:


Added file: http://bugs.python.org/file9266/autotest.out.after

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1818] Add named tuple reader to CSV module

2008-01-22 Thread Skip Montanaro

Skip Montanaro added the comment:

I'd personally be kind of surprised if Barry had any thoughts on this.
Is there any reason this couldn't be pushed down into the C code and
replace the normal tuple output completely?  In the absence of any
fieldnames you could just dream some up, like "field001", "field002",
etc.

Skip

--
nosy: +skip.montanaro

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1866] const arg for PyInt_FromString

2008-01-22 Thread phil

phil added the comment:

Oh, all right.  Just don't tell my boss -- he thinks I'm doing
"real" work.  :-)

I haven't thoroughly studied the test harness, but it looked like

  /bin/python /lib/python2.5/test/autotest.py

was what I should do?  The output generated before/after the patch
was identical.

Added file: http://bugs.python.org/file9265/Python-2.5.patch

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1909] Backport: Mixing default keyword arguments with *args

2008-01-22 Thread Raymond Hettinger

New submission from Raymond Hettinger:

Need to backport Py3.0's functionality so that the following is valid
syntax:

   def f(a, *args, v=None):
   . . .

--
assignee: tiran
components: Interpreter Core
messages: 61530
nosy: rhettinger, tiran
severity: normal
status: open
title: Backport: Mixing default keyword arguments with *args
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1221598] ftplib storbinary/storlines callback function

2008-01-22 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Could I propose the following docstring corrections?


@@ -313,7 +313,7 @@
 expected size may be None if it could not be determined.
 
 Optional `rest' argument can be a string that is sent as the
-argument to a RESTART command.  This is essentially a server
+argument to a REST(art) command.  This is essentially a server
 marker used to tell the server to skip over any data up to the
 given marker.
 """
@@ -403,7 +403,7 @@
 """Retrieve data in line mode.  A new port is created for you.
 
 Args:
-  cmd: A RETR or LIST command.
+  cmd: A RETR, LIST, NLST or MLSD command.
   callback: An optional single parameter callable that is called
 for each line with the trailing CRLF stripped.
 [default: print_line()]

--
nosy: +giampaolo.rodola

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1087741] subclassable mmap

2008-01-22 Thread Georg Brandl

Georg Brandl added the comment:

Committed as r60202. Thanks for the care!

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1621660] this module (Zen of Python) docs list broken URL

2008-01-22 Thread Christian Heimes

Christian Heimes added the comment:

I don't see a link with Python 2.6 or an url in the this code.

--
nosy: +tiran
resolution:  -> invalid
status: open -> closed

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1621660] this module (Zen of Python) docs list broken URL

2008-01-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I think the original poster alludes to the fact that when doing `import
this; help(this)`, the "module docs" section points to the autogenerated
URL `http://www.python.org/doc/current/lib/module-this.html`, which
doesn't exist.
Probably nothing very annoying though :-) I had never thought of asking
for help about the `this` module before...

--
nosy: +pitrou

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long)

2008-01-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The patch looks fine, but why isn't an union used instead of trying to
figure out the longest of both types?

--
nosy: +pitrou

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue462716] sys.settrace inheritance

2008-01-22 Thread Raghuram Devarakonda

Raghuram Devarakonda added the comment:

I haven't used settrace() functionality myself but a quick test using
latest python shows that trace function set with sys.settrace() is not
inherited by newly created threads.

I am closing this as there is no activity for long time.

--
nosy: +draghuram
resolution:  -> rejected
status: open -> closed


Tracker <[EMAIL PROTECTED]>


___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1818] Add named tuple reader to CSV module

2008-01-22 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Barry, any thoughts on this?

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1862] Error on "Save As" in IDLE (Vista 32-bit)

2008-01-22 Thread Martin v. Löwis

Martin v. Löwis added the comment:

I've studied the problem with Process Monitor. If a file is hidden,
open(f, "w") fails, whereas os.open(f, os.W_OK|os.O_CREAT) succeeds.

In the succeeding call, process monitor reports

Desired Access: Generic Read/Write
Disposition:OpenIf
Options:Synchronous IO Non-Alert, Non-Directory File
Attributes: N
ShareMode:  Read, Write
AllocationSize: 0
OpenResult: Opened

In the failing call, it reports

Desired Access: Generic Write, Read Attributes
Disposition:OverwriteIf
Options:Synchronous IO Non-Alert, Non-Directory File
Attributes: N
ShareMode:  Read, Write
AllocationSize: 0

I then tried os.open(f, os.W_OK|os.CREAT|os.O_TRUNC) which also fails,
giving

Desired Access: Generic Read/Write
Disposition:OverwriteIf
Options:Synchronous IO Non-Alert, Non-Directory File
Attributes: N
ShareMode:  Read, Write
AllocationSize: 0

So it fails for FILE_OVERWRITE_IF, but succeeds for FILE_OPEN_IF. These 
map back to CREATE_ALWAYS and OPEN_ALWAYS - apparently, you can't 
truncate a hidden file on Vista.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1908] make html fails - patchlevel is missing

2008-01-22 Thread Georg Brandl

Georg Brandl added the comment:

Silly me, left a lone .pyc file around. Fixed in r60200.

--
resolution:  -> fixed
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue609824] traceback.print_stack extension

2008-01-22 Thread Raghuram Devarakonda

Raghuram Devarakonda added the comment:

I can't think of a use case for this feature and as there is no activity
for long time, I am closing it.

--
nosy: +draghuram
resolution:  -> rejected
status: open -> closed


Tracker <[EMAIL PROTECTED]>


___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1908] make html fails - patchlevel is missing

2008-01-22 Thread Christian Heimes

New submission from Christian Heimes:

This happens after 
$ cd Docs
$ rm -rf tools
$ svn up
$ make update
$ make html
mkdir -p build/html build/doctrees
python tools/sphinx-build.py -b html -d build/doctrees -D
latex_paper_size=  . build/html
Traceback (most recent call last):
  File "tools/sphinx-build.py", line 23, in 
from sphinx import main
  File "/home/heimes/dev/python/trunk/Doc/tools/sphinx/__init__.py",
line 19, in 
from sphinx.builder import builders
  File "/home/heimes/dev/python/trunk/Doc/tools/sphinx/builder.py", line
34, in 
from sphinx.patchlevel import get_version_info, get_sys_version_info
ImportError: No module named patchlevel
make: *** [build] Fehler 1

patchlevel is no longer in spinx but I found one in sphinxext.

--
assignee: georg.brandl
components: Documentation
messages: 61519
nosy: georg.brandl, tiran
priority: urgent
severity: normal
status: open
title: make html fails - patchlevel is missing
versions: Python 2.6, Python 3.0

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1886] Permit to easily use distutils "--formats=tar, gztar, bztar" on all systems

2008-01-22 Thread Lars Gustäbel

Lars Gustäbel added the comment:

Hm, on my Linux box both files are more or less identical. Sorry, I
cannot reproduce your problem.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1034053] unittest.py patch: add skipped test functionality

2008-01-22 Thread Georg Brandl

Georg Brandl added the comment:

I'll take it.

--
assignee: purcell -> georg.brandl
nosy: +georg.brandl

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1872] change the bool struct format code from 't' to '?'

2008-01-22 Thread Facundo Batista

Facundo Batista added the comment:

Boosted priority: if changed, we should do it *before* 2.6 hits the street.

--
nosy: +facundobatista
priority:  -> urgent

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1886] Permit to easily use distutils "--formats=tar, gztar, bztar" on all systems

2008-01-22 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

> I just did some tests and could not find any major difference. 
> Which are the differences you found?

diff utility doesn't provide any output since the compared files are
binary. As far as I can tell the two files have a different size
(tarfile generates a little bigger file).
Moreover, by using 7zip on Windows I notice that the archive generated
by tarfile module looks different. Once I open it I see the following
structure:

dist (directory) -> archive_name.tar -> archive_name (directory) ->
other subfiles

...while the archive generated with the UNIX tar utility looks like this:

archive_name.tar -> archive_name (directory) -> other subfiles

> BTW, in your patch the "dist" directory is not automatically created.

You're right. patch2.zip file in attachment fixes that.

Added file: http://bugs.python.org/file9264/patch2.zip

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1886] Permit to easily use distutils "--formats=tar, gztar, bztar" on all systems

2008-01-22 Thread Lars Gustäbel

Lars Gustäbel added the comment:

I just did some tests and could not find any major difference. Which are
the differences you found?

BTW, in your patch the "dist" directory is not automatically created.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1907] Httplib.py not supporting timeout - Propose Fix attached

2008-01-22 Thread Facundo Batista

Facundo Batista added the comment:

It's already fixed in the trunk (2.6 will have timeout for httplib and
other TCP libraries).

--
nosy: +facundobatista
resolution:  -> out of date
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1907] Httplib.py not supporting timeout - Propose Fix attached

2008-01-22 Thread Guillaume Nourry-Marquis

New submission from Guillaume Nourry-Marquis:

The httplib file wasn'T supporting a timeout feature which was essential
for my load testing application I built. In order to do that, I had to
append a parameter to the connect function, which takes a socket timeout
value integer in seconds.

def connect(self,timeout=None):
"""Connect to the host and port specified in __init__."""
msg = "getaddrinfo returns an empty list"
for res in socket.getaddrinfo(self.host, self.port, 0,
  socket.SOCK_STREAM):
af, socktype, proto, canonname, sa = res
try:
self.sock = socket.socket(af, socktype, proto)
#Guillaume's timeout
self.sock.settimeout(timeout)
if self.debuglevel > 0:
print "connect: (%s, %s)" % (self.host, self.port)
self.sock.connect(sa)
except socket.error, msg:
if self.debuglevel > 0:
print 'connect fail:', (self.host, self.port)
if self.sock:
self.sock.close()
self.sock = None
continue
break
if not self.sock:
raise socket.error, msg

Simple patch, but it was essential for my work.

--
components: Library (Lib)
files: httplib.py
messages: 61512
nosy: xlash
severity: minor
status: open
title: Httplib.py not supporting timeout - Propose Fix attached
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file9263/httplib.py

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1904] Add key argument to heapq functions

2008-01-22 Thread Guido van Rossum

Changes by Guido van Rossum:


--
assignee:  -> rhettinger
keywords: +patch
nosy: +rhettinger
priority:  -> low

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1906] Distinguish between cfunction, cvar and cmacro

2008-01-22 Thread Christian Heimes

New submission from Christian Heimes:

The new doc system has cmacro but the html output for cmacro is not
distinguishable from cfunction. 

I also noticed that the docs use cfunction instead of cmacro on several
occasions.

--
assignee: georg.brandl
components: Documentation
messages: 61511
nosy: georg.brandl, tiran
priority: normal
severity: normal
status: open
title: Distinguish between cfunction, cvar and cmacro
type: rfe
versions: Python 2.6, Python 3.0

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1327] Python 2.4+ spends too much time in PyEval_EvalFrame w/ xmlrpmclib

2008-01-22 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Please, could you use the python profiler instead? Since most of the
time is spent in the bytecode interpreter, the results are much more
meaningful.
Something like:

#!/usr/bin/env python
import xmlrpclib
import profile

u = 'someuser'
p = 'password'
server_url = 'http://rhn.redhat.com/rpc/api'

def f():
server = xmlrpclib.Server(server_url)
session = server.auth.login(u,p)
l = server.channel.listSoftwareChannels(session)
for a in l:
print a['channel_label']

def g():
try:
f()
except:
pass

profile.run("g()")

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1327] Python 2.4+ spends too much time in PyEval_EvalFrame w/ xmlrpmclib

2008-01-22 Thread Eric Sammons

Eric Sammons added the comment:

Some strace data:

WORKS:

 strace -cf ./test.py >/tmp/out
Process 9439 detached
% time seconds  usecs/call callserrors syscall
-- --- --- - - 
 33.100.009125   8  1086   956 open
 23.470.006469   7   930   recvfrom
  9.670.002667   9   311   278 stat
  8.100.002234  14   165   read
  3.400.000936   7   133   mmap
  3.250.000896   6   144   close
  3.240.000892  4520   poll
  2.970.000818   5   173   fstat
  2.830.000780  1553   munmap
  2.130.000588 118 5 3 execve
  1.340.000369   939   mprotect
  1.130.000312   472   rt_sigaction
  0.660.000183   535   futex
  0.640.000176  1017   brk
  0.610.000169  1214   sendto
  0.570.000158  26 6   write
  0.500.000139   434   fcntl
  0.490.000134  1014   socket
  0.400.000111   425   lseek
  0.360.000100   714 2 connect
  0.340.93  23 4   getdents64
  0.270.74   514 2 ioctl
  0.170.48   411   gettimeofday
  0.060.16   8 2 2 access
  0.050.14   7 2 2 readlink
  0.040.10   5 2   arch_prctl
  0.040.10   5 2   time
  0.030.09   9 1   _sysctl
  0.030.08   8 1   lstat
  0.030.08   4 2   uname
  0.020.06   6 1   rt_sigprocmask
  0.020.06   6 1   getcwd
  0.010.04   4 1   getrlimit
  0.010.04   4 1   set_tid_address
-- --- --- - - 
100.000.027566  3335  1245 total


I am still compiling the same data for Python 2.4.3 (#1, Dec 11 2006,
11:39:03).  However, this could take hours...  as 2.4+ seem to be
problematic.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1886] Permit to easily use distutils "--formats=tar, gztar, bztar" on all systems

2008-01-22 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Both things fixed. The new patch is in attachment.

Just one thing: I tried a diff between a tar.gz file generated by
tarfile module and another one generated by the UNIX tar utility and it
seems there are some differences.
I don't know if this could represent a problem for distributions
generated by distutils and eventually easy_install.py integration.
Maybe someone who knows the tarfile implementation could clarify this point.

--
nosy: +lars.gustaebel, nnorwitz
Added file: http://bugs.python.org/file9262/patch.zip

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1327] Python 2.4+ spends too much time in PyEval_EvalFrame w/ xmlrpmclib

2008-01-22 Thread Eric Sammons

Eric Sammons added the comment:

Here is the header information that I get:

reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Tue, 22 Jan 2008 14:42:54 GMT
header: Server: Apache
header: Content-Length: 183
header: Content-Type: text/xml;charset=UTF-8


Then I get addition send followed by more header info:


reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Tue, 22 Jan 2008 14:42:54 GMT
header: Server: Apache
header: Content-Length: 399191
header: Content-Type: text/xml;charset=UTF-8
header: X-Pad: avoid browser bug


I am looking for additional Content-Length data.  Also, the above was
done using Python 2.5.1 (r251:54863, Oct 30 2007, 13:54:11).

Thank you!

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1905] PythonLauncher not working correctly on OS X 10.5/Leopad

2008-01-22 Thread Kevin Walzer

New submission from Kevin Walzer:

On Mac OS X 10.5 (Leopard), using Python 2.5.1, double-clicking on a 
Python script in the Finder does not produce the expected behavior, i.e. 
launch a terminal session and then execute the script. These errors are 
logged in the console:

1/22/08 9:28:56 AM Python Launcher[53692] doscript: Could not activate 
Terminal
 
1/22/08 9:28:56 AM Python Launcher[53692] doscript: AESend(activate): 
error -600
 
1/22/08 9:28:56 AM Python Launcher[53692] Exit status: -600
 
1/22/08 9:28:56 AM com.apple.launchd[118] ([0x0-
0x434434].org.python.PythonLauncher[53692]) Stray process with PGID 
equal to this dead job: PID 53694 PPID 1 Terminal 

I did not observe these behaviors on OS X 10.4.

--
components: Macintosh
messages: 61506
nosy: wordtech
severity: major
status: open
title: PythonLauncher not working correctly on OS X 10.5/Leopad
type: behavior
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue487738] weaklist

2008-01-22 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. added the comment:

Facundo: Agreed as well; since the use case isn't strong, let's avoid
adding this.

--
resolution:  -> rejected
status: open -> closed


Tracker <[EMAIL PROTECTED]>


___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1087741] subclassable mmap

2008-01-22 Thread Ralf Schmitt

Ralf Schmitt added the comment:

./python Lib/test/test_mmap.py works with a debug build with this patch.

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1087741] subclassable mmap

2008-01-22 Thread Ralf Schmitt

Changes by Ralf Schmitt:


Added file: http://bugs.python.org/file9261/subclass_mmap_patch.txt

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1087741] subclassable mmap

2008-01-22 Thread Ralf Schmitt

Ralf Schmitt added the comment:

sorry, I somehow managed to introduce a segfault: 

~/pydev/trunk/ cat t.py
[EMAIL PROTECTED] ok
from mmap import mmap

class anon_mmap(mmap):
def __new__(klass, *args, **kwargs):
res = mmap.__new__(klass, -1, *args, **kwargs)
print "NEW:", res
return res

anon_mmap(4096)
~/pydev/trunk/ ./python t.py   
[EMAIL PROTECTED] ok
NEW: <__main__.anon_mmap object at 0x866b10>
Debug memory block at address p=0x866b10:
18374686479671623679 bytes originally requested
The 8 pad bytes at p-8 are not all FORBIDDENBYTE (0xfb):
at p-8: 0xcb *** OUCH
at p-7: 0xcb *** OUCH
at p-6: 0xcb *** OUCH
at p-5: 0xcb *** OUCH
at p-4: 0xcb *** OUCH
at p-3: 0xcb *** OUCH
at p-2: 0xcb *** OUCH
at p-1: 0xcb *** OUCH
Because memory is corrupted at the start, the count of bytes requested
   may be bogus, and checking the trailing pad bytes may segfault.
The 8 pad bytes at tail=0xff866b0f are zsh: segmentation
fault  ./python t.py



The following fixes it for me:

~/pydev/trunk/ cat patch   
[EMAIL PROTECTED] failed 139
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -129,7 +129,7 @@ mmap_object_dealloc(mmap_object *m_obj)
}
 #endif /* UNIX */
 
-   PyObject_Del(m_obj);
+   m_obj->ob_type->tp_free((PyObject*)m_obj);
 }
 
 static PyObject *



I'll write a test for this issue and will attach a complete patch.
Sorry again.

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1881] increase parser stack limit

2008-01-22 Thread Christian Heimes

Christian Heimes added the comment:

Maciek Fijalkowski wrote:
> Hum, this indeed might be not a best place to have such discussion, what 
> about moving this to another, more general issue?

Ah! :) It took me a while to understand your intention but now I get
you! The python-dev mailing list is probably a better place than the bug
tracker.

Christian

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1881] increase parser stack limit

2008-01-22 Thread Maciek Fijalkowski

Maciek Fijalkowski added the comment:

PyPy is all MIT, no problem at license. This should not be plugged into 
the parser, this is not a patch (especially not a patch for the parser). 
This file is rather to illustrate possible solution to solve the problem 
of sys.setrecursionlimit not being a robust solution, but just a quick 
hack. Instead of having a counter (which is sometimes too big, sometimes 
too small, depending on amount of C code in between the stack checks), 
it provides a way of measuring the size of a stack actually used. The 
idea is to store the address of local variable somewhere in the 
beginning and compare it to addresses of local variables in consecutive 
calls to LL_stack_too_big (all stored per-thread). This seems to be a 
better solution (ie pypy does not segfault on any of Lib/test/crashers, 
particularly not on ones involving unevident C infinite loop). Yes, it 
has some performance penalty (hard to tell exactly what without trying).

Hum, this indeed might be not a best place to have such discussion, what 
about moving this to another, more general issue?

Cheers,
fijal

:.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1881] increase parser stack limit

2008-01-22 Thread Christian Heimes

Christian Heimes added the comment:

Maciek Fijalkowski wrote:
> Wuaaa, sorry
> 
> Added file: http://bugs.python.org/file9259/stack.h

Can you provide a working patch, please? The file doesn't explain how it
should be plugged into the parser. What's the license of the file? We
can't just add code from another project.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1381] cmath is numerically unsound

2008-01-22 Thread Christian Heimes

Christian Heimes added the comment:

See #1640 and svn+ssh://[EMAIL PROTECTED]/python/branches/trunk-math

--
components: +Extension Modules -Library (Lib)
keywords: +patch
priority:  -> normal
versions: +Python 3.0 -Python 2.5

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1640] Enhancements for mathmodule

2008-01-22 Thread Christian Heimes

Christian Heimes added the comment:

Mark Dickinson wrote:
> For atanh(1):  raising OverflowError is actually consistent with what 
> currently happens.  
> The only singularity that's already present in math is log(0), and it seems 
> that that 
> raises OverflowError on OS X, Linux and Windows...  I wonder whether this is 
> what Tim 
> meant to say?

But on Linux atanh(1) sets errno = EDOM and raises a ValueError. Either
the outcome is not consistent or the libm developers have a different
philosophy than Time and you. *g*

> For acosh(0):  you're right, and I'm wrong---this should definitely return a 
> NaN and set 
> errno.  I guess that dividing 0 by 0 doesn't set errno on Windows.  Okay: 
> let's set it 
> directly there.

I'm not an expert on IEEE754 and NaN but I guess "Signaling NaN" also
means it sets errno. Personally I'm not interested in reimplementing or
fixing Windows' mathematical library (although it's tempting *g*) but to
get the results right for our purpose. You are right, we should try to
mimic the C99 standard whenever it is possible. But it's more important
to get the functions of our math module right.

> I do still think that asinh(nan), atanh(nan) and acosh(nan) should return nan 
> and not 
> raise any exceptions, just for the sake of consistency with Linux/OS X and 
> with the other 
> libm functions.

Yes, it makes perfectly sense and glibc's libm already does the right
thing. However Windows screws up again so I've to fix the function call
manually. Damn you Windows!

I inserted the four lines in mathmodule.c:math_1() and something similar
in math_2() to fix Windows.
#ifndef __GNUC__ /* Windows et al */
if (Py_IS_NAN(x))
return PyFloat_FromDouble(x+x);
#endif

> I guess I don't really care about asinh(+/-inf), etc:  an infinite return 
> value will be 
> caught by the stuff in math_1 anyway.

Are you fine with OverflowError?

I'm going to create a branch for your work. It's getting tedious sending
large patches back and forth.

Christian

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1904] Add key argument to heapq functions

2008-01-22 Thread Guilherme Polo

Guilherme Polo added the comment:

Adding a simple patch that adds the "key" argument. To test this you
need to comment lines where it tries to import the C version of heapq.

Added file: http://bugs.python.org/file9260/heapq_key.py.patch

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1904] Add key argument to heapq functions

2008-01-22 Thread Guilherme Polo

New submission from Guilherme Polo:

Wouldn't it be useful to add a "key" argument to some heapq functions ?
So you could construct a heap from dict items list based on the second
item of each tuple, for example.

--
components: Library (Lib)
messages: 61496
nosy: gpolo
severity: normal
status: open
title: Add key argument to heapq functions
type: behavior
versions: Python 2.6, Python 3.0

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1902] Test

2008-01-22 Thread Christian Heimes

Christian Heimes added the comment:

Works for me

--
resolution:  -> invalid
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1902] Test

2008-01-22 Thread Christian Heimes

New submission from Christian Heimes:

ggpolo has reported an issue with the bug tracker

--
messages: 61494
nosy: tiran
severity: normal
status: open
title: Test

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1883] Adapt pydoc to new doc system

2008-01-22 Thread Guilherme Polo

Changes by Guilherme Polo:


--
type: behavior -> 

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1883] Adapt pydoc to new doc system

2008-01-22 Thread Guilherme Polo

Changes by Guilherme Polo:


--
type:  -> behavior

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1705520] pyunit should allow __unittest in locals to trim stackframes

2008-01-22 Thread Steve Purcell

Steve Purcell added the comment:

This is a good idea, but slightly messy.

A better solution would be for unittest to provide a decorator that 
could be used to mark assertion functions.  Internally, that decorator 
may well work the way you describe.

Given a corresponding patch, someone with more time than myself may well 
be willing to commit it.

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1034053] unittest.py patch: add skipped test functionality

2008-01-22 Thread Steve Purcell

Steve Purcell added the comment:

The status of this ticket is unchanged.  I'm somewhat removed from the 
Python scene in recent times, and I'm not in a position to apply this 
patch or a variation of it.

I still believe this would be a beneficial change to the unittest 
module, though, and perhaps someone else would be willing to apply 
Remy's patch (updated if necessary to apply cleanly).  There's a minor 
typo in there ("tuble" instead of "tuple"), but otherwise it looks 
acceptable to me.

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1881] increase parser stack limit

2008-01-22 Thread Maciek Fijalkowski

Maciek Fijalkowski added the comment:

Wuaaa, sorry

Added file: http://bugs.python.org/file9259/stack.h

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1881] increase parser stack limit

2008-01-22 Thread Christian Heimes

Christian Heimes added the comment:

Maciek Fijalkowski wrote:
> Maciek Fijalkowski added the comment:
> 
> Attached file that handles stack overflow slightly better (from pypy).
> It really measures stack size, not some arbitrary limit of python calls.
> Yes, this have slightly bigger overhead than just passing around number,
> but as a side effect solves Lib/test/crashers/recursion_limit_too_high.py

Where is the file?

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1881] increase parser stack limit

2008-01-22 Thread Maciek Fijalkowski

Maciek Fijalkowski added the comment:

Attached file that handles stack overflow slightly better (from pypy).
It really measures stack size, not some arbitrary limit of python calls.
Yes, this have slightly bigger overhead than just passing around number,
but as a side effect solves Lib/test/crashers/recursion_limit_too_high.py

--
nosy: +fijal

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1881] increase parser stack limit

2008-01-22 Thread Ralf Schmitt

Ralf Schmitt added the comment:

one more. this program seems to leak memory:

x=1000
e="["*x+"]"*x
while 1:
try:
eval(e)
except MemoryError:
pass

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1881] increase parser stack limit

2008-01-22 Thread Ralf Schmitt

Ralf Schmitt added the comment:

yes, here it is. I've added the tests to Lib/test/test_parser.
BTW, is it possible to trigger a segfault by constructing a parser.st
object and calling compile on it?

Added file: http://bugs.python.org/file9258/up-maxstack+tests.txt

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com