[issue1621] Do not assume signed integer overflow behavior

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

Martin v. Löwis added the comment:

> With Neal, I don't see what the warning in _csv is about. What condition
> is being turned into a constant? Is the compiler perhaps rearranging the
> code so as to insert "if (field[0] == '\0') goto XXX;" in front of the
> for-loop where XXX jumps into the middle of the condition in the
> if-statement immediately following the for-loop, and skipping that
> if-block when breaking of the loop later?

Indeed that's what happens. In the case of breaking the loop later,
the compiler can skip the if-block only if signed ints never overflow,
hence the warning.

Another way of silencing the warning is to test field[0]=='\0' in the
if-statement. This might also somewhat pessimize the code, but allows
the compiler to eliminate i altogether.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1025395] email.Utils.parseaddr fails to parse valid addresses

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

Changes by Martin v. Löwis:


_
Tracker <[EMAIL PROTECTED]>

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



[issue1923] meaningful whitespace can be lost in rfc822_escape

2008-01-28 Thread Stephen Emslie

Stephen Emslie added the comment:

Here's that keeps the whitespace in tact, along with a simple test. This
doesn't patch docs as the existing documentation_ already describes the
long string as multiple lines of "plain text in reStructuredText
format", which is what this fixes.

.. _documentation:
http://docs.python.org/dev/distutils/setupscript.html#additional-meta-data

Added file: http://bugs.python.org/file9310/distutils_metadata_whitespace.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue1956] Lib/bsddb/test/test_thread.py uses old 'except' syntax

2008-01-28 Thread Georgij Kondratjev

Georgij Kondratjev added the comment:

If you notice that at
http://svn.python.org/view/python/branches/py3k/Lib/bsddb/test/test_thread.py?rev=60350&r1=58058&r2=60350
"shutil.rmtree(self.homeDir)" didn`t change between revisions, that 
would be false: in fact extra space ("") was added. Is this a bug 
in Roundup?

__
Tracker <[EMAIL PROTECTED]>

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



[issue1955] fix using unittest as a superclass

2008-01-28 Thread Guido van Rossum

Guido van Rossum added the comment:

This patch seems to be based upon a misunderstanding of how Python
namespaces work.

--
keywords: +patch
nosy: +gvanrossum
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



[issue1956] Lib/bsddb/test/test_thread.py uses old 'except' syntax

2008-01-28 Thread Georgij Kondratjev

New submission from Georgij Kondratjev:

"except OSError, e:"
(appears twice) should be changed to
"except OSError as e:"

--
components: Library (Lib)
messages: 61777
nosy: orivej
severity: normal
status: open
title: Lib/bsddb/test/test_thread.py uses old 'except' syntax
type: compile error
versions: 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



[issue1957] [patch] syslogmodule: Release GIL when calling syslog(3)

2008-01-28 Thread Dennis Jensen

New submission from Dennis Jensen:

The glibc syslog(3) call will block in some cases; the attached patch
releases the GIL around the syslog call.

--
components: Extension Modules, Interpreter Core
files: syslogmodule-patch.txt
messages: 61781
nosy: rd2
severity: minor
status: open
title: [patch] syslogmodule: Release GIL when calling syslog(3)
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file9312/syslogmodule-patch.txt

__
Tracker <[EMAIL PROTECTED]>

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



[issue1621] Do not assume signed integer overflow behavior

2008-01-28 Thread Guido van Rossum

Guido van Rossum added the comment:

I wonder if it would help making i a Py_ssize_t instead of an int?

__
Tracker <[EMAIL PROTECTED]>

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



[issue1957] [patch] syslogmodule: Release GIL when calling syslog(3)

2008-01-28 Thread Christian Heimes

Christian Heimes added the comment:

Thanks for the patch. I'm going to review it later.

--
keywords: +patch
nosy: +tiran
priority:  -> high
versions: +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



[issue1621] Do not assume signed integer overflow behavior

2008-01-28 Thread Ismail Donmez

Ismail Donmez added the comment:

Moving the empty check before the loop will fix this and possibly
optimize empty string handling.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1621] Do not assume signed integer overflow behavior

2008-01-28 Thread Ismail Donmez

Ismail Donmez added the comment:

> Guido van Rossum added the comment:
>
> I wonder if it would help making i a Py_ssize_t instead of an int?

gcc still issues the same warning with that.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1954] SocketServer.ForkingMixIn creates a zombie

2008-01-28 Thread Guido van Rossum

Guido van Rossum added the comment:

Using signals is asking for all sorts of trouble.

What is the point of collecting the last process? Having one zombie
child max as a steady state strikes me as totally acceptable.

--
nosy: +gvanrossum

__
Tracker <[EMAIL PROTECTED]>

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



[issue1621] Do not assume signed integer overflow behavior

2008-01-28 Thread Ismail Donmez

Ismail Donmez added the comment:

Neal,

You could btw check
http://repo.or.cz/w/pytest.git?a=shortlog;h=overflow-fix which have each
fix seperate so that reviewing is easy. Just ignore configure changes
thats for later.

Thanks,
ismail

__
Tracker <[EMAIL PROTECTED]>

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



[issue1955] fix using unittest as a superclass

2008-01-28 Thread Adam Goucher

New submission from Adam Goucher:

There are a couple places in unittest where 'issubclass(something,
TestCase)' is used. This prevents you from organizing your test code via
class hierarchies. To solve this problem, issubclass should be looking
whether the object is a subclass of unittest.TestCase to walk the
inheritance tree all the way up and not just a single level.

Currently, this will not work.
module A..
class A(unittest.TestCase):
pass

module B...
import A

class B(A.A)
def testFoo(self):
print "blah blah blah

I have attached a patch which will address all locations where this
could happen.

--
components: Library (Lib)
files: cpython-unittest-subclass.diff
messages: 61776
nosy: agoucher
severity: normal
status: open
title: fix using unittest as a superclass
versions: Python 2.5
Added file: http://bugs.python.org/file9311/cpython-unittest-subclass.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue1954] SocketServer.ForkingMixIn creates a zombie

2008-01-28 Thread Christian Heimes

Christian Heimes added the comment:

Can you provide a patch?

Next time please fill in type, components and versions, too. :)

--
components: +Library (Lib)
nosy: +tiran
priority:  -> normal
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



[issue1956] Lib/bsddb/test/test_thread.py uses old 'except' syntax

2008-01-28 Thread Christian Heimes

Christian Heimes added the comment:

I normally don't run the tests with -uall when I merge changes. from the
trunk.

--
assignee:  -> tiran
nosy: +tiran
priority:  -> high
resolution:  -> accepted

__
Tracker <[EMAIL PROTECTED]>

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



[issue1541] Bad OOB data management when using asyncore with select.poll()

2008-01-28 Thread A.M. Kuchling

Changes by A.M. Kuchling:


--
assignee:  -> akuchling
nosy: +akuchling

__
Tracker <[EMAIL PROTECTED]>

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



[issue1541] Bad OOB data management when using asyncore with select.poll()

2008-01-28 Thread A.M. Kuchling

Changes by A.M. Kuchling:


--
keywords: +patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue1951] test_wave.py converted to unittest

2008-01-28 Thread Christian Heimes

Christian Heimes added the comment:

Thanks for the patch!

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

__
Tracker <[EMAIL PROTECTED]>

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



[issue1956] Lib/bsddb/test/test_thread.py uses old 'except' syntax

2008-01-28 Thread Christian Heimes

Christian Heimes added the comment:

Fixed in r60394

The bug wasn't detected because the tests couldn't be imported. One test
file still used an absolute import instead of a relative.

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



[issue1952] test_select.py converted to unittest

2008-01-28 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

> 1. it's a shame the tests are skipped for windows or macintosh, but it
> was just the same in the original version

Yeah... I'm probably not the best person for talking about this low
level stuff but since sockets seem to be the most portable thing
accepted by select.select, maybe a listening socket could be used
instead of a process pipe.

> 2. I don't think sys.platform[:3] can be equal to 'riscos'

You're right. The original version was that way and I didn't notice it
was wrong since I've put hands on unittest stuff only.
I think this could be fine:

- if sys.platform[:3] in ('win', 'mac', 'os2', 'riscos'):
+ if sys.platform in ('win16', 'win32', 'win64', 'mac', 'os2', 'riscos'):

__
Tracker <[EMAIL PROTECTED]>

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



[issue1956] Lib/bsddb/test/test_thread.py uses old 'except' syntax

2008-01-28 Thread Christian Heimes

Christian Heimes added the comment:

Guido van Rossum wrote:
> Chris: I think it's worth running all tests before submitting a merge. 
> Catch them early is what I say. :-)

An ordianry test run already takes a considerable amount of time on my
system. I usually wait until the build bots notify me about a failing
test in the network and bsddb section.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1952] test_select.py converted to unittest

2008-01-28 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The patch looks and works fine for me.
Two things:
1. it's a shame the tests are skipped for windows or macintosh, but it
was just the same in the original version
2. I don't think sys.platform[:3] can be equal to 'riscos' :)

--
nosy: +pitrou

__
Tracker <[EMAIL PROTECTED]>

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



[issue1621] Do not assume signed integer overflow behavior

2008-01-28 Thread Ismail Donmez

Ismail Donmez added the comment:

gcc is optimizing the second if check , for specifically i == 0 seems to
redundant according to gcc.

if (i == 0 && quote_empty) {
if (dialect->quoting == QUOTE_NONE) {
PyErr_Format(error_obj,
 "single empty field record must be
quoted");
return -1;
}
else
*quoted = 1;
}

__
Tracker <[EMAIL PROTECTED]>

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



[issue1579] logging documentation is unclear

2008-01-28 Thread Christian Heimes

Changes by Christian Heimes:


--
keywords: +easy
priority:  -> normal
type:  -> rfe
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



[issue1956] Lib/bsddb/test/test_thread.py uses old 'except' syntax

2008-01-28 Thread Georgij Kondratjev

Georgij Kondratjev added the comment:

Appeared in 60350 svnmerge:
http://svn.python.org/view/python/branches/py3k/Lib/bsddb/test/test_thread.py?rev=60350&view=log
http://svn.python.org/view/python/branches/py3k/Lib/bsddb/test/test_thread.py?rev=60350&r1=58058&r2=60350

__
Tracker <[EMAIL PROTECTED]>

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



[issue1951] test_wave.py converted to unittest

2008-01-28 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Glad to help.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1958] IPv6 compiled getaddrinfo returns IPv6 address even if the system does not support IPv6

2008-01-28 Thread Douglas Mayle

New submission from Douglas Mayle:

The following code calls getadddrinfo and returns invalid addresses
(IPv6 addresses) when Python has been compiled with IPv6 support and the
system kernel does not support IPv6.

import socket
for res in socket.getaddrinfo("localhost", "80", 0, socket.SOCK_STREAM):
print "%r" % (res,)

(2, 1, 6, '', ('127.0.0.1', 80))
(10, 1, 6, '', ('::1', 80, 0, 0))

--
components: Library (Lib)
messages: 61799
nosy: douglas
severity: normal
status: open
title: IPv6 compiled getaddrinfo returns IPv6 address even if the system does 
not support IPv6
type: behavior
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



[issue1389051] imaplib causes excessive fragmentation for large documents

2008-01-28 Thread A.M. Kuchling

Changes by A.M. Kuchling:


--
keywords: +patch

_
Tracker <[EMAIL PROTECTED]>

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



[issue1956] Lib/bsddb/test/test_thread.py uses old 'except' syntax

2008-01-28 Thread Guido van Rossum

Guido van Rossum added the comment:

Chris: I think it's worth running all tests before submitting a merge. 
Catch them early is what I say. :-)

--
nosy: +gvanrossum

__
Tracker <[EMAIL PROTECTED]>

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



[issue1959] test_contains.py converted to unittest

2008-01-28 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola':


Added file: http://bugs.python.org/file9314/test_contains.py

__
Tracker <[EMAIL PROTECTED]>

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



[issue1958] IPv6 compiled getaddrinfo returns IPv6 address even if the system does not support IPv6

2008-01-28 Thread Douglas Mayle

Douglas Mayle added the comment:

Please close this as invalid, the system C library returns the same
response...

__
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-28 Thread Raghuram Devarakonda

Raghuram Devarakonda added the comment:

Hi Antoine,

You stated the following in a previous comment:

"Right now, shutil.move(src_dir, dst_dir) replaces dst_dir with src_dir
if dst_dir is empty, but moves src_dir inside dst_dir otherwise."

But my test shows differently. If dst_dir doesn't exist or if it is
empty, dst_dir is simply replaced with src_dir. If dst_dir is non-empty,
shutil.move() raises error. In which case did you find src_dir being
moved to dst_dir?

__
Tracker <[EMAIL PROTECTED]>

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



[issue814996] OSF/1 test_dbm segfaults

2008-01-28 Thread Raghuram Devarakonda

Raghuram Devarakonda added the comment:

I am assuming that this can be closed considering that there is no
activity for a long time.

--
nosy: +draghuram
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



[issue1959] test_contains.py converted to unittest

2008-01-28 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola':

In attachment. All existent tests are unchanged.

--
components: Tests
files: test_contains.diff
messages: 61803
nosy: giampaolo.rodola
severity: normal
status: open
title: test_contains.py converted to unittest
type: rfe
versions: Python 2.6
Added file: http://bugs.python.org/file9313/test_contains.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue1507] complex constructor loses signs of zeros

2008-01-28 Thread Christian Heimes

Changes by Christian Heimes:


--
priority:  -> high
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



[issue1960] test_gdbm.py converted to unittest

2008-01-28 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola':

In attachment. All existent tests are unchanged.

--
components: Tests
files: test_gdbm.diff
messages: 61806
nosy: giampaolo.rodola
severity: normal
status: open
title: test_gdbm.py converted to unittest
type: rfe
versions: Python 2.6
Added file: http://bugs.python.org/file9315/test_gdbm.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue1960] test_gdbm.py converted to unittest

2008-01-28 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola':


Added file: http://bugs.python.org/file9316/test_gdbm.py

__
Tracker <[EMAIL PROTECTED]>

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



[issue1958] IPv6 compiled getaddrinfo returns IPv6 address even if the system does not support IPv6

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

Martin v. Löwis added the comment:

My guess is that the C library returns it because /etc/hosts says so.
The convention is that /etc/hosts should call ::1 ip6-localhost (and
ip6-loopback) instead.

--
nosy: +loewis
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



[issue1955] fix using unittest as a superclass

2008-01-28 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't really understand what problem you are trying to solve. Can you
attach a sample script to show it more clearly?

Also, the only thing your patch does is rename Test(Case|Suite)
references to unittest.Test(Case|Suite)... I doubt it would have any
effect unless you were monkeypatching the unittest module to replace
those classes with other ones (which should certainly be considered very
dirty ;-)).

--
nosy: +pitrou

__
Tracker <[EMAIL PROTECTED]>

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



[issue1958] IPv6 compiled getaddrinfo returns IPv6 address even if the system does not support IPv6

2008-01-28 Thread Douglas Mayle

Douglas Mayle added the comment:

Martin's hypothesis is confirmed, removing ::1 from /etc/hosts removes
the response

__
Tracker <[EMAIL PROTECTED]>

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



[issue1960] test_gdbm.py converted to unittest

2008-01-28 Thread Brett Cannon

Brett Cannon added the comment:

Have a look at 
http://code.google.com/p/google-highly-open-participation-psf/issues/detail?id=290
where a GHOP student did a conversion as well. Any chance to come up
with a possible merged version that takes the best from your work,
Giampaolo and the student's work?

--
nosy: +brett.cannon

__
Tracker <[EMAIL PROTECTED]>

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



[issue1960] test_gdbm.py converted to unittest

2008-01-28 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

> Have a look at
http://code.google.com/p/google-highly-open-participation-psf/issues/detail?id=290
> where a GHOP student did a conversion as well.

Interesting, didn't know about that.
In future I'll check that site before start working on a new patch
involving the test suite since it seems those students are already
working on these kind of issues.

> Any chance to come up with a possible merged version 
> that takes the best from your work, Giampaolo and the
> student's work?

Don't know... the suite is extremely simple and, IMO, I don't even think
there's a real need to do that.
I noticed that the student added/changed some stuff like the new
"test_modes" method which maybe could be useful to have.

__
Tracker <[EMAIL PROTECTED]>

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



[issue923643] long <-> byte-string conversion

2008-01-28 Thread Mark Dickinson

Mark Dickinson added the comment:

Closing this due to little-or-no activity for over three years.  Antoine's 
use case seems to me to be covered by issue #1023290.

Trevor, please speak up if you want to keep this alive.

--
resolution:  -> rejected
status: open -> pending
superseder:  -> proposed struct module format code addition


Tracker <[EMAIL PROTECTED]>


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



[issue1960] test_gdbm.py converted to unittest

2008-01-28 Thread Brett Cannon

Brett Cannon added the comment:

On Jan 28, 2008 5:03 PM, Giampaolo Rodola' <[EMAIL PROTECTED]> wrote:
>
> Giampaolo Rodola' added the comment:
>
> > Have a look at
> http://code.google.com/p/google-highly-open-participation-psf/issues/detail?id=290
> > where a GHOP student did a conversion as well.
>
> Interesting, didn't know about that.
> In future I'll check that site before start working on a new patch
> involving the test suite since it seems those students are already
> working on these kind of issues.
>

We have held off on committing their code until we get contributor
agreements from them. Hopefully that will all get resolved in February
and thus you won't have to check the GHOP site for long.

> > Any chance to come up with a possible merged version
> > that takes the best from your work, Giampaolo and the
> > student's work?
>
> Don't know... the suite is extremely simple and, IMO, I don't even think
> there's a real need to do that.
> I noticed that the student added/changed some stuff like the new
> "test_modes" method which maybe could be useful to have.

Well, if you have an opinion, feel free to leave a comment in this
issue about it. I will most likely be the one who does the checkin and
I will read this issue before I commit.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1960] test_gdbm.py converted to unittest

2008-01-28 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

> Well, if you have an opinion, feel free to leave a comment in this
> issue about it. I will most likely be the one who does the checkin and
> I will read this issue before I commit.

 * One of the things I dislike is the fact that the student used "self.g
= gdbm.open(self.filename, 'c')" in setUp method since if that fails
there will be a NameError exception raised in tearDown method and the
errors reported by unittest would be 2 where in fact it would be only 1.
Probably a thing like this one would have been better:

def setUp(self):
self.g = None

def tearDown(self):
if self.g is not None:
self.g.close()
  ...

def test_it(self):
self.g = gdbm.open(self.filename, 'c')
...

- Another thing I don't like is that os.unlink(self.filename) executed
in tearDown would be better if protected by a try/except statement.

- +1 for the self.g.close() used by the student in the tearDown method.
That was a thing I haven't considered and it's not included in my patch.

- +0.5 for the "test_modes" method added by the student. Maybe it's
useful, maybe it's not, I don't know. 


Aside from that I don't see other relevant differences since the code is
really minimalistic. Feel free to commit the patch you consider to be
the best. 
If you want me to do so I can provide a merged version of my patch
including the differences I described above.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1961] possible error with json format for sphinx

2008-01-28 Thread Brett Cannon

New submission from Brett Cannon:

I currently can't build the docs (r60374):

...
  File
"/Users/brett/Dev/python/2.x/pristine/Doc/tools/sphinx/search.py", line
70, in load
for (k, v) in frozen[2].iteritems())
AttributeError: 'list' object has no attribute 'iteritems'
make: *** [build] Error 1


Seems to be related to the json stuff based on the full traceback.

--
components: Documentation tools (Sphinx)
messages: 61812
nosy: brett.cannon
priority: high
severity: normal
status: open
title: possible error with json format for sphinx
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



[issue1960] test_gdbm.py converted to unittest

2008-01-28 Thread Brett Cannon

Brett Cannon added the comment:

On Jan 28, 2008 6:20 PM, Giampaolo Rodola' <[EMAIL PROTECTED]> wrote:
>
> Giampaolo Rodola' added the comment:
>
> > Well, if you have an opinion, feel free to leave a comment in this
> > issue about it. I will most likely be the one who does the checkin and
> > I will read this issue before I commit.
>
>  * One of the things I dislike is the fact that the student used "self.g
> = gdbm.open(self.filename, 'c')" in setUp method since if that fails
> there will be a NameError exception raised in tearDown method and the
> errors reported by unittest would be 2 where in fact it would be only 1.
> Probably a thing like this one would have been better:
>
> def setUp(self):
> self.g = None
>
> def tearDown(self):
> if self.g is not None:
> self.g.close()
>   ...
>
> def test_it(self):
> self.g = gdbm.open(self.filename, 'c')
> ...
>

Could also still open perform the open() call in setUp() and do what
you need in the tearDown() to not be an error. There should probably
also be a way to not cause an error if the file path is just not
writable as that is not a sign of a failing test but an unavailable
resource.

> - Another thing I don't like is that os.unlink(self.filename) executed
> in tearDown would be better if protected by a try/except statement.
>

Even better is test.test_support.unlink() which handles those details for you.

> - +1 for the self.g.close() used by the student in the tearDown method.
> That was a thing I haven't considered and it's not included in my patch.
>
> - +0.5 for the "test_modes" method added by the student. Maybe it's
> useful, maybe it's not, I don't know.
>
>
> Aside from that I don't see other relevant differences since the code is
> really minimalistic. Feel free to commit the patch you consider to be
> the best.
> If you want me to do so I can provide a merged version of my patch
> including the differences I described above.

Fine by me. Or you can wait until I have time to look at your code.
It's up to you.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1954] SocketServer.ForkingMixIn creates a zombie

2008-01-28 Thread Ralf Schmitt

Ralf Schmitt added the comment:

Well, one child isn't the maximum. All children which do not finish
before the last client connects, will live on as zombies (and will be
collected when the next client connects). If that is acceptable, then
just close this report.

Using signals would be easier if http://bugs.python.org/issue1089358
goes in. But even then a single accept call might not suffice and the
code might need to select on the listening socket and another
filedescriptor (on which the signal handler writes).

The simplest solution might be to use select with a timeout and check
for dead children periodically.

(and sorry for not filling out the complete form.)

__
Tracker <[EMAIL PROTECTED]>

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