[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2007-09-20 Thread Georg Brandl

Georg Brandl added the comment:

IMO zseil's latest patch is the best one, but I need any other developer
to review and approve it.

_
Tracker <[EMAIL PROTECTED]>

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



[issue1181] Redefine clear() for os.environ to use unsetenv() if possible

2007-09-20 Thread Raghuram Devarakonda

Changes by Raghuram Devarakonda:


--
nosy: +draghuram

__
Tracker <[EMAIL PROTECTED]>

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



[issue1541463] Optimizations for cgi.FieldStorage methods

2007-09-20 Thread Georg Brandl

Georg Brandl added the comment:

Okay, you've convinced me. Committed rev. 58218.

--
resolution:  -> accepted
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



[issue1182] Paticular decimal mod operation wrongly output NaN.

2007-09-20 Thread Hirokazu Yamamoto

New submission from 
Hirokazu Yamamoto
:

Following code illegally print "NaN" on Python2.5.

from decimal import *
d1 = Decimal("23.08589694291355371979265447")
d2 = Decimal("2.302585092994045640179914546844")
print d1 % d2

Python2.6(trunk) print 0.06004601297309731799350900156

--
components: Library (Lib)
messages: 56056
nosy: ocean-city
severity: normal
status: open
title: Paticular decimal mod operation wrongly output NaN.
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



[issue1613130] str.split creates new string even if pattern not found

2007-09-20 Thread Georg Brandl

Changes by Georg Brandl:


--
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



[issue1176] str.split() takes no keyword arguments (Should this be expected?)

2007-09-20 Thread Sergio Correia

Sergio Correia added the comment:

Thanks for the update,
Sergio

__
Tracker <[EMAIL PROTECTED]>

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



[issue1176] str.split() takes no keyword arguments (Should this be expected?)

2007-09-20 Thread Georg Brandl

Georg Brandl added the comment:

Added to the documentation that string methods don't take keyword args
in rev. 58219. Closing this as "works for me".

--
nosy: +georg.brandl
resolution:  -> works for me
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



[issue1182] Paticular decimal mod operation wrongly output NaN.

2007-09-20 Thread Georg Brandl

Changes by Georg Brandl:


--
assignee:  -> facundobatista
nosy: +facundobatista

__
Tracker <[EMAIL PROTECTED]>

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



[issue1686386] Python SEGFAULT on tuple.__repr__ and str()

2007-09-20 Thread Georg Brandl

Georg Brandl added the comment:

I don't have a specific opinion on this; the usage of
Py_EnterRecursiveCall/Py_ReprEnter certainly looks correct.

--
assignee: georg.brandl -> brett.cannon

_
Tracker <[EMAIL PROTECTED]>

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



[issue1696444] Adding an index method to tuples

2007-09-20 Thread Georg Brandl

Changes by Georg Brandl:


--
components: +Interpreter Core -None
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



[issue1181] Redefine clear() for os.environ to use unsetenv() if possible

2007-09-20 Thread Guido van Rossum

Guido van Rossum added the comment:

Sounds like a good idea. Anyone care to check it in?

--
nosy: +gvanrossum

__
Tracker <[EMAIL PROTECTED]>

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



[issue1179] [CVE-2007-4965] Integer overflow in imageop module

2007-09-20 Thread Sean Reifschneider

Changes by Sean Reifschneider:


--
priority:  -> high

__
Tracker <[EMAIL PROTECTED]>

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



[issue1719423] Python package support not properly documented

2007-09-20 Thread Sean Reifschneider

Changes by Sean Reifschneider:


--
priority: high -> normal
resolution:  -> remind
status: open -> pending

_
Tracker <[EMAIL PROTECTED]>

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



[issue1643369] pdb find_function does not find Class methods.

2007-09-20 Thread Sean Reifschneider

Changes by Sean Reifschneider:


--
priority: high -> low
title: function breakpoints in pdb -> pdb find_function does not find Class 
methods.
type:  -> rfe

_
Tracker <[EMAIL PROTECTED]>

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



[issue1643369] pdb find_function does not find Class methods.

2007-09-20 Thread Sean Reifschneider

Changes by Sean Reifschneider:


--
severity: normal -> minor

_
Tracker <[EMAIL PROTECTED]>

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



[issue1181] Redefine clear() for os.environ to use unsetenv() if possible

2007-09-20 Thread Raghuram Devarakonda

Raghuram Devarakonda added the comment:

Shouldn't the first clear() in the patch say "del
self.data[key.upper()]" instead of "del self.data[key]"? I also think
the patch should include doc change.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1170766] weakref.proxy incorrect behaviour

2007-09-20 Thread Sean Reifschneider

Sean Reifschneider added the comment:

Raymond: Is this still a problem, or should we close it because the
reported issue is resolved and 2.4 is no longer maintained?

--
assignee:  -> rhettinger
nosy: +jafo
priority: high -> low
resolution:  -> accepted
type:  -> behavior

_
Tracker <[EMAIL PROTECTED]>

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



[issue1181] Redefine clear() for os.environ to use unsetenv() if possible

2007-09-20 Thread Guido van Rossum

Guido van Rossum added the comment:

On 9/20/07, Raghuram Devarakonda <[EMAIL PROTECTED]> wrote:
> Shouldn't the first clear() in the patch say "del
> self.data[key.upper()]" instead of "del self.data[key]"? I also think
> the patch should include doc change.

I don't think so -- it goes over self.data.keys() which means they are
already uppercase.

All of this would be unnecessary if clear() in UserDict were to be changed to

for key in self.keys(): del self[key]

But that's a much more pervasive change...

__
Tracker <[EMAIL PROTECTED]>

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



[issue1181] Redefine clear() for os.environ to use unsetenv() if possible

2007-09-20 Thread Georg Brandl

Georg Brandl added the comment:

Committed, incl. docs, as rev. 58221.

--
assignee:  -> georg.brandl
nosy: +georg.brandl
resolution:  -> accepted
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



[issue1183] race in SocketServer.ForkingMixIn.collect_children

2007-09-20 Thread David Ripton

New submission from David Ripton:

CentOS Linux 5, Python 2.4.3  (but code appears unchanged in 2.5 and
trunk, so I don't believe this bug has already been fixed)

We have an xmlrpc server that subclasses DocXMLRPCServer.DocXMLRPCServer
and SocketServer.ForkingMixIn.  Under load, it sometimes crashes with an
error in SocketServer.ForkingMixIn.collect_children

The bug is that collect_children calls os.waitpid with pid 0, so it
waits for any child.  But then it assumes that the pid found was in the
list self.active_children, and attempts to remove it from that list
without a try block.  However, another call to collect_children could
have already removed it, so we get "ValueError: list.remove(x): x not in
list"

The fix is just adding a try/except block around the attempt to remove
pid from self.active children.

diff -u SocketServer.py /tmp/SocketServer.py
--- SocketServer.py 2007-08-27 10:52:24.0 -0400
+++ /tmp/SocketServer.py2007-09-20 15:34:00.0 -0400
@@ -421,7 +421,10 @@
 except os.error:
 pid = None
 if not pid: break
-self.active_children.remove(pid)
+try:
+self.active_children.remove(pid)
+except ValueError:
+pass

 def process_request(self, request, client_address):
 """Fork a new subprocess to process the request."""

--
components: Library (Lib)
messages: 56065
nosy: dripton
severity: normal
status: open
title: race in SocketServer.ForkingMixIn.collect_children
type: crash
versions: Python 2.4

__
Tracker <[EMAIL PROTECTED]>

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



[issue1185] py3k: Completely remove nb_coerce slot

2007-09-20 Thread Amaury Forgeot d'Arc

New submission from Amaury Forgeot d'Arc:

Arguments coercion has been removed in py3k for a while, but there are
still some traces of it.
This patch removes the nb_coerce slot and the last usages of __coerce__.
Documentation is also updated: Py_TPFLAGS_CHECKTYPES does not exists
anymore.

Note: I ran the testsuite on Windows only.

--
components: Interpreter Core
files: nocoerce.diff
messages: 56067
nosy: amaury.forgeotdarc
severity: normal
status: open
title: py3k: Completely remove nb_coerce slot
type: rfe
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

__

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



[issue1183] race in SocketServer.ForkingMixIn.collect_children

2007-09-20 Thread Sean Reifschneider

Changes by Sean Reifschneider:


--
keywords: +patch
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue1184] test fixes for immutable bytes change

2007-09-20 Thread Sean Reifschneider

Changes by Sean Reifschneider:


--
keywords: +patch, py3k
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue1185] py3k: Completely remove nb_coerce slot

2007-09-20 Thread Sean Reifschneider

Changes by Sean Reifschneider:


--
keywords: +patch, py3k
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue1578269] Add os.link() and os.symlink() support for Windows

2007-09-20 Thread Stephen Warren

Stephen Warren added the comment:

I'd say that junction points were a great way to expose this feature
under Win32 - after all, isn't it specifically what they were designed for?

Incidentally, at least one other application uses them for exactly this
purpose; a commercial source control tool named Accurev supports
checked-in symlinks on Windows as well as *nix etc.

The added advantage of junction points over whatever new API Vista
exposes is that it'll work on at least XP (maybe even Win2K?)

--
nosy: +swarren

_
Tracker <[EMAIL PROTECTED]>

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



[issue1704287] must run "make" before "make install"

2007-09-20 Thread Stephen Warren

Stephen Warren added the comment:

I can confirm this happens for me too, also on CentOS 5, with SVN 2.5
HEAD as of now.

It seems that this problem occurs, whilst running the first compileall
command for the libinstall target:

Compiling /somewhere/lib/python2.5/test/test_multibytecodec.py ...
Sorry: UnicodeError:
  ("\\N escapes not supported (can't load unicodedatamodule)",)

--
nosy: +swarren

_
Tracker <[EMAIL PROTECTED]>

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



[issue1704287] UnicodeError in compileall if "make install" is run before "make".

2007-09-20 Thread Sean Reifschneider

Changes by Sean Reifschneider:


--
title: must run "make" before "make install" -> UnicodeError in compileall if 
"make install" is run before "make".

_
Tracker <[EMAIL PROTECTED]>

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



[issue1704287] UnicodeError in compileall if "make install" is run before "make".

2007-09-20 Thread Stephen Warren

Stephen Warren added the comment:

The attached patch should solve the problem by adding appropriate
dependencies to the libinstall target.

I have tested:

./configure; make install

but not yet:

./configure; make all install
./configure; make all; make install

Note: I introduced a new "build_all" phony target so that both all and
libinstall could depend on this, rather than making libinstall either:

* depend on all (which I guess would cause nasty looping dependencies if
one were to run "make all install")

* duplicate all the dependencies of all, thus causing a maintenance issue

Possibly, the new dependencies should be added to install instead of
libinstall?

Alternatively, I guess one could make "all" touch a file, and "install"
or "libinstall" validate that the file exists, and error out if it doesn't.

_
Tracker <[EMAIL PROTECTED]>

_

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



[issue1704287] UnicodeError in compileall if "make install" is run before "make".

2007-09-20 Thread Sean Reifschneider

Changes by Sean Reifschneider:


--
keywords: +patch

_
Tracker <[EMAIL PROTECTED]>

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



[issue1704287] UnicodeError in compileall if "make install" is run before "make".

2007-09-20 Thread Sean Reifschneider

Sean Reifschneider added the comment:

I can verify that this happens in trunk (2.6) on CentOS 5, 32-bit. 
Patch review looks good, and solves the problem.  I've committed it to
trunk as revision 58225.

--
nosy: +jafo
resolution:  -> accepted
status: open -> closed
type:  -> behavior
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



[issue1704287] UnicodeError in compileall if "make install" is run before "make".

2007-09-20 Thread Stephen Warren

Stephen Warren added the comment:

Now, I have also tested:

./configure; make all install
./configure; make all; make install

The "install" piece of each of the above doesn't seem to accidentally
duplicate any of the building work, so the patch seems to check out OK -
no negative side-effects.

_
Tracker <[EMAIL PROTECTED]>

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