[issue6021] itertools.grouper

2009-05-14 Thread Chris Rebert

Changes by Chris Rebert :


--
nosy: +cvrebert

___
Python tracker 

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



[issue5964] WeakSet cmp methods

2009-05-14 Thread Robert Schuppenies

Robert Schuppenies  added the comment:

I am now a bit confused about the semantics of __eq__ for WeakSets. Is a
WeakSet only equal to another WeakSet with the same elements or to any
iterable with the same elements, e.g. list? Because this is how I read
the current implementation. If it is the latter, when should a
NotImplementedError be raised? Whenever the other object is not an Iterable?

--

___
Python tracker 

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



[issue502236] Asynchronous exceptions between threads

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
stage:  -> test needed
versions: +Python 2.7, Python 3.2 -Python 2.6

___
Python tracker 

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



[issue920573] http libraries throw errors internally in BitTorrent

2009-05-14 Thread Daniel Diniz

Daniel Diniz  added the comment:

I think we should close this, otherwise we'll have to get creative
trying to find bugs that might as well have been fixed.

--
nosy: +ajaksu2
status: open -> pending

___
Python tracker 

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



[issue1152248] Enhance file.readlines by making line separator selectable

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
components: +IO
nosy: +benjamin.peterson, pitrou
versions: +Python 3.2 -Python 3.1

___
Python tracker 

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



[issue1182143] making builtin exceptions more informative

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
nosy: +ajaksu2
versions: +Python 3.2 -Python 3.1

___
Python tracker 

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



[issue1244929] hide tests from TestProgram

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
nosy: +michael.foord
versions: +Python 3.2

___
Python tracker 

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



[issue1284316] Win32: Security problem with default installation directory

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
stage:  -> test needed
type:  -> security
versions: +Python 2.7, Python 3.2

___
Python tracker 

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



[issue1306248] Add 64-bit Solaris 9 build instructions to README

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
stage:  -> needs patch
type:  -> feature request
versions: +Python 2.6, Python 3.1 -Python 2.4

___
Python tracker 

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



[issue1309352] Make fcntl work properly on AMD64

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
stage:  -> test needed
type:  -> behavior

___
Python tracker 

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



[issue1399935] enhance unittest to define tests that *should* fail

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
stage: test needed -> patch review

___
Python tracker 

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



[issue1399935] enhance unittest to define tests that *should* fail

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
nosy: +michael.foord
versions: +Python 3.2 -Python 3.1

___
Python tracker 

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



[issue1687125] cannot catch KeyboardInterrupt when using curses getkey()

2009-05-14 Thread Daniel Diniz

Daniel Diniz  added the comment:

Seems related to #706406 and #3180.

--
nosy: +ajaksu2
stage:  -> test needed
type:  -> behavior
versions: +Python 2.6 -Python 2.5

___
Python tracker 

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



[issue1530559] struct.pack raises TypeError where it used to convert

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
dependencies: +struct.pack("I", "foo"); struct.pack("L", "foo") should fail
keywords: +patch
type:  -> behavior

___
Python tracker 

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



[issue1540617] Use Py_ssize_t for rangeobject members

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
stage:  -> test needed
type:  -> feature request
versions: +Python 2.7 -Python 2.6

___
Python tracker 

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



[issue1598083] Top-level exception handler writes to stdout unsafely

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
stage:  -> test needed
type:  -> behavior
versions: +Python 3.1

___
Python tracker 

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



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

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
stage:  -> patch review
type:  -> behavior
versions: +Python 3.1 -Python 2.5

___
Python tracker 

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



[issue1697943] msgfmt cannot cope with BOM

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
components: +Unicode
keywords: +patch
stage:  -> test needed
type:  -> behavior
versions: +Python 2.6, Python 3.1 -Python 2.5

___
Python tracker 

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



[issue1704474] test_optparse.py mod. for jython

2009-05-14 Thread Daniel Diniz

Daniel Diniz  added the comment:

Can someone ping the Jython tracker for help on this?

--
nosy: +ajaksu2
type:  -> feature request
versions: +Python 2.7, Python 3.2 -Python 2.6

___
Python tracker 

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



[issue1706039] Added clearerr() to clear EOF state

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
components: +IO
nosy: +benjamin.peterson, pitrou
priority:  -> normal
stage:  -> patch review
versions: +Python 3.1 -Python 3.0

___
Python tracker 

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



[issue1736792] dict reentrant/threading bug

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
stage:  -> test needed
versions: +Python 2.7, Python 3.2 -Python 2.6, Python 3.0

___
Python tracker 

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



[issue1441] Cycles through ob_type aren't freed

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
stage:  -> test needed

___
Python tracker 

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



[issue6024] regrtest says refleaks are "ok"

2009-05-14 Thread Collin Winter

Collin Winter  added the comment:

Applied in r72658 (trunk) and r72660 (py3k).

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

___
Python tracker 

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



[issue1051] certificate in Lib/test/test_ssl.py expires in February 2013

2009-05-14 Thread Daniel Diniz

Daniel Diniz  added the comment:

Maybe this should be added to a PEP? 

IMO it would be better if the a new certificate could be issued soon
enough so that test_ssl in any given version works at least until that
version stops being supported.

--
nosy: +ajaksu2

___
Python tracker 

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



[issue1772673] Replacing char* with const char*

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
dependencies: +replacing char* with const char* in sysmodule.c/.h
versions: +Python 2.7 -Python 2.6

___
Python tracker 

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



[issue1286] fileinput, StringIO, and cStringIO do not support the with protocol

2009-05-14 Thread Daniel Diniz

Changes by Daniel Diniz :


--
stage:  -> patch review

___
Python tracker 

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



[issue3135] inspect.getcallargs()

2009-05-14 Thread George Sakkis

George Sakkis  added the comment:

Also updated url: http://code.activestate.com/recipes/551779/

--

___
Python tracker 

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



[issue3135] inspect.getcallargs()

2009-05-14 Thread George Sakkis

George Sakkis  added the comment:

I updated the recipe to also return a `missing_args` tuple - the tuple
of the formal parameters whose value was not provided. This is useful in
cases where one want to distinguish f() from f(None) given "def f(x=None)".

--
versions: +Python 2.7 -Python 2.6

___
Python tracker 

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



[issue3583] test_urllibnet.test_bad_address() fails when using OpenDNS

2009-05-14 Thread Ezio Melotti

Ezio Melotti  added the comment:

I got a similar problem but here the ISP returned an error/search page
and a "302 Found". test_urllibnet.test_bad_address() failed with
"AssertionError: IOError not raised by urlopen"

>>> import http.client
>>> conn = http.client.HTTPConnection("www.somerandominvalidpage.edu")
>>> conn.request("GET", "/")
>>> r1 = conn.getresponse()
>>> r1.status, r1.reason
(302, 'Found')

test_xmlrpc_net failed for the same reason (see #6027).

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue6027] test_xmlrpc_net fails when the ISP returns "302 Found"

2009-05-14 Thread Ezio Melotti

New submission from Ezio Melotti :

./python -m test.regrtest -uall -v test_xmlrpc_net
Could not find '/home/wolf/py3k/Lib/test' in sys.path to remove it
test_xmlrpc_net
test_current_time (test.test_xmlrpc_net.CurrentTimeTest) ... ERROR
 
==
ERROR: test_current_time (test.test_xmlrpc_net.CurrentTimeTest)
--
Traceback (most recent call last):
  File "/home/wolf/py3k/Lib/test/test_xmlrpc_net.py", line 18, in
test_current_time
t0 = server.currentTime.getCurrentTime()
  File "/home/wolf/py3k/Lib/xmlrpc/client.py", line 1091, in __call__
return self.__send(self.__name, args)
  File "/home/wolf/py3k/Lib/xmlrpc/client.py", line 1333, in __request
verbose=self.__verbose
  File "/home/wolf/py3k/Lib/xmlrpc/client.py", line 1127, in request
dict(resp.getheaders())
xmlrpc.client.ProtocolError: 
 
--
Ran 1 test in 0.148s
 
FAILED (errors=1)
test test_xmlrpc_net failed -- Traceback (most recent call last):
  File "/home/wolf/py3k/Lib/test/test_xmlrpc_net.py", line 18, in
test_current_time
t0 = server.currentTime.getCurrentTime()
  File "/home/wolf/py3k/Lib/xmlrpc/client.py", line 1091, in __call__
return self.__send(self.__name, args)
  File "/home/wolf/py3k/Lib/xmlrpc/client.py", line 1333, in __request
verbose=self.__verbose
  File "/home/wolf/py3k/Lib/xmlrpc/client.py", line 1127, in request
dict(resp.getheaders())
xmlrpc.client.ProtocolError: 
 
1 test failed:
test_xmlrpc_net


Apparently the error was raised because:
1) time.xmlrpc.com wasn't reachable
2) the ISP (not the browser) returned a "302 Found" and an error page
3) the test expected something else and failed

This is somewhat related to #3583.

--
components: Tests
messages: 87785
nosy: ezio.melotti
severity: normal
status: open
title: test_xmlrpc_net fails when the ISP returns "302 Found"
type: behavior
versions: Python 3.1

___
Python tracker 

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



[issue5964] WeakSet cmp methods

2009-05-14 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

See http://docs.python.org/reference/datamodel.html#object.__eq__

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue6026] test_(zipfile|zipimport|gzip|distutils) fail if zlib is not available

2009-05-14 Thread Ezio Melotti

New submission from Ezio Melotti :

Python build finished, but the necessary bits to build these modules
were not found: _dbm _gdbm _hashlib _sqlite3 _ssl _tkinter bz2 zlib


When zlib is missing some tests fail:

./python -m test.regrtest -uall -v test_zipimport
Could not find '/home/wolf/py3k/Lib/test' in sys.path to remove it
test_zipimport
test test_zipimport crashed -- : No module named zlib
Traceback (most recent call last):
  File "/home/wolf/py3k/Lib/test/regrtest.py", line 613, in runtest_inner
the_package = __import__(abstest, globals(), locals(), [])
  File "/home/wolf/py3k/Lib/test/test_zipimport.py", line 9, in 
import zlib # implied prerequisite
ImportError: No module named zlib
1 test failed:
test_zipimport


./python -m test.regrtest -uall -v test_zipfile
Could not find '/home/wolf/py3k/Lib/test' in sys.path to remove it
test_zipfile
testAbsoluteArcnames (test.test_zipfile.TestsWithSourceFile) ... ok
[...]
 
==
ERROR: test_PerFileCompression (test.test_zipfile.TestsWithSourceFile)
--
Traceback (most recent call last):
  File "/home/wolf/py3k/Lib/test/test_zipfile.py", line 300, in
test_PerFileCompression
zipfp.write(TESTFN, 'deflateme', zipfile.ZIP_DEFLATED)
  File "/home/wolf/py3k/Lib/zipfile.py", line 1045, in write
self._writecheck(zinfo)
  File "/home/wolf/py3k/Lib/zipfile.py", line 1004, in _writecheck
"Compression requires the (missing) zlib module")
RuntimeError: Compression requires the (missing) zlib module
 
==
ERROR: testGoodPassword (test.test_zipfile.DecryptionTests)
--
Traceback (most recent call last):
  File "/home/wolf/py3k/Lib/test/test_zipfile.py", line 856, in
testGoodPassword
self.assertEquals(self.zip2.read("zero"), self.plain2)
  File "/home/wolf/py3k/Lib/zipfile.py", line 850, in read
return self.open(name, "r", pwd).read()
  File "/home/wolf/py3k/Lib/zipfile.py", line 923, in open
zef = ZipExtFile(zef_file, zinfo, zd)
  File "/home/wolf/py3k/Lib/zipfile.py", line 470, in __init__
self.dc = zlib.decompressobj(-15)
AttributeError: 'NoneType' object has no attribute 'decompressobj'
 
==
ERROR: testDifferentFile (test.test_zipfile.TestsWithMultipleOpens)
--
Traceback (most recent call last):
  File "/home/wolf/py3k/Lib/test/test_zipfile.py", line 955, in setUp
zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_DEFLATED)
  File "/home/wolf/py3k/Lib/zipfile.py", line 669, in __init__
"Compression requires the (missing) zlib module")
RuntimeError: Compression requires the (missing) zlib module
 
==
ERROR: testInterleaved (test.test_zipfile.TestsWithMultipleOpens)
--
Traceback (most recent call last):
  File "/home/wolf/py3k/Lib/test/test_zipfile.py", line 955, in setUp
zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_DEFLATED)
  File "/home/wolf/py3k/Lib/zipfile.py", line 669, in __init__
"Compression requires the (missing) zlib module")
RuntimeError: Compression requires the (missing) zlib module
 
==
ERROR: testSameFile (test.test_zipfile.TestsWithMultipleOpens)
--
Traceback (most recent call last):
  File "/home/wolf/py3k/Lib/test/test_zipfile.py", line 955, in setUp
zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_DEFLATED)
  File "/home/wolf/py3k/Lib/zipfile.py", line 669, in __init__
"Compression requires the (missing) zlib module")
RuntimeError: Compression requires the (missing) zlib module
 
--
Ran 53 tests in 1.292s
 
FAILED (errors=5)
test test_zipfile failed -- errors occurred; run in verbose mode for details
1 test failed:
test_zipfile


./python -m test.regrtest -uall -v test_gzip
Could not find '/home/wolf/py3k/Lib/test' in sys.path to remove it
test_gzip
test test_gzip crashed -- : No module named zlib
Traceback (most recent call last):
  File "/home/wolf/py3k/Lib/test/regrtest.py", line 613, in runtest_inner
the_package = __import__(abstest, globals(), locals(), [])
  File "/home/wolf/py3k/Lib/test/test_gzip.py", line 8, in 
import gzip
  File "/home/wolf/py3k/Lib/gzip.py", line 9, in 
import zlib
ImportError: No module named zlib
1 test failed:
test_gzip


./python -m test.regrtest -uall -v test_distutils
Could not find '/home/wolf/py3k/Lib/test' in sys.path to remove it
test_distutils
test_check_all (distutils.tests.test_check.CheckTest

[issue5964] WeakSet cmp methods

2009-05-14 Thread Robert Schuppenies

Robert Schuppenies  added the comment:

If that is the right behavior then yes. Is this documented somewhere?

--

___
Python tracker 

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



[issue6025] documentation of xml.dom.minidom.parse signature is wrong

2009-05-14 Thread Philipp Hagemeister

New submission from Philipp Hagemeister :

In the documentation, the signature is given as parse(filename_or_file,
parser), although the next paragraph reads "(...) *parser*, if given,
(...)".

The latter is correct, and there is a new bufsize parameter, too.

--
assignee: georg.brandl
components: Documentation, XML
files: xml-minidom-parse-signature-doc.diff
keywords: patch
messages: 87781
nosy: georg.brandl, phihag
severity: normal
status: open
title: documentation of xml.dom.minidom.parse signature is wrong
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2
Added file: 
http://bugs.python.org/file13987/xml-minidom-parse-signature-doc.diff

___
Python tracker 

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



[issue1655] imaplib is not IPv6-capable

2009-05-14 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +pitrou
stage:  -> patch review
versions: +Python 2.7, Python 3.1

___
Python tracker 

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



[issue6024] regrtest says refleaks are "ok"

2009-05-14 Thread Collin Winter

Changes by Collin Winter :


Removed file: http://bugs.python.org/file13985/refleak.patch

___
Python tracker 

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



[issue6024] regrtest says refleaks are "ok"

2009-05-14 Thread Collin Winter

Changes by Collin Winter :


Added file: http://bugs.python.org/file13986/refleak.patch

___
Python tracker 

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



[issue5964] WeakSet cmp methods

2009-05-14 Thread Robert Schuppenies

Robert Schuppenies  added the comment:

The test passes on my machine, but a quick review would definitely be
nice :)

--

___
Python tracker 

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



[issue6024] regrtest says refleaks are "ok"

2009-05-14 Thread Collin Winter

New submission from Collin Winter :

Currently (r72643), regrtest.py -R:: says that a test passed even if it
leaked references:

trunk collinwinter$ ./python.exe Lib/test/regrtest.py -R::
test_urllib2_localnet
test_urllib2_localnet
beginning 9 repetitions
123456789
.
test_urllib2_localnet leaked [3, 3, 3, 3] references, sum=12
1 test OK.
[50020 refs]
trunk collinwinter$

The attached patch turns that into

trunk collinwinter$ ./python.exe Lib/test/regrtest.py -R::
test_urllib2_localnet
test_urllib2_localnet
beginning 9 repetitions
123456789
.
test_urllib2_localnet leaked [3, 3, 3, 3] references, sum=12
1 test failed:
test_urllib2_localnet
[50010 refs]
trunk collinwinter$ echo $?
1
trunk collinwinter$

This makes it easier to run regrtest.py -R:: as part of a buildbot
installation.

I'll merge to py3k once this is reviewed. Any thoughts on merging to
release26-maint?

--
components: Tests
files: refleak.patch
keywords: patch
messages: 87776
nosy: collinwinter, jyasskin
severity: normal
stage: patch review
status: open
title: regrtest says refleaks are "ok"
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file13985/refleak.patch

___
Python tracker 

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



[issue1664] nntplib is not IPv6-capable

2009-05-14 Thread Derek Morr

Derek Morr  added the comment:

Thanks.

Is there any chance of getting bug 1655 fixed as well? imaplib has the 
same issue as nntplib, and the patch is identical.

--

___
Python tracker 

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



[issue5844] internal error on write while reading

2009-05-14 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Fixed in r72649.

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

___
Python tracker 

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



[issue5964] WeakSet cmp methods

2009-05-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Is the current patch ready for consumption?

--

___
Python tracker 

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



[issue5918] test_parser crashes when run after some other tests

2009-05-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I've committed the patch, thanks!

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

___
Python tracker 

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



[issue5761] add file name to py3k IO objects repr()

2009-05-14 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
components: +IO

___
Python tracker 

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



[issue5761] add file name to py3k IO objects repr()

2009-05-14 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
priority: normal -> release blocker

___
Python tracker 

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



[issue5803] email/quoprimime: encode and decode are very slow on large messages

2009-05-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Any news?

--
nosy: +barry

___
Python tracker 

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



[issue5788] datetime.timedelta is inconvenient to use...

2009-05-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Given the timing, I fear this will have to wait for 3.2.

--
versions: +Python 3.2 -Python 3.1

___
Python tracker 

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



[issue5788] datetime.timedelta is inconvenient to use...

2009-05-14 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +mw44118

___
Python tracker 

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



[issue6020] Create a datetime.timedelta.totalseconds property

2009-05-14 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
resolution:  -> duplicate
status: open -> closed
superseder:  -> datetime.timedelta is inconvenient to use...

___
Python tracker 

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



[issue1664] nntplib is not IPv6-capable

2009-05-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Your patch is committed in r72640. Thanks!

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

___
Python tracker 

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



[issue6011] python doesn't build if prefix contains non-ascii characters

2009-05-14 Thread Baptiste Carvello

Baptiste Carvello  added the comment:

OK, here is also the patch to 'Modules/_io/textio.c', as it is in fact
quite trivial. Choose which one you prefer :-)

Baptiste

--
Added file: http://bugs.python.org/file13984/textio.diff

___
Python tracker 

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



[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-05-14 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Yes

--
resolution:  -> fixed
status: pending -> closed

___
Python tracker 

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



[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-05-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I suppose it is fixed, isn't it?

--
status: open -> pending

___
Python tracker 

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



[issue5380] pty.read raises IOError when slave pty device is closed

2009-05-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Will try to work out a patch before the RC.

--
assignee:  -> pitrou
components: +IO
priority:  -> normal
stage:  -> needs patch
versions: +Python 3.1 -Python 3.0

___
Python tracker 

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



[issue5977] distutils build_ext.get_outputs returns wrong result (patch)

2009-05-14 Thread Roumen Petrov

Roumen Petrov  added the comment:

Proposed patch may fix another windows failure as after recent commit
"unresolved external symbol initfoo" seems to me fixed.

--
nosy: +rpetrov
Added file: http://bugs.python.org/file13983/issue5977-w32.patch

___
Python tracker 

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



[issue5945] PyMapping_Check returns 1 for lists

2009-05-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Why did the list implementation get changed in Py3.x?  Is it now
> necessary for any subscripting type to put the same method in both the
> sequence methods and mapping methods?  Was this change necessary?

I think it's a case of foolish consistency. In py3k there are no opcodes
dedicated to slicing anymore, instead the slice object is passed to the
mapping's getitem method.

--

___
Python tracker 

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



[issue5945] PyMapping_Check returns 1 for lists

2009-05-14 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Why did the list implementation get changed in Py3.x?  Is it now
necessary for any subscripting type to put the same method in both the
sequence methods and mapping methods?  Was this change necessary?

--

___
Python tracker 

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



[issue6021] itertools.grouper

2009-05-14 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> All implementations relying on zip or zip_longest breaks 
> with infinite iterable (e.g. itertools.count()).

How is it broken?  
Infinite in, infinite out.

>>> def grouper(n, iterable, fillvalue=None):
...args = [iter(iterable)] * n
...return zip_longest(*args, fillvalue=fillvalue)

>>> g = grouper(3, count())
>>> next(g)
(0, 1, 2)
>>> next(g)
(3, 4, 5)
>>> next(g)
(6, 7, 8)
>>> next(g)

> And it is not impossible to define a clean, flexible, 
> and familiar API which will be similar to open()'s mode
> or unicode error mode. The modes would be 'error' 
> (default), 'pad', 'truncate', and 'partial'

Of course, it's possible.  I find that to be bad design.  Generally, we
follow Guido's advice and create separate functions rather than overload
a single function with flags -- that is why we have filterfalse()
instead of a flag on filter().  When people suggest an API with multiple
flags, it can be a symptom of hyper-generalization where api complexity
gets substituted for writing a simple function that does what you want
in the first place.  IMO, it is easier to learn the zip(g, g, g) idiom
and customize it to your own needs than to learn a new tool with four
flag options that control its output signature.

--

___
Python tracker 

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



[issue6023] Search does not intelligently handle module.function queries on docs.python.org

2009-05-14 Thread Jonathan Hayward

New submission from Jonathan Hayward :

The search function on docs.python.org does not intelligently search the
library for a query in the form "module.function". For instance, in
searching for information on (say) socket.bind(), neither a search query
of "socket.bind()" nor "socket.bind" finds any results. I need to search
for "socket bind" / "bind socket" to get results (or possibly "socket"
or "bind" alone to get a larger number of less focused results.) This is
particularly interesting as the page I am interested in contains the
string "socket.bind" and in fact the snippet that appears on the search
result page for the #1 match is: "...onnection, and *address* is the
address bound to the socket on the other end of the connection. ..
method:: socket.bind(address) Bind the socket to *address*. The socket
must not already be bound. (The format of *address* depen..."

It would be nice if searches for module.function, module.CONSTANT,
module.object, module.object.function, etc. would work for search terms
as objects are named in the API.

(A much easier, if imperfect approximation, would be to treat \W as
breaking words as spaces are treated now, so that e.g. periods in
queries would be internally treated as spaces and a search for
"socket.bind" would be treated as "socket bind" and possibly get
surprisingly good results; see
http://docs.python.org/search.html?q=socket+bind .)

Jonathan
http://JonathansCorner.com/

--
assignee: georg.brandl
components: Documentation
messages: 87755
nosy: JonathansCorner.com, georg.brandl
severity: normal
status: open
title: Search does not intelligently handle module.function queries on 
docs.python.org

___
Python tracker 

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



[issue5006] Duplicate UTF-16 BOM if a file is open in append mode

2009-05-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, committed in r72635.

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

___
Python tracker 

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



[issue5006] Duplicate UTF-16 BOM if a file is open in append mode

2009-05-14 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

As I said on IRC a few days ago, I think the patch is ready to go.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue5945] PyMapping_Check returns 1 for lists

2009-05-14 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Personally, I think PyMapping_Check and PySequence_Check should be
deprecated and removed. Like their Python counterparts,
operator.isMappingType() and operation.isSequenceType(), they are
unreliable at best in the face of not LBYL and abcs.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue5945] PyMapping_Check returns 1 for lists

2009-05-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I understand this is indeed unintuitive. The reason list objects support
the C "mapping protocol" in 3.x is that it is how slicing of lists (and
tuples, for that matter) is implemented. Perhaps the documentation
should carry a warning about this.

Unfortunately, right now there is no easy way in C to check that an
object implements a given ABC.

--
assignee:  -> georg.brandl
components: +Documentation, Interpreter Core -Library (Lib)
nosy: +georg.brandl, pitrou
priority: critical -> high

___
Python tracker 

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



[issue6021] itertools.grouper

2009-05-14 Thread Lie Ryan

Lie Ryan  added the comment:

All implementations relying on zip or zip_longest breaks with infinite
iterable (e.g. itertools.count()).

And it is not impossible to define a clean, flexible, and familiar API
which will be similar to open()'s mode or unicode error mode. The modes
would be 'error' (default), 'pad', 'truncate', and 'partial' (maybe
should suggest a better name than 'partial')

> There is an issue with having too many itertools.  
> The module taken as a whole becomes more 
> difficult to use as new tools are added.

It should also be weighed that a lot of people are expecting for this
kind of function in itertools. I think there are other functions in
itertools that have more questionable value than groupers, such as starmap.

--

___
Python tracker 

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



[issue5953] Add to "whats new": range(n) != range(n)

2009-05-14 Thread Mitchell Model

Mitchell Model  added the comment:

Ah. I see. I hadn't realized that. OK, I see how all the pieces fit together 
now. Thanks for all the explanations. They'll help me understand better what 
kinds of comments to make on the documentation.
-- 
-- 

--- Mitchell

--

___
Python tracker 

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



[issue5006] Duplicate UTF-16 BOM if a file is open in append mode

2009-05-14 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue5006] Duplicate UTF-16 BOM if a file is open in append mode

2009-05-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

If no-one objects, I'm going to commit this in a couple of days.

--

___
Python tracker 

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



[issue5912] import deadlocks when using fork

2009-05-14 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

2.4 is no longer supported.

--
nosy: +benjamin.peterson
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue6022] test_distutils leaves a 'foo' file behind in the cwd

2009-05-14 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
assignee:  -> tarek
nosy: +tarek

___
Python tracker 

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



[issue5953] Add to "whats new": range(n) != range(n)

2009-05-14 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I should have been clearer.  It is not the function of whatsnew to show
all aspects of 2-to-3 changes.  It is enough to say that range() no
longer returns a list and instead returns what used to be an xrange()
object.  At that point, the job of full documentation of the function is
left to the main docs.  The whatsnew entries are supposed to be very
brief hints about where to look next.

--

___
Python tracker 

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



[issue6021] itertools.grouper

2009-05-14 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

This has been rejected before. 

* It is not a fundamental itertool primitive.  The recipes section in
the docs shows a clean, fast implementation derived from zip_longest().  

* There is some debate on a correct API for odd lengths.  Some people
want an exception, some want fill-in values, some want truncation, and
some want a partially filled-in tuple.  The alone is reason enough not
to set one behavior in stone.

* There is an issue with having too many itertools.  The module taken as
a whole becomes more difficult to use as new tools are added.

--
assignee:  -> rhettinger
nosy: +rhettinger
resolution:  -> rejected
status: open -> closed
versions: +Python 2.7, Python 3.1

___
Python tracker 

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



[issue6022] test_distutils leaves a 'foo' file behind in the cwd

2009-05-14 Thread R. David Murray

New submission from R. David Murray :

The test for issue #5977 added to test_get_outputs leaves a file named
'foo' behind in the current working directory.

--
messages: 87744
nosy: r.david.murray
severity: normal
status: open
title: test_distutils leaves a 'foo' file behind in the cwd

___
Python tracker 

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



[issue6021] itertools.grouper

2009-05-14 Thread Lie Ryan

New submission from Lie Ryan :

An itertool to Group-by-n 

>>> lst = range(15)
>>> itertools.grouper(lst, 5)
[[0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14]]

This function is often asked in several c.l.py discussions, such as these: 
http://comments.gmane.org/gmane.comp.python.general/623377
http://comments.gmane.org/gmane.comp.python.general/622763

There are several issues. What should be done if the number of items in
the original list is not exactly divisible?
- raise an error as default
- pad with a value from 3rd argument
- make the last one shorter, maybe using keyword arguments or sentinel
to 3rd argument

or should there be separate functions for each of them?

What about infinite list? Most recipes for the function uses zip which
breaks with infinite list.

--
components: Library (Lib)
messages: 87743
nosy: lieryan
severity: normal
status: open
title: itertools.grouper
type: feature request

___
Python tracker 

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



[issue5953] Add to "whats new": range(n) != range(n)

2009-05-14 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

At some point, a person just needs to read the regular docs for range().

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue6020] Create a datetime.timedelta.totalseconds property

2009-05-14 Thread Matthew Wilson

New submission from Matthew Wilson :

I do this kind of thing a lot:

>>> from datetime import timedelta
>>> td = timedelta(days=2, seconds=14)
>>> total_duration_in_seconds = td.days * 24 * 60 * 60 + td.seconds

I would like to have a property on the timedelta object do this for me.

--
components: Library (Lib)
messages: 87741
nosy: mw44118
severity: normal
status: open
title: Create a datetime.timedelta.totalseconds property
versions: Python 2.7

___
Python tracker 

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



[issue5953] Add to "whats new": range(n) != range(n)

2009-05-14 Thread Mitchell Model

Mitchell Model  added the comment:

Sounds right. (1) I was raising the issue in case either the behavior was 
unintended or the documentation should mention it; (2) I realize that comparing 
ranges is strange; (3) I understand that range works in 3 the way xrange worked 
in 2, and that the what's new documentation says that range replaces xrange (4) 
you're point about ranges with steps clinches the issue, I think -- certainly 
equality of ranges should not have to compute the range -- they should be 
thought of as generators (and maybe documented as such -- for all I know, since 
I haven't looked, they are implemented that way); (5) I agree that range 
behaves like an iterator -- its documentation at the introduction to sequence 
tyhpes even points out that in, not in, max, and min are inefficient (6) the 
specific documentation for range explicitly states that they have very little 
behavior supporting only indexing, iteration, and len().

Your comments were very helpful in explicitly laying out the issues regarding 
implementing equality and the relative unimportance of the change in behavior, 
and I now have the explanation I wanted.

The only thing that still makes me uncomfortable is that it wouldn't be such a 
big deal to point out in the 3.0 "what's new" document where the change to 
range is mentioned in a bullet that range supports only indexing, iteration, 
and len, and that operations such as in and not in and functions such as max 
and min are inefficient because, except in when true, they require iterating 
over the entire range. Since these are specified in the actual documentation of 
range I believe they should be added to the what's new, where the change to 
range is described. I agree that what things don't do should rarely be 
documented, but if they no longer do something that they used to do, that 
should go in the "what's new" document -- at least in the form of an explicit 
list of what they do do. The only argument I can see against doing that is that 
the document says that "range() now behaves like xrange() used to behave", but 
I don't feel that is sufficiently explicit for people who have used
  range extensively but never or rarely xrange or who don't think about its 
implications. Maybe the "what's new" should just say that range() acts like an 
iterator.

All in all I'm satisfied and appreciative, except that I'm still left with the 
feeling that something about range() should be added to the 3.0 "what's new".
-- 
-- 

--- Mitchell

--

___
Python tracker 

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



[issue2661] Mapping tests cannot be passed by user implementations

2009-05-14 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Walter, this is your code.  Care to incorporate any of David's ideas?

David, for my own code, the usual technique for something like
test_repr() is to subclass TestHashMappingProtocol and override the test
method with a customized test_repr() method.

--
assignee:  -> doerwalter
nosy: +doerwalter
priority: normal -> low

___
Python tracker 

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



[issue5953] Add to "whats new": range(n) != range(n)

2009-05-14 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Am inclined to reject this request.  We shouldn't get in the habit of
documenting what functions don't do.  In the past, no one seemed to have
any trouble with xrange() not being comparable to itself.  In the
present, there are many functions that return iterators instead of
lists, so the expectation for comparability will be even lower.

The main problem with anti-documentation is that bringing up the topic
can plant it in a reader's memory in a confusing way, "I think I read
something about ranges and comparability ...".  IOW, just talking about
it makes it more likely that someone will be led to making a fallacious
assumption.

Likewise, I don't want to put in a recommendation about comparing the
repr() of ranges either.  The problem is that the (start,stop,step)
tuples can differ but the ranges can be the same:

   >>> args1 = 0, 101, 5
   >>> args2 = 0, 102, 5
   >>> args1 == args2
   False
   >>> list(range(*args1)) == list(range(*args2))
   True

Also, I'm not worried about this one because comparing the output of
range() was not a common thing to do even in Py2.x.

--

___
Python tracker 

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



[issue5945] PyMapping_Check returns 1 for lists

2009-05-14 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: rhettinger -> 

___
Python tracker 

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



[issue5912] import deadlocks when using fork

2009-05-14 Thread Alan Pevec

Alan Pevec  added the comment:

Issue is not reproducible with python 2.5, following patch fixes it on
python 2.4:

--- os.py-2.4 2009-05-14 12:54:08.0 +
+++ os.py 2009-05-14 13:06:21.0 +
@@ -351,8 +351,8 @@

 __all__.extend(["execl","execle","execlp","execlpe","execvp","execvpe"])

+from errno import ENOENT, ENOTDIR
 def _execvpe(file, args, env=None):
-from errno import ENOENT, ENOTDIR

 if env is not None:
 func = execve

--
nosy: +apevec
versions:  -Python 2.5, Python 2.6

___
Python tracker 

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



[issue6012] enhance getargs O& to accept cleanup function

2009-05-14 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

> the same function can be both
> argument parser and cleanup function

Here is an another experimental patch to implement this. (Is this right
usage of PyCObject_FromVoidPtrAndDesc?)

> As not all converters would need or support cleanup, converters
> that do need cleanup could be required to return Py_CLEANUP_SUPPORTED

Well, this is not implemented yet. (I introduced another format
temporary) Does this mean converter should return Py_CLEANUP_SUPPORTED
instead of 1 when cleanup is needed?

--
Added file: 
http://bugs.python.org/file13982/experimental_getargs_with_cleanup_v2.patch

___
Python tracker 

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



[issue6017] Dict fails to notice addition and deletion of keys during iteration

2009-05-14 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

This is correct; dict iterators check to see if the size of the dict is
different. However, fixing this problem would require tracking dict
contents during iteration. That strikes me as too inefficient and too
much code for this little case.

--
nosy: +benjamin.peterson
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue6019] Minor typos in ctypes docs

2009-05-14 Thread Robert Lehmann

New submission from Robert Lehmann :

There are a few errors in the ctypes documentation covering function
calls using the example of `libc.printf`. It's basically just typos but
they are really confusing when trying to understand the examples.

Patch to trunk is attached. Corrections should apply to 3.x as well but
I'm unsure whether they apply cleanly to those branches, see issue4309
for details.

Unicode coercion as in printf("%S", u"abc") keeps segfaulting for me
with 2.5 so I'm unsure about the example's validity there; corrections
could be backported to 2.5-maint as well though. 2.4 and below are not
affected: ctypes was not present in these versions.

--
assignee: georg.brandl
components: Documentation
files: ctypes-docs.patch
keywords: patch
messages: 87733
nosy: georg.brandl, lehmannro
severity: normal
status: open
title: Minor typos in ctypes docs
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file13981/ctypes-docs.patch

___
Python tracker 

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



[issue6018] Fix the output word from "ok" to "OK" when a testcase passes

2009-05-14 Thread Retro

New submission from Retro :

y...@localhost:~$ python3 romantest1.py -v
to_roman should give known result with known input ... ok

Better would be:
y...@localhost:~$ python3 romantest1.py -v
to_roman should give known result with known input ... OK

Since other words are capitalized, this one should be, too. Please fix that.

--
components: None
messages: 87732
nosy: Retro
severity: normal
status: open
title: Fix the output word from "ok" to "OK"  when a testcase passes
versions: Python 3.1, Python 3.2

___
Python tracker 

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

2009-05-14 Thread Mark Dickinson

Mark Dickinson  added the comment:

Aargh!

s/Wsigned-overflow/Wstrict-overflow/g

Sorry.

--

___
Python tracker 

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

2009-05-14 Thread Mark Dickinson

Mark Dickinson  added the comment:

> This is puzzling, isn't it?

I don't see why.  There's nothing in -Wall -Wextra -Wsigned-overflow
that asks for warnings for code that might overflow. Indeed, I don't
see how any compiler could reasonably provide such warnings without
flagging (almost) every occurrence of arithmetic on signed integers
as suspect.[*] 

The -ftrapv option is useful for catching genuine signed-integer
overflows at runtime, but it can still only catch those cases
that actually get exercised (e.g., by the Python test suite).


[*] Even some operations on unsigned integers would have to be
flagged: the C expression "(unsigned short)x * (unsigned short)y"
also has the potential to invoke undefined behaviour, thanks to
C's integer promotion rules.

--

___
Python tracker 

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