[issue9315] The trace module lacks unit tests

2010-09-14 Thread Georg Brandl

Georg Brandl  added the comment:

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

--

___
Python tracker 

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

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 

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

hume  added the comment:

the above test is on windows

--
type:  -> behavior

___
Python tracker 

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

___
___
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 Sébastien Sablé

Sébastien Sablé  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.

cc_r -qlanglvl=extc89  -DNDEBUG -O -O2 -O2  -I. -IInclude -I./Include 
-I/home/cis/buildbot/support-buildbot/include 
-I/home/cis/buildbot/support-buildbot/include/ncurses 
-I/home/cis/buildbot/support-buildbot/include 
-I/home/cis/buildbot/support-buildbot/include/ncurses  -DPy_BUILD_CORE  -c 
./Modules/posixmodule.c -o Modules/posixmodule.o
"./Modules/posixmodule.c", line 2580.26: 1506-046 (S) Syntax error.
"./Modules/posixmodule.c", line 2580.29: 1506-045 (S) Undeclared identifier 
Default.
make: 1254-004 The error code from the last command is 1.

The patch provided (configure.diff) is trivial and it only impacts AIX.
Could someone please apply it?

--
type:  -> compile error
versions: +Python 2.7, 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



[issue9815] test_tarfile sometimes ends with error "Cannot remove dir"

2010-09-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

You shouldn't use DEBUG_LEAK except for debugging purposes :)

As the doc mentions: “To debug a leaking program call 
gc.set_debug(gc.DEBUG_LEAK). Notice that this includes gc.DEBUG_SAVEALL, 
causing garbage-collected objects to be saved in gc.garbage for inspection.”

It's true that the message at shutdown should be eliminated in this case, 
though.
Anyway, I've committed a fix in r84798.

--

___
Python tracker 

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

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

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


--
dependencies: +nntplib cleanup

___
Python tracker 

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

Antoine Pitrou  added the comment:

It should be noted that there are two possibilities for encrypted NNTP:
- NNTPS, that is NNTP-over-SSL on port 563, as proposed here
- plain NNTP with the STARTTLS capability as described in RFC 4642

For the record, gmane provides the former (on snews.gmane.org:563) but not the 
latter.

--

___
Python tracker 

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

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

STINNER Victor  added the comment:

> There seems to be some confusion about the macpath.py module. (...)

Oops. I thought that Mac OS X uses macpath, but in fact it is posixpath. Can 
you try my new patch posixpath_darwin.patch? I reopen the issue because I 
patched the wrong module. I suppose that Python 2.7 has the same issue: 
posixpath should be patched, not macpath.

My patch leaves macpath with supports_unicode_filenames=True. If I understood 
correctly: macpath should be removed (#9850).

--
resolution: fixed -> 
status: closed -> open
Added file: http://bugs.python.org/file18879/posixpath_darwin.patch

___
Python tracker 

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

STINNER Victor  added the comment:

The solution may be different depending on Python version. I propose to keep 
macpath in Python 2.7, just because it's too late to change such thing in 
Python2. But we may mark macpath as deprecated, eg. "macpath will be removed in 
Python 3.2" (see above). I suppose that the same treatement can be used on 
Python 3.1 (maybe with a different warning type/message).

But for Python 3.2, I suggest to drop macpath. Said differently: drop Mac OS 9 
support. If you really need Mac OS 9 support, continue to use Python 2.7. If I 
understood correctly, macpath is not used for os.path in Python 3.2, and it is 
broken (at least on 64 bits build).

But well, I am not a Mac programmer, so I don't know if Mac OS 9 is still 
commonly installed or not.

--
nosy: +haypo

___
Python tracker 

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

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

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

___
___
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  added the comment:

Warning: "use the PEP 383" may impact other distutils component because the 
path may be written into to other files, which mean that we have to use 
errors='surrogateescape' for these files too.

--

___
Python tracker 

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



[issue9852] test_ctypes fail with clang

2010-09-14 Thread Ismail Donmez

New submission from Ismail Donmez :

This is probably a clang bug but this is the only test failing with clang:


==
FAIL: test_byte (ctypes.test.test_cfuncs.CFunctions)
--
Traceback (most recent call last):
  File "/Users/cartman/Sources/py3k/Lib/ctypes/test/test_cfuncs.py", line 20, 
in test_byte
self.assertEqual(self._dll.tf_b(-126), -42)
AssertionError: 43 != -42

==
FAIL: test_byte_plus (ctypes.test.test_cfuncs.CFunctions)
--
Traceback (most recent call last):
  File "/Users/cartman/Sources/py3k/Lib/ctypes/test/test_cfuncs.py", line 26, 
in test_byte_plus
self.assertEqual(self._dll.tf_bb(0, -126), -42)
AssertionError: 43 != -42

==
FAIL: test_short (ctypes.test.test_cfuncs.CFunctions)
--
Traceback (most recent call last):
  File "/Users/cartman/Sources/py3k/Lib/ctypes/test/test_cfuncs.py", line 44, 
in test_short
self.assertEqual(self._dll.tf_h(-32766), -10922)
AssertionError: 10923 != -10922

==
FAIL: test_short_plus (ctypes.test.test_cfuncs.CFunctions)
--
Traceback (most recent call last):
  File "/Users/cartman/Sources/py3k/Lib/ctypes/test/test_cfuncs.py", line 50, 
in test_short_plus
self.assertEqual(self._dll.tf_bh(0, -32766), -10922)
AssertionError: 10923 != -10922

==
FAIL: test_doubleresult (ctypes.test.test_functions.FunctionTestCase)
--
Traceback (most recent call last):
  File "/Users/cartman/Sources/py3k/Lib/ctypes/test/test_functions.py", line 
143, in test_doubleresult
self.assertEqual(result, -21)
AssertionError: 65771.0 != -21

==
FAIL: test_floatresult (ctypes.test.test_functions.FunctionTestCase)
--
Traceback (most recent call last):
  File "/Users/cartman/Sources/py3k/Lib/ctypes/test/test_functions.py", line 
131, in test_floatresult
self.assertEqual(result, -21)
AssertionError: 65771.0 != -21

==
FAIL: test_intresult (ctypes.test.test_functions.FunctionTestCase)
--
Traceback (most recent call last):
  File "/Users/cartman/Sources/py3k/Lib/ctypes/test/test_functions.py", line 
105, in test_intresult
self.assertEqual(result, -21)
AssertionError: 65771 != -21

==
FAIL: test_longdoubleresult (ctypes.test.test_functions.FunctionTestCase)
--
Traceback (most recent call last):
  File "/Users/cartman/Sources/py3k/Lib/ctypes/test/test_functions.py", line 
155, in test_longdoubleresult
self.assertEqual(result, -21)
AssertionError: 65771.0 != -21

--
assignee: theller
components: ctypes
messages: 116392
nosy: cartman, theller
priority: normal
severity: normal
status: open
title: test_ctypes fail with clang
type: behavior
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



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

2010-09-14 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I'm -0 on removing the module wholesale because parts of OSX still use MacOS9 
style paths (in particular some Carbon APIs and AppleScript).

I'm +1 on removing all functions that aren't path manipulation code, that is 
'macpath.join' would stay while 'macpath.islink' would go, and fixing the 
documentation.

And to be complete: I'm -1 on fixing macpath.islink and other functions that 
access a life filesystem because the macpath module is only meant to be used 
for that on MacOS9 and that platform is no longer supported.  Path manipulation 
code is still useful.

BTW. The module cannot be removed from 2.7 and 3.1 due to API stability 
requirements.

--

___
Python tracker 

___
___
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 Sébastien Sablé

Sébastien Sablé  added the comment:

cc(_r) and xlc(_r) refer to the same binary of the same compiler, but they 
change the default configuration of that compiler.

The documentation indicates:

 DESCRIPTION
 The invocation commands compile C and C++ source files.
 The commands and their recommended usages are described
 below.

 Invocations   Usage (supported standards)
 _

 xlc, xlc_r, xlc_r4,   Compile C source files.
 xlc_r7, xlc128, xlc128_r, (ANSI C89, ISO C99,
 xlc128_r4, xlc128_r7  IBM language extensions)

 xlc++, xlc++_r, xlc++_r4, Compile C++ source files.
 xlc++_r7, xlc++128,
 xlc++128_r, xlc++128_r4,
 xlc++128_r7, xlC, xlC_r,
 xlC_r4, xlC_r7, xlC128,
 xlC128_r, xlC128_r4,
 xlC128_r7

 cc, cc_r, cc_r4, cc_r7,   Compile legacy code that
 cc128, cc128_r, cc128_r4, does not conform to Standard
 cc128_r7  C. (pre-ANSI C)

 c89, c89_r, c89_r4,   Compile C source files with
 c89_r7, c89_128, c89_128_r,   strict conformance to the
 c89_128_r4, c89_128_r7C89 standard. (ANSI C89)

 c99, c99_r, c99_r4,   Compile C source files with
 c99_r7, c99_128, c99_128_r,   strict conformance to the
 c99_128_r4, c99_128_r7C99 standard. (ISO 99)

 xlc++core, xlc++core_r,   Compile C++ source files
 xlc++core_r7, xlc++core128,   but the compiler will
 xlc++core128_r,   link only to the core of
 xlc++core128_r7, xlCcore, the runtime library.
 xlCcore_r, xlCcore_r7,
 xlC128core, xlC128core_r,
 xlC128core_r7

 gxlc  Accepts GNU C options, maps
   them to their equivalent XL
   C option, then invokes xlc.

 gxlc++, gxlC  Accepts GNU C/C++ options, maps
   them to their equivalent XL
   C++ option,then invokes xlc++.

 The main difference between these commands is that they
 use different default options (which are set in the
 configuration file /etc/vac.cfg.XX, where XX represents
 the AIX version).
 See the Compiler Reference for more information on these
 invocation commands.

 All invocations with a suffix of _r allow for thread-safe
 compilation. Use these commands to create threaded
 applications or to link programs that use multi-threading.

So xlc_r seems like the right one as the default to compile Python I would say.

I will check your last commit soon (I have buildbot nearly running on AIX, that 
is how I observed this problem actually).

--

___
Python tracker 

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

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



[issue6164] [AIX] Patch to correct the AIX C/C++ linker argument used for 'runtime_library_dirs'

2010-09-14 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +sable

___
Python tracker 

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


--
nosy: +sable

___
Python tracker 

___
___
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  added the comment:

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

Yes of course, which is why I made the conservative fix instead :)

--

___
Python tracker 

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



[issue9846] ZipExtFile provides no mechanism for closing the underlying file object

2010-09-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Antoine, any reason not to put the close in the ZipFileExt close method 
> instead of a __del__ method?  (And document it, of course).

You are right, a close() method would be enough.
Furthermore, ZipExtFile already supports the context manager protocol 
(implicitly calling BufferedIOBase.close()), so you will simply be able to 
write:

with myzipfile.open("README", "r") as f:
# ...

--

___
Python tracker 

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

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


--
nosy: +sable

___
Python tracker 

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



[issue678250] test_mmap failling on AIX

2010-09-14 Thread Sébastien Sablé

Changes by Sébastien Sablé :


--
nosy: +sable

___
Python tracker 

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



[issue730467] Not detecting AIX_GENUINE_CPLUSPLUS

2010-09-14 Thread Sébastien Sablé

Changes by Sébastien Sablé :


--
nosy: +sable

___
Python tracker 

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


--
nosy: +sable

___
Python tracker 

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



[issue678264] test_resource fails when file size is limited

2010-09-14 Thread Sébastien Sablé

Changes by Sébastien Sablé :


--
nosy: +sable

___
Python tracker 

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


--
nosy: +sable

___
Python tracker 

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


--
nosy: +sable

___
Python tracker 

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


--
nosy: +sable

___
Python tracker 

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


--
nosy: +sable

___
Python tracker 

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

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 

___
___
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  added the comment:

sendto() has a similar problem. socket.sendto() takes (data, flags=0, addr), 
but SSLSocket.sendto() incorrectly forwards the arguments. Updated patch 
attached.

--
Added file: http://bugs.python.org/file18881/issue9729-3.patch

___
Python tracker 

___
___
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  added the comment:

Similar problem for sendto() (again, see issue9729).
socket.sendto() has an interesting signature (the middle `flags` argument is 
optional, not the following `addr`...).

--
title: Wrong signature for SSLSocket.recvfrom -> Wrong signature for 
SSLSocket.recvfrom and SSLSocket.sendto

___
Python tracker 

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



[issue9360] nntplib cleanup

2010-09-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Here is a further, still work-in-progress, patch. I'm posting it here so that 
interested people can give advice.

--
Added file: http://bugs.python.org/file18882/nntplib_cleanup3.patch

___
Python tracker 

___
___
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  added the comment:

Updated Makefile in r84803 - r84805.

--

___
Python tracker 

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

Changes by Andy Buckley :


--
nosy: +andybuckley

___
Python tracker 

___
___
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  added the comment:

Patch committed in r84806.

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

___
Python tracker 

___
___
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  added the comment:

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

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

___
Python tracker 

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

Daniel Stutzbach  added the comment:

Where does/did the FAQ live in the version control tree?

--

___
Python tracker 

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


--
nosy: +pitrou

___
Python tracker 

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

Daniel Stutzbach  added the comment:

It looks like the FAQ used be generated using Tools/faqwiz/faqwiz.py (which no 
longer exists).  According to that file:

---
This is a CGI program that maintains a user-editable FAQ.  It uses RCS
to keep track of changes to individual FAQ entries.  It is fully
configurable; everything you might want to change when using this
program to maintain some other FAQ than the Python FAQ is contained in
the configuration module, faqconf.py.
---

In other words, while the FAQ was under version control, it wasn't the regular 
repository.

I'll ask on python-dev is anyone has a copy.

--

___
Python tracker 

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

Daniel Stutzbach  added the comment:

Nevermind... archive.org has it. :-)

--

___
Python tracker 

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

Daniel Stutzbach  added the comment:

Fixed in r84810, r84811, and 84812.

For anyone curious, the old FAQ entry is here:
http://web.archive.org/web/20010203161100/http://www.python.org/doc/FAQ.html#3.24

--
resolution:  -> accepted
stage: needs patch -> committed/rejected
status: open -> closed
versions: +Python 2.7, 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



[issue9854] SocketIO should return None on EWOULDBLOCK

2010-09-14 Thread Antoine Pitrou

New submission from Antoine Pitrou :

SocketIO claims to implement RawIOBase, but it lets blocking IO errors pass 
through on non-blocking sockets:

>>> s = socket.create_connection(("python.org", 80)); s.settimeout(0.0)
>>> f = s.makefile("rb", buffering=0)
>>> f.readinto(bytearray(10))
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/antoine/py3k/nntp-9360/Lib/socket.py", line 228, in readinto
return self._sock.recv_into(b)
socket.error: [Errno 11] Resource temporarily unavailable

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

There also seems to be a problem in the default read() implementation in 
RawIOBase, which doesn't accept a possible None result from readinto():

>>> f.readinto = lambda x: None
>>> f.read(1)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'NoneType' object cannot be interpreted as an integer

(the RawIOBase docs themselves don't mention that readinto() can return None, 
but it's the only logical possibility: catching EWOULDBLOCK in read() but not 
in readinto() wouldn't make sense)

--
components: IO, Library (Lib)
messages: 116408
nosy: amaury.forgeotdarc, benjamin.peterson, pitrou, stutzbach
priority: normal
severity: normal
status: open
title: SocketIO should return None on EWOULDBLOCK
type: behavior
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



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

2010-09-14 Thread Tom

New submission from Tom :

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 

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

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



[issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method

2010-09-14 Thread Daniel Stutzbach

Changes by Daniel Stutzbach :


--
stage: patch review -> committed/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



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

2010-09-14 Thread Eric Smith

Eric Smith  added the comment:

The precedence doesn't work the way you think it does. Your example with the 
intermediate variable is the same as:

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

Note the extra level of parens so that .imag and .real are applied to the 
result of the multiplication.

--
nosy: +eric.smith
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
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  added the comment:

Thanks!

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

Sorry to have troubled you.

:)

--

___
Python tracker 

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



[issue9856] Change object.__format__(s) where s is non-empty to a DeprecationWarning

2010-09-14 Thread Eric Smith

New submission from Eric Smith :

In 3.3 the existing PendingDeprecationWarning needs to become a 
DeprecationWarning. In 3.4 it will become an error.

I'll change 3.3 after 3.2 is released.

See issue 7994 for the original PendingDeprecationWarning discussion.

--
assignee: eric.smith
components: Interpreter Core
keywords: easy
messages: 116413
nosy: eric.smith
priority: normal
severity: normal
status: open
title: Change object.__format__(s) where s is non-empty to a DeprecationWarning
type: behavior
versions: Python 3.3

___
Python tracker 

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



[issue7994] object.__format__ should reject format strings

2010-09-14 Thread Eric Smith

Eric Smith  added the comment:

See issue 9856 for changing this to a DeprecationWarning in 3.3.

--
status: open -> closed

___
Python tracker 

___
___
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  added the comment:

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

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

___
Python tracker 

___
___
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  added the comment:

Does

 yield *it

mean

 yield iter(tuple(it))

or

 for i in it:
 yield i
?

--
nosy: +eric.araujo

___
Python tracker 

___
___
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  added the comment:

The problem with RawIOBase.read is fixed in r84814.

--

___
Python tracker 

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

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



[issue6164] [AIX] Patch to correct the AIX C/C++ linker argument used for 'runtime_library_dirs'

2010-09-14 Thread Éric Araujo

Éric Araujo  added the comment:

Oops, this didn’t make it into 3.1.2.  Tarek, want me to commit it?

--

___
Python tracker 

___
___
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  added the comment:

Thanks for the investigation!

--

___
Python tracker 

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

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


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

___
Python tracker 

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


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

___
Python tracker 

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

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 

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

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

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



[issue9802] Document 'stability' of builtin min() and max()

2010-09-14 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Documented the current behavior in r84822.

Mark, if you're free on IRC at some point, I would like to discuss further.

--

___
Python tracker 

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

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

___
___
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  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 "", line 1, in 
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 

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

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

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


--
nosy: +asksol, jnoller

___
Python tracker 

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

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

Changes by Brian Curtin :


--
resolution:  -> accepted

___
Python tracker 

___
___
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  added the comment:

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

This feels like implementation driven testing.  I would prefer to disable the 
offending test pending further investigation into the core cause. 

It is not clear to me that these differences between 2.x and 3.x are not bugs.  
It seems to me that the 2.x/3.x difference discussed in msg116336 above is 
simply manifestation of --with-computed-gotos becoming default in 3.x.

--

___
Python tracker 

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


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

___
Python tracker 

___
___
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  added the comment:

Improving tests

--
Added file: 
http://bugs.python.org/file18887/python-distutils_mkpath_filemode-v2.diff

___
Python tracker 

___
___
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  added the comment:

It looks like 3.1 with computed gotos produces the yet another different 
tracing of list comprehensions:


2: l = [i for
   10:  i in
1:  range(10)]

--

___
Python tracker 

___
___
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 Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

It's the first time I see the _countof() macro. There is no other usage of it 
in python codebase. Could you change it for something more easy for non-Windows 
readers?

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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