[issue9815] test_tarfile sometimes ends with error Cannot remove dir

2010-09-14 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

The error went away when I commented out following line.

Lib/unittest/case.py(133)
self.exception = exc_value.with_traceback(None)

I found this by brute force I noticed that
test_tar_pipe_open_read_error_v2.py starts to fail from r75241.
It stores exc_value into _AssertRaisesContext#exception.

And when the exception was re-raised like this, (_Stream#_read)

try:
buf = self.cmp.decompress(buf)
except IOError:
raise ReadError(invalid compressed data)

IOError will be set to ReadError's *__cause__* attribute.
ReadError's traceback is cleared in unittest, but IOError's
traceback is not. It contains reference to frame which contains
_AssertRaisesContext object. And ReadError will be set to
_AssertRaisesContext's *exception* attribute, cyclic reference
is made. It cannot be freed without GC.

# gc.get_referents() was really helpful.

I'll attach the test script test_assert_raises.py to reproduce
the error. The result should be like this.

E:\python-devpy3k test_assert_raises.py
--
[('foo 2',), None, RuntimeError('foo 1',)]
RuntimeError('foo 1',)
[('foo 1',), traceback object at 0x00BD2738]
traceback object at 0x00BD2738
--
.
--
Ran 1 test in 0.090s

OK
===
gc: collectable cell 00BD0B28
gc: collectable tuple 00BD0B60
gc: collectable function 00BCFE78
gc: collectable tuple 00BD0AF0
gc: collectable function 00BCFED8
gc: collectable tuple 00BD0BD0
gc: collectable function 00BCFF38
gc: collectable tuple 00BD0C08
gc: collectable function 00BCFF98
gc: collectable tuple 00BD0C40
gc: collectable function 00BD4038
gc: collectable tuple 00BD0C78
gc: collectable function 00BD4098
gc: collectable tuple 00BD0CB0
gc: collectable function 00BD40F8
gc: collectable function 00BD4158
gc: collectable type 00C07550
gc: collectable dict 00B1FAB8
gc: collectable getset_descriptor 00BD2678
gc: collectable getset_descriptor 00BD26B8
gc: collectable tuple 00AC53F8
gc: collectable frame 00C08858
gc: collectable method 00AC43F8
gc: collectable frame 00C09628
gc: collectable tuple 00BD0038
gc: collectable frame 00C097D0
gc: collectable frame 00C09978
gc: collectable frame 00C0C1B8
gc: collectable frame 00C0CEF0
gc: collectable tuple 00BD0E38
gc: collectable frame 00C0D098
gc: collectable method 00AC43B8
gc: collectable frame 00C0D810
gc: collectable _AssertRaisesContext 00BD0F18
gc: collectable frame 00C0DF18
gc: collectable tuple 00BD0EA8
gc: collectable RuntimeError 00B9FC50
gc: collectable traceback 00BD2738
gc: collectable tuple 00BD0F50
gc: collectable ValueError 00B9FC98
gc: collectable dict 00B22818
gc: collectable method 00AC4338
gc: collectable tuple 00BD0B98
gc: collectable tuple_iterator 00BD0E70
gc: collectable map 00BD0EE0
gc: collectable list 00B21938
===
gc: 46 uncollectable objects at shutdown:
[45415 refs]

--
Added file: http://bugs.python.org/file18876/test_assert_raises.py

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



[issue9815] test_tarfile sometimes ends with error Cannot remove dir

2010-09-14 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

Here is the patch to fix this issue. (Please forget first patch)

E:\python-devpy3k -m test.regrtest test_tarfile
[1/1] test_tarfile
1 test OK.
[85902 refs]

E:\python-devpy3k test_assert_raises.py
--
[('foo 2',), None, RuntimeError('foo 1',)]
RuntimeError('foo 1',)
[('foo 1',), None]
None
--
.
--
Ran 1 test in 0.050s

OK
===
gc: collectable cell 00C824D0
gc: collectable tuple 00C82508
gc: collectable function 00C80E18
gc: collectable tuple 00C82498
gc: collectable function 00C80E78
gc: collectable tuple 00C82578
gc: collectable function 00C80ED8
gc: collectable tuple 00C825B0
gc: collectable function 00C80F38
gc: collectable tuple 00C825E8
gc: collectable function 00C80F98
gc: collectable tuple 00C82620
gc: collectable function 00C85038
gc: collectable tuple 00C82658
gc: collectable function 00C85098
gc: collectable function 00C850F8
gc: collectable type 00B78010
gc: collectable dict 00B31578
gc: collectable getset_descriptor 00C7CD78
gc: collectable getset_descriptor 00C7CDB8
gc: collectable tuple 00AC53F8
===
gc: collectable TextTestResult 00C827A8
gc: collectable _WritelnDecorator 00C82690
gc: collectable dict 00B316C8
gc: collectable dict 00B31818
gc: collectable list 00B1D3B8
gc: collectable list 00C7CC78
gc: collectable list 00B2B878
gc: collectable list 00C7CCF8
gc: collectable list 00B1D2B8
gc: collectable TestCase 00C82770
gc: collectable dict 00B314D0
gc: collectable dict 00B31770
gc: collectable list 00B1CF38
gc: collectable method 00AC4438
gc: collectable method 00AC45F8
gc: collectable method 00AC4638
gc: collectable method 00AC42F8
gc: collectable method 00AC45B8
gc: collectable method 00AC4538
gc: 40 uncollectable objects at shutdown:
[45216 refs]

--
versions:  -Python 3.1
Added file: http://bugs.python.org/file18877/py3k_fix__AssertRaisesContext.patch

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



[issue9729] Unconnected SSLSocket.{send, recv} raises TypeError: 'member_descriptor' object is not callable

2010-09-14 Thread Andrew Bennetts

Andrew Bennetts s...@users.sourceforge.net added the comment:

Here's a conservative fix for Python 2.7.  It replaces the attempts to call 
baseclass.method with direct calls to the decorated object (i.e. replace 
socket.meth(self, ...) with self._sock.meth(...)).

It also corrects a bunch of incorrect arguments being passed to _sock... it's 
pretty clear this code was not tested.  I've added a test that exercises each 
SSLSocket method that corresponds to a socket._delegate_method.

A nicer solution is to simply make socket.socket actually be a simple subclass 
of _socket.socket rather than the weird decorator it is now.  This has already 
happened on the py3k branch, which is why it doesn't have this bug.

--
keywords: +patch
Added file: http://bugs.python.org/file18878/issue9729.patch

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



[issue9315] The trace module lacks unit tests

2010-09-14 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Note that if you add new directories under /Lib, you need to make the build 
system aware of them in several places (I don't remember all of them right now, 
one is in the Makefile).  Otherwise they don't get shipped and/or installed, 
and tests fail.

--

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



[issue9213] range purports to implement the Sequence ABC, but is missing index and count methods

2010-09-14 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

I am -1 on adding new methods to builtins in bugfix releases.

--

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



[issue9315] The trace module lacks unit tests

2010-09-14 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Yep.  But there are other files to edit for the Windows distribution.

--

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



[issue9851] multiprocessing socket timeout will break client

2010-09-14 Thread hume

New submission from hume hume...@gmail.com:

when use multiprocessing managers, while use socket to communicate between 
server process and client process, if I used the global socket timeout 
feature(no matter how large the value is) the client will always say

  File c:\python27\lib\multiprocessing\connection.py, line 149, in Client
answer_challenge(c, authkey)
  File c:\python27\lib\multiprocessing\connection.py, line 383, in 
answer_challenge
message = connection.recv_bytes(256) # reject large message
IOError: [Errno 10035] 

this is not reasonable, because this behaviour will make subprocess unable to 
use socket's timeout features globally.

Another question is line 138 in managers.py:
# do authentication later
self.listener = Listener(address=address, backlog=5)
self.address = self.listener.address

backlog=5 will accept only 5 cocurrent connections, this is stupid, you'd 
better make this a argument that can be specified by user

--
components: Library (Lib)
messages: 116375
nosy: hume
priority: normal
severity: normal
status: open
title: multiprocessing socket timeout will break client
versions: Python 2.7

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



[issue9315] The trace module lacks unit tests

2010-09-14 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

It looks like lots of 3.1 buildbots are unhappy with r84783.
But the test passes on my local 3.1 checkout.


==
FAIL: test_trace_list_comprehension (test.test_trace.TestLineCounts)
--
Traceback (most recent call last):
  File /srv/buildbot/buildarea/3.1.bolen-ubuntu/build/Lib/test/test_trace.py, 
line 172, in test_trace_list_comprehension
self.assertEqual(self.tracer.results().counts, expected)
AssertionError: 
  {('/srv/buildbot/buildarea/3.1.bolen-ubuntu/build/Lib/test/test_trace.py', 
71): 10,
   ('/srv/buildbot/buildarea/3.1.bolen-ubuntu/build/Lib/test/test_trace.py', 
74): 1,
-  ('/srv/buildbot/buildarea/3.1.bolen-ubuntu/build/Lib/test/test_trace.py', 
75): 13,
?   
   ^

+  ('/srv/buildbot/buildarea/3.1.bolen-ubuntu/build/Lib/test/test_trace.py', 
75): 12,
?   
   ^

   ('/srv/buildbot/buildarea/3.1.bolen-ubuntu/build/Lib/test/test_trace.py', 
76): 1}

--
Ran 13 tests in 3.541s

http://www.python.org/dev/buildbot/all/builders/x86%20Ubuntu%203.1/builds/1036

--
status: closed - open

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



[issue1633863] AIX: configure ignores $CC

2010-09-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 cc_r does not seems to be able to compile py3k, so it seems to be a bad 
 idea to force it by default.

Python should be able to compile with any C89-compliant compiler, so it seems a 
good idea to open a bug for compile errors instead.
In this case, the fix is trivial, though, so I'm simply committing it (replace 
a C++-style comment (// ...) with a normal /* ... */)). Can you try again 
with r84799?

That said, it seems xlc (or xlc_r) enables additional C extensions compared to 
cc, so perhaps it's beneficial to use it anyway?

--
nosy: +pitrou

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



[issue9729] Unconnected SSLSocket.{send, recv} raises TypeError: 'member_descriptor' object is not callable

2010-09-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Nice, thank you. I will look at the patch and commit it if everything's fine.

 A nicer solution is to simply make socket.socket actually be a simple
 subclass of _socket.socket rather than the weird decorator it is now. 
 This has already happened on the py3k branch, which is why it doesn't
 have this bug.

Yes, but such a rearchitecting to the socket module is out of question for 2.x, 
which is in bugfix mode.

--
assignee:  - pitrou
stage: needs patch - commit review

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



[issue1926] NNTPS support in nntplib

2010-09-14 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
dependencies: +nntplib cleanup

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



[issue9835] ZipFile unix external attributes incorrect for entry written with writestr

2010-09-14 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

This has already been corrected by issue3394, and is at least present in python 
2.6.

--
nosy: +amaury.forgeotdarc
resolution:  - out of date
status: open - closed
superseder:  - zipfile.writestr doesn't set external attributes, so files are 
extracted mode 000 on Unix

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



[issue6839] zipfile can't extract file

2010-09-14 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

I'd prefer if the code no longer checked if the filename in the directory 
matches the name in the per-file header.

The reason of that is that the two don't have to match: it is relatively cheap 
to rename a file in the zipfile by rewriting the directory while rewriting the 
entire zipfile can be pretty expensive when zipfiles get large.

It's probably worthwhile to test what other zipfile tools do in the respect 
(e.g., create a zipfile where the filename in the header doesn't match the name 
in the directory and extract that zip using a number of popular tools).


(I have a slightly odd perspective on this because I regularly deal with 
zipfiles containing over 100K files and over 10GByte of data).

--

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



[issue9850] obsolete macpath module dangerously broken and should be removed

2010-09-14 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

MacOS9 is already unsupported, except for macpath all traces of OS9 support are 
gone with the possible exception of distutils (I removed traces of OS9 support 
code in 3.2 and those got restored when Tarek replaced distutils by the version 
from the 3.1 branch, I don't remember if I redid my OS9-removal work).

As I wrote earlier the path manipulation code (macpath.join, macpath.split 
etc.) are still useful because OS9-style paths are still used in some parts of 
OSX.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9850
___
___
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

2010-09-14 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

For non-ascii directory name but ascii locale (eg. C locale), we have 3 choices:
 a- read Makefile as a binary file
 b- use the PEP 383
 c- refuse to compile

(a) doesn't seem easy because it looks like distutils use the unicode type for 
all paths. (b) supposes to patch distutils to ensure that reading (and 
writing?) Makefile uses errors='surrogateescape'.

About (c), it can be a temporary solution. But I also think that non-ascii 
directory name and ascii locale encoding is a rare use case.

--

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



[issue6839] zipfile can't extract file

2010-09-14 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

I agree with the change, but the code should be factorized in a function 
(normalize_filename for example)

--
nosy: +amaury.forgeotdarc

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



[issue6006] ffi.c compile failures on AIX 5.3 with xlc

2010-09-14 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +sable

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



[issue9729] Unconnected SSLSocket.{send, recv} raises TypeError: 'member_descriptor' object is not callable

2010-09-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

The recvfrom() signature is wrong (it doesn't take an address argument). Here 
is an updated patch.

--
Added file: http://bugs.python.org/file18880/issue9729-2.patch

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



[issue7657] test_ctypes failure on AIX 5.3

2010-09-14 Thread Sébastien Sablé

Changes by Sébastien Sablé sa...@users.sourceforge.net:


--
nosy: +sable

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



[issue713169] test_pty fails on HP-UX and AIX when run after test_openpty

2010-09-14 Thread Sébastien Sablé

Changes by Sébastien Sablé sa...@users.sourceforge.net:


--
nosy: +sable

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



[issue8882] socketmodule.c`getsockaddrarg() should not check the length of sun_path

2010-09-14 Thread Sébastien Sablé

Changes by Sébastien Sablé sa...@users.sourceforge.net:


--
nosy: +sable

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



[issue5718] Problem compiling ffi part of build on AIX 5.3.

2010-09-14 Thread Sébastien Sablé

Changes by Sébastien Sablé sa...@users.sourceforge.net:


--
nosy: +sable

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



[issue1745108] 2.5.1 curses panel segfault in new_panel on aix 5.3

2010-09-14 Thread Sébastien Sablé

Changes by Sébastien Sablé sa...@users.sourceforge.net:


--
nosy: +sable

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



[issue1563807] _ctypes built with GCC on AIX 5.3 fails with ld ffi error

2010-09-14 Thread Sébastien Sablé

Changes by Sébastien Sablé sa...@users.sourceforge.net:


--
nosy: +sable

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



[issue9853] Wrong signature for SSLSocket.recvfrom

2010-09-14 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

SSLSocket.recvfrom includes an `addr` argument in its signature, but 
socket.recvfrom doesn't take such an argument. It should be removed.
(obviously, this method is neither tested nor used in the real-world...)

In 2.7, this is taken care of by the patch in issue9729.

--
messages: 116397
nosy: pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: Wrong signature for SSLSocket.recvfrom
type: behavior
versions: Python 3.1, Python 3.2

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



[issue9315] The trace module lacks unit tests

2010-09-14 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Updated Makefile in r84803 - r84805.

--

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



[issue9853] Wrong signature for SSLSocket.recvfrom and SSLSocket.sendto

2010-09-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Fixed in r84807 (3.x) and r84809 (3.1).

--
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

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



[issue1552] fromfd() and socketpair() should return wrapped sockets

2010-09-14 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +pitrou

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



[issue9855] Complex number slicing neither works nor causes an error on immediate use

2010-09-14 Thread Tom

New submission from Tom t...@littlemonster.co.uk:

I hope the title of this makes sense. I've been out of things for a long time.

Going through the Python tutorial 
(http://docs.python.org/tutorial/introduction.html) I departed from the script 
to try something. It gave neither of the results I had thought it might.

 (0+1j)*(0+1j).imag
1j
 (0+1j)*(0+1j).real
0j
 a=(0+1j)*(0+1j)
 a.imag
0.0
 a.real
-1.0
 

This being my first crack at this language, I may have missed something that is 
obvious to the more experienced.

In my naivety, I thought that slicing the result of a calculation should work - 
why not? It should have the same structure as that pointed to by a variable.

So I'll leave this for either somebody with the patience to put me straight or 
somebody to fix.

Cheers!

--
messages: 116409
nosy: LittleMonster
priority: normal
severity: normal
status: open
title: Complex number slicing neither works nor causes an error on immediate use
type: behavior
versions: Python 2.6

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



[issue9213] range purports to implement the Sequence ABC, but is missing index and count methods

2010-09-14 Thread Daniel Stutzbach

Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:

Sounds reasonable to me.  I'll close this and the related 9212 (both fixes are 
already committed to the py3k branch).

--
stage: patch review - committed/rejected
status: open - closed

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



[issue9855] Complex number slicing neither works nor causes an error on immediate use

2010-09-14 Thread Tom

Tom t...@littlemonster.co.uk added the comment:

Thanks!

I'm not surprised that it was something stupidofme like that.

Sorry to have troubled you.

:)

--

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



[issue1552] fromfd() and socketpair() should return wrapped sockets

2010-09-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

socketpair() was fixed in 3.x in r84813.

--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue2292] Missing *-unpacking generalizations

2010-09-14 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Does

 yield *it

mean

 yield iter(tuple(it))

or

 for i in it:
 yield i
?

--
nosy: +eric.araujo

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



[issue9854] SocketIO should return None on EWOULDBLOCK

2010-09-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

The problem with RawIOBase.read is fixed in r84814.

--

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



[issue9848] setup.py contains needless references to built-in _weakref module

2010-09-14 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

Fixed in r84819 for 3.2. No point in backporting since it doesn't hurt anything.

Thanks for the report!

--
assignee:  - brett.cannon
nosy: +brett.cannon
resolution:  - fixed
status: open - closed

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



[issue9728] Docs point to FAQ Section 3, but FAQs are not numbered

2010-09-14 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Thanks for the investigation!

--

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



[issue9854] SocketIO should return None on EWOULDBLOCK

2010-09-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Here is a patch.
The tests are only run for unbuffered objects (buffering=0), since the 
behaviour of buffered objects is driven by BufferedReader and friends, not by 
the wrapped SocketIO.

--
keywords: +patch
nosy: +giampaolo.rodola
Added file: http://bugs.python.org/file18883/sockio_nonblock.patch

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



[issue9854] SocketIO should return None on EWOULDBLOCK

2010-09-14 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


Removed file: http://bugs.python.org/file18883/sockio_nonblock.patch

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



[issue9854] SocketIO should return None on EWOULDBLOCK

2010-09-14 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


Added file: http://bugs.python.org/file18884/sockio_nonblock.patch

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



[issue9857] SkipTest in tearDown is reported an as an error

2010-09-14 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

Raising SkipTest when in a tearDown method is reported as an error, rather than 
a skipped test.
Now doing this sounds like a weird use case, but it would be actually useful 
when you have a worker thread, and the tearDown method collects the exception 
raised in that thread and raises it again. For the worker thread to be able to 
use skipTest(), a SkipTest exception raised in tearDown should be properly 
reported as a skip.

--
assignee: michael.foord
components: Library (Lib)
messages: 116422
nosy: michael.foord, pitrou
priority: normal
severity: normal
status: open
title: SkipTest in tearDown is reported an as an error
type: behavior
versions: Python 3.2

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



[issue9315] The trace module lacks unit tests

2010-09-14 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

The issue on 3.1 happens when Python is configured --with-computed-gotos.
(this is the case on all 3.1 buildbots)

But this issue does not happen on 3.x branch. On this branch computed-gotos is 
the default, but the switch --without-computed-gotos does not make a difference.

Antoine suggests to relax the test and only check if the count is within a 
range (12, 13).

--

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



[issue6884] Impossible to include file in sdist that starts with 'build' on Win32

2010-09-14 Thread Chris Withers

Chris Withers ch...@simplistix.co.uk added the comment:

This is a regex bug, and it just bit me again :-(

Because of this bug, you cannot currently build a bdist_egg (and therefore 
cannot install with easy_install) http://pypi.python.org/pypi/buildout-versions 
on windows.

The only choice I have is to rename the 'buildout_versions' package inside the 
distribution to something that doesn't start with 'build'.

--

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



[issue9854] SocketIO should return None on EWOULDBLOCK

2010-09-14 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

I've never used socket.socket.makefile so I'm not sure, but its documentation 
says:

 The socket must be in blocking mode (it can not have a timeout).

If the statement is there because EAGAIN/EWOULDBLOCK were originally raised 
then it should be removed, otherwise I question whether makefile() is actually 
supposed to support non-blocking sockets in the first place.
IMO, I think it's a matter of figuring out whether makefile() should provide a 
socket-like behavior or a file like-behavior first.
In the first case I would expect all errors be raised as if I'm dealing with a 
common socket, otherwise they should be silenced/handled internally or 
makefile() just fail immediately as there's not such thing as non-blocking 
files.

 Instead, readinto() should detect the blocking condition (EAGAIN / 
 EWOULDBLOCK) and 
 return None (same for write(), I imagine).

io.RawIOBase.readinto doc says: 

 Read up to len(b) bytes into bytearray b and return the number of bytes read.

...so returning 0 instead of None looks more natural to me.
Same for write, also because:

 open('xxx', 'w').write('')
0

I've also noticed that socket.SocketIO.readinto has a while loop which 
continues in case of EINTR and that's something which should be removed in case 
makefile() actually intends to support non-blocking sockets.

--

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



[issue7936] sys.argv contains only scriptname

2010-09-14 Thread Bill Hayes

Bill Hayes bhaye...@yahoo.com added the comment:

I found this page while encountering the same problem (only one argument, the 
scriptname, being passed in from the command line), and wanted to post the 
following workaround.  I'm running Vista and using Python 2.6.
In summary I had to have 'python' at the beginning of the command line.
I found:
this did not work:  c:\django-admin startproject mysite
this DID work:  c:\python django-admin startproject mysite

Before finding this fix:
I had tried the 'ftype Python.File' and 'assoc .py' commands mentioned in other 
posts above and gotten the equivalent of 'not found'.
I actually found the correct info in the registry under HKEY_CURRENT_USER, but 
'ftype' and 'assoc' don't appear to read from there.
I modified the registry under HKEY_LOCAL_MACHINE, and then I was getting the 
responses that were claimed to be needed in msg99369 above, but this did NOT 
fix the problem.
It was after the above that I found the solution - use 'python' at the 
beginning of the command line and all args are passed in.
(I did not go back and remove the registry edits that I made to prove 
conclusively that they are not part of the solution, but I doubt that they are.)

--
nosy: +bill_sanjose

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



[issue9854] SocketIO should return None on EWOULDBLOCK

2010-09-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Le mardi 14 septembre 2010 à 23:19 +, Giampaolo Rodola' a écrit :
 I've never used socket.socket.makefile so I'm not sure, but its
 documentation says:
 
  The socket must be in blocking mode (it can not have a timeout).
 
 If the statement is there because EAGAIN/EWOULDBLOCK were originally 
 raised then it should be removed, otherwise I question whether
 makefile() is actually supposed to support non-blocking sockets in 
 the first place.

If it wasn't supposed to, we can add that support.
The statement comes from the 2.x doc; 2.x didn't have a notion of non-blocking 
file-like objects at all, so it makes sense.

 IMO, I think it's a matter of figuring out whether makefile() should 
 provide a socket-like behavior or a file like-behavior first.

Well, since it claims to implement RawIOBase, it should provide a 
RawIOBase-like behaviour :)
(and, in any case, the only use of makefile() is to return something file-like. 
If you want socket-like behaviour, just use the socket)

Returning None is what raw I/O objects are supposed to do when they fail 
reading or writing even a single byte. It is designed and documented as such.

(the readinto() doc you mentioned lacked that precision, but I've just fixed it)

The reason None is returned (rather than 0 or b'') is so that the caller can 
recognize the situation and take appropriate measures.
For example, if read() returns None, it means some bytes *may* be following but 
we'll have to wait (select/poll/...) first; if read() returns 0, conversely, it 
means we've reached EOF (or, on a socket, that the peer has shutdown its side 
of the connection). These are two very different situations.

[file-like behaviour]
 otherwise they should be
 silenced/handled internally or makefile() just fail immediately as
 there's not such thing as non-blocking files.

Non-blocking files exist:

 import fcntl, os, io
 r, w = os.pipe()
 fcntl.fcntl(r, fcntl.F_SETFL, os.O_NONBLOCK)
0
 os.read(r, 2)
Traceback (most recent call last):
  File stdin, line 1, in module
OSError: [Errno 11] Resource temporarily unavailable

(It seems that on regular files O_NONBLOCK may not have an effect; not under 
Linux anyway)

--

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



[issue767645] incorrect os.path.supports_unicode_filenames

2010-09-14 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

No problems noted with a quick test of posixpath_darwin.patch on 10.6 so looks 
good.  It will get regression tested on more configurations sometime later.

--

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



[issue2236] Distutils' mkpath implementation ignoring the mode parameter

2010-09-14 Thread Carlos Henrique Romano

Carlos Henrique Romano chrom...@gmail.com added the comment:

Patch updated, now it includes test.

--
nosy: +chromano
Added file: 
http://bugs.python.org/file18885/python-distutils_mkpath_filemode-v1.diff

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



[issue9851] multiprocessing socket timeout will break client

2010-09-14 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +asksol, jnoller

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



[issue9808] Implement os.getlogin on Windows

2010-09-14 Thread Jon Anglin

Jon Anglin jang...@fortresgrand.com added the comment:

I went ahead and moved the test skip decorator to the class level as suggested 
by Brian Curtin, see issue9808-new.diff.

--
Added file: http://bugs.python.org/file18886/issue9808-new.diff

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



[issue2236] Distutils' mkpath implementation ignoring the mode parameter

2010-09-14 Thread Carlos Henrique Romano

Changes by Carlos Henrique Romano chrom...@gmail.com:


Removed file: 
http://bugs.python.org/file18885/python-distutils_mkpath_filemode-v1.diff

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