[issue9253] argparse: optional subparsers

2010-11-16 Thread Steven Bethard

Steven Bethard  added the comment:

I think the proposed API looks fine and should be backwards compatible since 
add_subparsers will currently throw an exception with a default= argument.

In case someone feels like writing a patch, you'll want to look at 
_SubParsersAction.__init__, which will need to grow the default= argument, and 
pass a different nargs= argument on. I think you'll need to define a new nargs 
type which means you probably also need to look at 
ArgumentParser._get_nargs_pattern as well.

--

___
Python tracker 

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



[issue1028088] Cookies without values are silently ignored (by design?)

2010-11-16 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Revisiting this issue.

- Cookie: should contain name=value pairs
- Set-Cookie: header can contain a single word like 'secure'

The current design is along the same lines only.
In the original comment, the request had asked to document the behavior of 
Cookie class ignoring the nameless values. That should be okay.

--
assignee:  -> orsenthil
nosy: +orsenthil

___
Python tracker 

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



[issue10394] subprocess Popen deadlock

2010-11-16 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Did you attach the correct files? You mention about two programs in the
description, but you have attached only one file 'deadlock.py'.
Also, it does not fail on Python 2.7.1.  Please try it on the latest
codeline from release27-maint too.

--
nosy: +orsenthil

___
Python tracker 

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



[issue10399] AST Optimization: inlining of function calls

2010-11-16 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
nosy: +orsenthil

___
Python tracker 

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



[issue10403] Use "member" consistently

2010-11-16 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

It is 'attributes' instead of term 'members'. The term 'method' when it denotes 
methods can be left as such.

--
assignee: d...@python -> orsenthil
nosy: +orsenthil

___
Python tracker 

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



[issue10403] Use "member" consistently

2010-11-16 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
stage:  -> needs patch
type:  -> behavior
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



[issue8458] buildbot: test_cmd_line failure on Tiger: [Errno 9] Bad file descriptor

2010-11-16 Thread Ned Deily

Ned Deily  added the comment:

With 3.2a4, OS X 10.4 Tiger buildbot failures reported:


==
ERROR: test_run_code (test.test_cmd_line.CmdLineTest)
--
Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/test_cmd_line.py", 
line 95, in test_run_code
assert_python_failure('-c')
  File 
"/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/script_helper.py", 
line 55, in assert_python_failure
return _assert_python(False, *args, **env_vars)
  File 
"/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/script_helper.py", 
line 29, in _assert_python
env=env)
  File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/subprocess.py", 
line 683, in __init__
self.stdin = io.open(p2cwrite, 'wb', bufsize)
OSError: [Errno 9] Bad file descriptor

==
ERROR: test_run_module (test.test_cmd_line.CmdLineTest)
--
Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/test_cmd_line.py", 
line 72, in test_run_module
assert_python_failure('-m')
  File 
"/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/script_helper.py", 
line 55, in assert_python_failure
return _assert_python(False, *args, **env_vars)
  File 
"/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/script_helper.py", 
line 29, in _assert_python
env=env)
  File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/subprocess.py", 
line 683, in __init__
self.stdin = io.open(p2cwrite, 'wb', bufsize)
OSError: [Errno 9] Bad file descriptor

==
ERROR: test_version (test.test_cmd_line.CmdLineTest)
--
Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/test_cmd_line.py", 
line 48, in test_version
rc, out, err = assert_python_ok('-V')
  File 
"/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/script_helper.py", 
line 48, in assert_python_ok
return _assert_python(True, *args, **env_vars)
  File 
"/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/script_helper.py", 
line 29, in _assert_python
env=env)
  File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/subprocess.py", 
line 683, in __init__
self.stdin = io.open(p2cwrite, 'wb', bufsize)
OSError: [Errno 9] Bad file descriptor

On my 10.4 system, it seems to be a race condition: sometimes I see all three 
of these failures, sometimes just one, sometimes none.  Again, only on 10.4 
(Tiger), not 10.5 or 10.6.  But the 10.4 machine I'm using is by far the 
slowest of the three so it is possible that could be a factor.  Perhaps there 
is a race condition with cleaning up the p2c pipe from a previous run?

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function

2010-11-16 Thread Éric Araujo

Éric Araujo  added the comment:

I have read and closed too fast, Johannes still has the bug on OS X.  Can 
someone turn his example script into a patch adding a unit test?

--
resolution: out of date -> 
stage: committed/rejected -> unit test needed
status: closed -> open

___
Python tracker 

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



[issue10070] 2to3 wishes for already-2to3'ed files

2010-11-16 Thread Éric Araujo

Éric Araujo  added the comment:

> That's fair enough.

:) Do you want to close this feature request then?

--

___
Python tracker 

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



[issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified

2010-11-16 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo
versions:  -Python 2.6, 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



[issue10431] Failed issue tracker submission

2010-11-16 Thread Ezio Melotti

Changes by Ezio Melotti :


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



[issue10431] Failed issue tracker submission

2010-11-16 Thread Ezio Melotti

Changes by Ezio Melotti :


--
Removed message: http://bugs.python.org/msg121278

___
Python tracker 

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



[issue10431] Failed issue tracker submission

2010-11-16 Thread Ezio Melotti

Changes by Ezio Melotti :


Removed file: http://bugs.python.org/file19614/unnamed

___
Python tracker 

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



[issue10431] Failed issue tracker submission

2010-11-16 Thread admin

New submission from admin :

You are not a registered user.

Unknown address: Order Real Pfizer 

--
files: unnamed
messages: 121278
nosy: admin
priority: normal
severity: normal
status: open
title: Failed issue tracker submission
Added file: http://bugs.python.org/file19614/unnamed

___
Python tracker 

___Return-Path: 
X-Original-To: rep...@bugs.python.org
Delivered-To: roundup+trac...@psf.upfronthosting.co.za
Received: from [123.26.137.99] (unknown [123.26.137.99])
by psf.upfronthosting.co.za (Postfix) with ESMTP id F017410402D
for ; Tue, 16 Nov 2010 10:55:58 +0100 (CET)
From: "Order Real Pfizer 
To: rep...@bugs.python.org
Reply-To: rep...@bugs.python.org
Subject: Hi report, Best Deals. one In largest In Forum
Mime-Version: 1.0
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Message-Id: <20101116095558.f0174104...@psf.upfronthosting.co.za>
Date: Tue, 16 Nov 2010 10:55:58 +0100 (CET)

http://www.w3.org/TR/html4/loose.dtd";>



Newsletter





View http://xeqiyb.medicsri.ru/?BaBed4D4FF59d198F"; 
style="color:#0093D9;">Mobile | View
http://wuren.medicsri.ru/?5262b3319Cb9cc94"; 
style="color:#0093D9;">Webpage






http://ke.medicsri.ru/?8bb7A4a93d3eEc";>
http://b.medicsri.ru/osaa.jpg"; style="border-width: 0px">




 




PLEASE DO NOT REPLY TO THIS MESSAGE.
This is a system-generated Newsletter email. 
Replies will not be read or forwarded for handling.
This message was sent to rep...@bugs.python.org.
http://neaova.medicsri.ru/?B9FC632154FE73F1"; 
style="color:#817979;">Contact Us |
http://upejem.medicsri.ru/?40C41b61a8CB2&remove=rep...@bugs.python.org"; 
style="color:#817979;">Unsubscribe |
http://ezaha.medicsri.ru/?794148936577"; 
style="color:#817979;">Update Email Address |
http://kyewoc.medicsri.ru/?F1F19646a5441"; 
style="color:#817979;">Privacy Policy
Copyright 2010 The For. All rights reserved.






http://www.quawysuqoeg.com/07006aefAd4E8DD6f6d6C99806dC48C";>

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



[issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function

2010-11-16 Thread Michael Foord

Michael Foord  added the comment:

The issue is with a non-ascii character in a *Unicode* docstring. Python has to 
encode the string to write it to the terminal; the encode is implicit and so 
fails.

The problem doesn't happen with Python 3 unless you run on an ascii terminal.

--
assignee:  -> michael.foord

___
Python tracker 

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



[issue10432] concurrent.futures.as_completed() spins waiting for futures to complete

2010-11-16 Thread Scott Dial

New submission from Scott Dial :

The code in as_completed() waits on a FIRST_COMPLETED event, which means that 
after the first future completes, it will no longer wait at all. The proposed 
patch adds a _AsCompletedWaiter and uses a lock to swap out the finished list 
and reset the event.

This is a difficult problem to create a test case for without adding intrusive 
code to as_completed() to count how many times it loops or create a mock Event 
object that counts it, so I have not proposed a test.

--
components: Library (Lib)
files: futures-r86476.patch
keywords: patch
messages: 121280
nosy: scott.dial
priority: normal
severity: normal
status: open
title: concurrent.futures.as_completed() spins waiting for futures to complete
type: behavior
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file19615/futures-r86476.patch

___
Python tracker 

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



[issue10425] xmlrpclib support for None isn't compliant with XMLRPC

2010-11-16 Thread Adam Bielański

Adam Bielański  added the comment:

Ok, I apologize for being to hasty. Below you can find my answers:

1. SlowParser used in xmlrpclib doesn't deal with namespaces in any reasonable 
way. If there's a namespace prefix for tag, it's not separated from tag name, 
but passed as part of tag name. But I agree - this should be done better.

2. Well, I suppose that content of http://ws.apache.org/xmlrpc/extensions.html 
will only convince you that this patch is just for Java library and you reject 
it. I didn't find support for  in Perl nor Ruby. One of PHP libraries 
also support  (and ) - http://phpxmlrpc.sourceforge.net/, but 
AFAIK it doesn't require/provide any namespace at all. It just treats ex:nil as 
a synonym for nil, probably to be compatible with Apache library.

All in all - I think that my patch should be rejected. I can send simpler patch 
that would work like phpxmlrpc does - just accept ex:nil as well as nil and not 
try to analyze namespaces at all.

--

___
Python tracker 

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



[issue1553375] Add traceback.print_full_exception()

2010-11-16 Thread Nick Coghlan

Nick Coghlan  added the comment:

Note that my suggestion was to move the if statement out of the loop as-is: you 
would still be pulling the traceback to display from the caught exception 
rather than displaying the stack from the current point of execution. If you 
want the bottom most point to display where the actual exception occurred 
rather than the last line executed in the frame that caught it you need to be 
even smarter than that, though.

The information to construct the full stack trace properly is actually 
available, but it is necessary to be very careful as to how it is stitched 
together at the point where the traceback and the stack trace meet up.

For a full stack trace, this stitching actually needs to occur every time there 
is a jump from one exception to another. For finally clauses and reraised 
exceptions, the interpreter handles this internally so the traceback reflects 
the appropriate lines, but recreating a complete stack trace for the original 
exception in the face of PEP 3134 is going to require a bit of work in the 
traceback module.

Alternatively, you could just provide the full stack trace for the very last 
exception caught, leaving it to the reader to follow the traceback chain back 
down to the original exception.

Here's some useful code to explore this (I just spent some time playing with it 
to make sure I was giving the right answer here):

import sys
from traceback import print_exc, print_stack, print_tb
def f(n):
  this = "F%d" % n
  if n:
try:
  f(n-1)
except:
  print("*** Traceback in", this)
  print_exc(chain=False)
  print("*** Call stack in", this)
  print_stack()
  print("*** Replacing exception in", this)
  raise RuntimeError(this)
  print("*** Call stack in", this)
  print_stack()
  raise RuntimeError(this)

try:
  f(2)
except:
  etype, ex, tb = sys.exc_info()

"raise ex" will then show you the native display of that exception.

You can then use the context attributes to see what state is available to you:
>>> ex
RuntimeError('F2',)
>>> ex.__context__
RuntimeError('F1',)
>>> ex.__context__.__context__
RuntimeError('F0',)

In particular, we can see that the two inner exceptions are attached to frame 
objects which were used to run the nested function calls and hence have a frame 
that called them:
>>> ex.__traceback__.tb_frame.f_back
>>> ex.__context__.__traceback__.tb_frame.f_back

>>> ex.__context__.__context__.__traceback__.tb_frame.f_back


The issue we have is that landing in the exception handlers means the state of 
those frames has been altered by the stack unwinding process. Let's compare the 
traceback for each exception with the current state of the corresponding frame 
(we skip the first traceback entry for our outermost function - it is there 
courtesy of the interactive loop and irrelevant to the current exploration):

>>> ex.__traceback__.tb_next.tb_lineno # Top level exception line
2
>>> ex.__traceback__.tb_next.tb_frame.f_lineno # Last executed line
4
>>> ex.__context__.__traceback__.tb_lineno # f(2) exception line
5
>>> ex.__context__.__traceback__.tb_frame.f_lineno # Last executed line
12
>>> ex.__context__.__context__.__traceback__.tb_lineno # f(1) exception line
5
>>> ex.__context__.__context__.__traceback__.tb_frame.f_lineno # Last executed 
>>> line
12

f(0) avoids triggering the exception handler and we can see that the traceback 
line and the last executed line match in that case:

>>> ex.__context__.__context__.__traceback__.tb_next.tb_lineno
15
>>> ex.__context__.__context__.__traceback__.tb_next.tb_frame.f_lineno
15

So yes, the idea proposed is possible, but no, a simple call to print_stack 
isn't going to do the right thing.

--
keywords:  -needs review

___
Python tracker 

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



[issue10425] xmlrpclib support for None isn't compliant with XMLRPC

2010-11-16 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

On Tue, Nov 16, 2010 at 11:32:03AM +, Adam Bielański wrote:
>  just accept ex:nil as well as nil and not try to analyze namespaces at all.

But even that seems specific to Java/ Apache Extension.
If it is, then it might go in as part of issue8792.

--

___
Python tracker 

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



[issue10432] concurrent.futures.as_completed() spins waiting for futures to complete

2010-11-16 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
assignee:  -> bquinlan
nosy: +bquinlan
stage:  -> patch review
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



[issue10425] xmlrpclib support for None isn't compliant with XMLRPC

2010-11-16 Thread Adam Bielański

Adam Bielański  added the comment:

It is. It might go. Didn't notice issue8792 before, thanks for pointing it out.

Whole ex:nil issue is discussed there, so this issue might be closed.

--

___
Python tracker 

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



[issue10425] xmlrpclib support for None isn't compliant with XMLRPC

2010-11-16 Thread Senthil Kumaran

Changes by Senthil Kumaran :


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



[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2010-11-16 Thread Eugene Kapun

Eugene Kapun  added the comment:

Actually, this can't be fixed without modifying C API methods PyArg_ParseTuple 
and PyArg_ParseTupleAndKeywords, because it's possible to make an object 
deallocated before PyArg_ParseTuple returns, so Py_INCREF immediately after 
parsing would be already too late.

Here are my test cases:
test-resource.py - in Modules/resource.c, and python-bug-01.patch won't work 
against it.
test-ctypes.py - in Modules/_ctypes/_ctypes.c.
test-functools.py - in Modules/_functoolsmodule.c (py3k only).

--
components: +Interpreter Core -Extension Modules
nosy: +abacabadabacaba
title: Reference counting bug in setrlimit -> Reference counting bug in 
PyArg_ParseTuple and PyArg_ParseTupleAndKeywords
Added file: http://bugs.python.org/file19616/test-resource.py

___
Python tracker 

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



[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2010-11-16 Thread Eugene Kapun

Changes by Eugene Kapun :


Added file: http://bugs.python.org/file19617/test-ctypes.py

___
Python tracker 

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



[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2010-11-16 Thread Eugene Kapun

Changes by Eugene Kapun :


Added file: http://bugs.python.org/file19618/test-functools.py

___
Python tracker 

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



[issue10070] 2to3 wishes for already-2to3'ed files

2010-11-16 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy:  -haypo

___
Python tracker 

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



[issue10134] test_email failures on Windows: end of line issue?

2010-11-16 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy:  -haypo

___
Python tracker 

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



[issue10425] xmlrpclib support for None isn't compliant with XMLRPC

2010-11-16 Thread Éric Araujo

Changes by Éric Araujo :


--
superseder:  -> Support Apache extensions to XML-RPC in xmlrpclib

___
Python tracker 

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



[issue10425] xmlrpclib support for None isn't compliant with XMLRPC

2010-11-16 Thread Éric Araujo

Éric Araujo  added the comment:

There's no need to apologize, we welcome contributions like your report and are 
open to discuss patches :)

--

___
Python tracker 

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



[issue8792] Support Apache extensions to XML-RPC in xmlrpclib

2010-11-16 Thread Éric Araujo

Éric Araujo  added the comment:

An addition: It was reported in #10425 that None values are incorrectly 
serialized as , instead of just , or maybe 
<{namespace prefix for extensions defined by Apache}:nil/>.

--
nosy: +Adam.Bielański, eric.araujo, orsenthil

___
Python tracker 

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



[issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function

2010-11-16 Thread Éric Araujo

Éric Araujo  added the comment:

Johannes, can you paste the output of the locale command?

--

___
Python tracker 

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



[issue7900] posix.getgroups() failure on Mac OS X

2010-11-16 Thread R. David Murray

R. David Murray  added the comment:

I agree with Stephen.  The test in question is *not a valid test* on OSX.  
Therefore on OSX it should be skipped.

If you can think of a way to test the actual behavior of getgroups on OSX, 
that's even better.

--

___
Python tracker 

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



[issue7900] posix.getgroups() failure on Mac OS X

2010-11-16 Thread Michael Foord

Changes by Michael Foord :


--
nosy:  -michael.foord

___
Python tracker 

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



[issue8792] Support Apache extensions to XML-RPC in xmlrpclib

2010-11-16 Thread Adam Bielański

Adam Bielański  added the comment:

To make example provided by Amaury complete I'll add that in order to support 
both ways you also need to replace xmlrpclib.dumps() with code from attached 
file.

Changes to original xmlrpclib.dumps() function are outlined with comments. In 
short - it adds namespace declarations to methodCall and methodResponse 
elements and also makes Marshaller produce  instead of 

--
Added file: http://bugs.python.org/file19619/dumps_with_namespace.py

___
Python tracker 

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



[issue7900] posix.getgroups() failure on Mac OS X

2010-11-16 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Please explain how the failure can be reproduced.


I've done some testing on my machine using Apple's copy of python 2.6.1 (on OSX 
10.6), which has the same getgroups implementation as the current heads of the 
active branches.


>>> os.getgroups()
[20, 402, 204, 61, 12, 401]
>>> os.system("id -G")
20 402 204 61 12 401
0

(Now open the Accounts preference pane and add a new user)


>>> os.getgroups()
[20, 403, 402, 204, 61, 12, 401]
>>> os.system("id -G")
20 403 402 204 61 12 401
0

Note how the result of both os.getgroups and id -G changes, which should mean 
that tests shouldn't fail unless you happened to add a new account in the 
split-second between the "calls" to os.getgroups and "id -G" in a testrun.

Was the buildbot started using launchd (the recipe at 
 seems correct)? If not, how is it 
started?

--

___
Python tracker 

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



[issue7900] posix.getgroups() failure on Mac OS X

2010-11-16 Thread R. David Murray

R. David Murray  added the comment:

Having just reread this issue more carefully, my understanding is that Ronald 
had elected to make the results returned from os.getgroups match that returned 
by "system tools" (by which I understood him to mean the 'id' command).  Since 
Ronald reports he sees the intended behavior, Stephen's results seem to show 
that there is a problem with the fix in some circumstances which need to be 
understood.

Alexander noted that this should all be documented, and I agree, so I'm opening 
a new issue for the doc update.

--

___
Python tracker 

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



[issue10433] Document unique behavior of 'getgroups' on OSX

2010-11-16 Thread R. David Murray

New submission from R. David Murray :

Per issue 7900, os.getgroups on OSX does not behave the same way as on any 
other unix platform.  This seems worthy of a documentation note, since anyone 
trying to write portable code could get bit by this.

I don't really understand the relationship on OSX between what the current 
os.getgroups returns, what the normal unix os.getgroups returns, and what 
things a process can actually *do*, so I can't write that documentation.  
Hopefully someone else can.

A doc note is probably also needed about the relationship between os.setgroups 
and os.getgroups on OSX, which again I do not understand and so cannot write.

--
messages: 121293
nosy: r.david.murray
priority: normal
severity: normal
stage: needs patch
status: open
title: Document unique behavior of 'getgroups' on OSX
type: behavior

___
Python tracker 

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



[issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function

2010-11-16 Thread STINNER Victor

STINNER Victor  added the comment:

In Python 3, sys.stderr uses the 'backslashreplace' error handler. With C 
locale, sys.stderr uses the ASCII encoding and so the é unicode character is 
printed as \xe9.

In Python 2, sys.stderr.errors is strict by default.

It works if you specify the error handler:

$ ./python -c "import sys; sys.stderr.write(u'\xe9\n')"
é
$ PYTHONIOENCODING=ascii:backslashreplace ./python -c "import sys; 
sys.stderr.write(u'\xe9\n')"
\xe9

But with ASCII encoding, and the default error handler (strict), it fails:

$ PYTHONIOENCODING=ascii ./python -c "import sys; sys.stderr.write(u'\xe9\n')"
Traceback (most recent call last):
  File "", line 1, in 
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 0: 
ordinal not in range(128)
$ LANG= ./python -c "import sys; sys.stderr.write(u'\xe9\n')"
Traceback (most recent call last):
  File "", line 1, in 
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 0: 
ordinal not in range(128)

Change the default error handler in a minor release is not a good idea. But we 
can emulate the backslashreplace error handler. distutils.log does that in 
Python3:

class Log:

def __init__(self, threshold=WARN):
self.threshold = threshold

def _log(self, level, msg, args):
if level not in (DEBUG, INFO, WARN, ERROR, FATAL):
raise ValueError('%s wrong log level' % str(level))

if level >= self.threshold:
if args:
msg = msg % args
if level in (WARN, ERROR, FATAL):
stream = sys.stderr
else:
stream = sys.stdout
if stream.errors == 'strict':
# emulate backslashreplace error handler
encoding = stream.encoding
msg = msg.encode(encoding, "backslashreplace").decode(encoding)
stream.write('%s\n' % msg)
stream.flush()
(...)

_WritelnDecorator() of unittest.runner should maybe use the same code.

--
nosy: +haypo

___
Python tracker 

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



[issue7900] posix.getgroups() failure on Mac OS X

2010-11-16 Thread R. David Murray

R. David Murray  added the comment:

And it's entirely possible (even likely) that what Stephen is seeing here is a 
platform bug in OSX's quirky implementation of group management.

--

___
Python tracker 

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



[issue10413] Comments in unicode.h are out of date

2010-11-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Committed in revision 86478.  Should this go in 3.1?  This is a comments-only 
change, so it is fairly safe and merging may help future maintenance.  On the 
other hand, it is very unlikely that the header file will need to be changed in 
maintenance releases.  I'll close this in a few days if no one speaks up.

--
resolution:  -> accepted
stage: patch review -> committed/rejected
status: open -> pending

___
Python tracker 

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



[issue10434] Document the rules for "public names"

2010-11-16 Thread Alexander Belopolsky

New submission from Alexander Belopolsky :

As discussed in "Breaking undocumented API" thread [1] on python-dev,  a 
definition of "public names" is buried deep in the language reference manual:

"""
The public names defined by a module are determined by checking the
module’s namespace for a variable named __all__; if defined, it must
be a sequence of strings which are names defined or imported by that
module. The names given in __all__ are all considered public and are
required to exist. If __all__ is not defined, the set of public names
includes all names found in the module’s namespace which do not begin
with an underscore character ('_'). __all__ should contain the entire
public API. It is intended to avoid accidentally exporting items that
are not part of the API (such as library modules which were imported
and used within the module).
"""  [2]

It has been argued that this is not the authoritative definition and 
alternatives have been suggested such as "any name that does not begin with an 
underscore except imported modules."
mportant for the users and developers of cpython and other python 
implementations to know what names they can rely upon to stay defined between 
releases, the rules for "public names" should be documented.

I agree that the library manual is a more appropriate place for such 
documentation.  The definition should include the naming conventions and the 
set of promises that Python makes about public name availability in the future 
releases.


[1] http://mail.python.org/pipermail/python-dev/2010-November/105490.html
[2] http://docs.python.org/reference/simple_stmts.html

--
assignee: d...@python
components: Documentation
messages: 121297
nosy: belopolsky, d...@python
priority: normal
severity: normal
stage: needs patch
status: open
title: Document the rules for "public names"
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



[issue10433] Document unique behavior of 'getgroups' on OSX

2010-11-16 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
nosy: +belopolsky

___
Python tracker 

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



[issue10433] Document unique behavior of 'getgroups' on OSX

2010-11-16 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee:  -> d...@python
components: +Documentation, Macintosh
nosy: +d...@python
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



[issue10413] Comments in unicode.h are out of date

2010-11-16 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Alexander Belopolsky wrote:
> 
> Alexander Belopolsky  added the comment:
> 
> Committed in revision 86478.  Should this go in 3.1?  This is a comments-only 
> change, so it is fairly safe and merging may help future maintenance.  On the 
> other hand, it is very unlikely that the header file will need to be changed 
> in maintenance releases.  I'll close this in a few days if no one speaks up.

It's essentially a documentation bug that you fixed. So yes, it should
go in 3.1 as well.

--
status: pending -> open

___
Python tracker 

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



[issue10413] Comments in unicode.h are out of date

2010-11-16 Thread Marc-Andre Lemburg

Changes by Marc-Andre Lemburg :


--
status: open -> pending

___
Python tracker 

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



[issue10434] Document the rules for "public names"

2010-11-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Michael Foord suggested adding the following to developer documentation such as 
PEP 8. [1] I am not sure PEP 8 is the right place for it.  In my opinion, PEP 8 
is mostly about stylistic choices that don't have a major impact on the users.  
In other words, unless you are developing python itself, you are unlikely to 
consult PEP 8.  The API stability rules, however affect every user who 
programmed in python long enough to see a major release.  I don't have 
objections to Michael's definitions below, but if included in the library 
manual, they should be reworded to address the user rather than the developer 
of the API.

"""
How about making this explicit (either pep 8 or our developer docs):

If a module or package defines __all__ that authoritatively defines the 
public interface. Modules with __all__ SHOULD still respect the naming 
conventions (leading underscore for private members) to avoid confusing 
users. Modules SHOULD NOT export private members in __all__.

Names imported into a module a never considered part of its public API 
unless documented to be so or included in __all__.

Methods / functions / classes and module attributes whose names begin 
with a leading underscore are private.

If a class name begins with a leading underscore none of its members are 
public, whether or not they begin with a leading underscore.

If a module name in a package begins with a leading underscore none of 
its members are public, whether or not they begin with a leading underscore.

If a module or package doesn't define __all__ then all names that don't 
start with a leading underscore are public.

All public members MUST be documented. Public functions, methods and 
classes SHOULD have docstrings. Private members may have docstrings.
""" [1]

[1] http://mail.python.org/pipermail/python-dev/2010-November/105476.html

--
nosy: +michael.foord

___
Python tracker 

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



[issue10413] Comments in unicode.h are out of date

2010-11-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Committed to 3.1 branch in revision 86481.

--
status: pending -> closed
type:  -> behavior
versions: +Python 3.1

___
Python tracker 

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



[issue10413] Comments in unicode.h are out of date

2010-11-16 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Alexander Belopolsky wrote:
> 
> Alexander Belopolsky  added the comment:
> 
> Committed to 3.1 branch in revision 86481.

Thanks.

--

___
Python tracker 

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



[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky

New submission from Alexander Belopolsky :

The following C-APIs are only documented in comments inside unicode.h:

PyUnicode_GetMax
PyUnicode_Resize
PyUnicode_InternImmortal
PyUnicode_FromOrdinal
PyUnicode_GetDefaultEncoding
PyUnicode_AsDecodedObject
PyUnicode_AsDecodedUnicode
PyUnicode_AsEncodedObject
PyUnicode_AsEncodedUnicode
PyUnicode_BuildEncodingMap
PyUnicode_EncodeDecimal
PyUnicode_Append
PyUnicode_AppendAndDel
PyUnicode_Partition
PyUnicode_RPartition
PyUnicode_RSplit
PyUnicode_IsIdentifier
Py_UNICODE_strlen
Py_UNICODE_strcpy
Py_UNICODE_strcat
Py_UNICODE_strncpy
Py_UNICODE_strcmp
Py_UNICODE_strncmp
Py_UNICODE_strchr
Py_UNICODE_strrchr

--
assignee: belopolsky
components: Documentation
messages: 121302
nosy: belopolsky
priority: normal
severity: normal
stage: needs patch
status: open
title: Document unicode C-API in reST
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



[issue10433] Document unique behavior of 'getgroups' on OSX

2010-11-16 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



[issue8649] Py_UNICODE_* functions are undocumented

2010-11-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

There are more undocumented functions in unicode.h.  It makes sense to fix all 
of them in one patch.  Closing this as superseded by #10435.

--
nosy: +belopolsky
resolution:  -> duplicate
status: open -> closed
superseder:  -> Document unicode C-API in reST

___
Python tracker 

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



[issue10434] Document the rules for "public names"

2010-11-16 Thread Ron Adam

Ron Adam  added the comment:

You may also want to update help topics.

help("PRIVATENAMES").

Identifiers (Names)
***

An identifier occurring as an atom is a name.  See section
*Identifiers and keywords* for lexical definition and section *Naming
and binding* for documentation of naming and binding.

When the name is bound to an object, evaluation of the atom yields
that object. When a name is not bound, an attempt to evaluate it
raises a ``NameError`` exception.

**Private name mangling:** When an identifier that textually occurs in
a class definition begins with two or more underscore characters and
does not end in two or more underscores, it is considered a *private
name* of that class. Private names are transformed to a longer form
before code is generated for them.  The transformation inserts the
class name in front of the name, with leading underscores removed, and
a single underscore inserted in front of the class name.  For example,
the identifier ``__spam`` occurring in a class named ``Ham`` will be
transformed to ``_Ham__spam``.  This transformation is independent of
the syntactical context in which the identifier is used.  If the
transformed name is extremely long (longer than 255 characters),
implementation defined truncation may happen.  If the class name
consists only of underscores, no transformation is done.


Other topics that may be of interest.

IDENTIFIERS
NAMESPACES
PACKAGES
PRIVATENAMES
SPECIALATTRIBUTES
SPECIALIDENTIFIERS
SPECIALMETHODS

--
nosy: +ron_adam

___
Python tracker 

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



[issue9076] Add C-API documentation for PyUnicode_AsDecodedObject/Unicode and PyUnicode_AsEncodedObject/Unicode

2010-11-16 Thread Georg Brandl

Georg Brandl  added the comment:

Documenting Unicode C APIs is now tracked in #10435.

--
nosy: +georg.brandl
resolution:  -> out of date
status: open -> closed
superseder:  -> Document unicode C-API in reST

___
Python tracker 

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



[issue2799] Remove _PyUnicode_AsString(), rework _PyUnicode_AsStringAndSize(), add PyUnicode_AsChar()

2010-11-16 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
components: +Interpreter Core
stage:  -> needs patch
versions: +Python 3.3 -Python 3.0, Python 3.1

___
Python tracker 

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



[issue10433] Document unique behavior of 'getgroups' on OSX

2010-11-16 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +michael.foord

___
Python tracker 

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



[issue10318] "make altinstall" installs many files with incorrect shebangs

2010-11-16 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue10429] bug in test_imaplib

2010-11-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This was a real bug in IMAP.starttls() actually. Fixed in r86485.

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



[issue2901] "error: can't allocate region" from mmap() when receiving big chunk of data

2010-11-16 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

I'm not sure whether it's related but on psutil we have a similar error message 
by using Python 2.6.1 64-bit:
http://code.google.com/p/psutil/issues/detail?id=135

--
nosy: +giampaolo.rodola
status: pending -> open

___
Python tracker 

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



[issue2901] "error: can't allocate region" from mmap() when receiving big chunk of data

2010-11-16 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +ixokai

___
Python tracker 

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



[issue10436] tarfile.extractfile in "r|" stream mode fails with filenames or members from getmembers()

2010-11-16 Thread David Nesting

New submission from David Nesting :

When opening a tarfile with mode "r|" (streaming mode), extractfile("filename") 
and extractfile(mytarfile.getmembers()[0]) raise "tarfile.StreamError: seeking 
backwards is not allowed".  extractfile(mytarfile.next()) succeeds.  A more 
complete test case:

"""
import tarfile
import StringIO

# Create a simple tar file in memory.  This could easily be a real tar file
# though.
data = StringIO.StringIO()
tf = tarfile.open(fileobj=data, mode="w")
tarinfo = tarfile.TarInfo(name="testfile")
filedata = StringIO.StringIO("test data")
tarinfo.size = len(filedata.getvalue())
tf.addfile(tarinfo, fileobj=filedata)
tf.close()
data.seek(0)

# Open as an uncompressed stream
tf = tarfile.open(fileobj=data, mode="r|")

#f = tf.extractfile("testfile")
#print "%s: %s" % (f.name, f.read())
#
#Traceback (most recent call last):
#  File "./bug.py", line 19, in 
#print "%s: %s" % (f.name, f.read())
#  File "/usr/lib/python2.7/tarfile.py", line 815, in read
#buf += self.fileobj.read()
#  File "/usr/lib/python2.7/tarfile.py", line 735, in read
#return self.readnormal(size)
#  File "/usr/lib/python2.7/tarfile.py", line 742, in readnormal
#self.fileobj.seek(self.offset + self.position)
#  File "/usr/lib/python2.7/tarfile.py", line 554, in seek
#raise StreamError("seeking backwards is not allowed")
#tarfile.StreamError: seeking backwards is not allowed

#for member in tf.getmembers():
#  f = tf.extractfile(member)
#  print "%s: %s" % (f.name, f.read())
#
# Same traceback

while True:
  member = tf.next()
  if member is None:
break
  f = tf.extractfile(member)
  print "%s: %s" % (f.name, f.read())

# This works.
"""

It appears that extractfile("filename") invokes getmember("filename"), which 
invokes getmembers().  getmembers() scans the entire file before returning 
results, and by doing so, it's read past and discarded the actual file data, 
which makes it impossible for us to actually extract it.

If this is accurate, this seems tricky to completely fix.  You could make 
getmembers() a generator that doesn't read too far ahead so that the file's 
contents are still available if someone wants to retrieve them for each file 
yielded.  getmember("filename") could just scan forward through the file until 
it hits a match, but you'd still lose the ability to do a getmember("filename") 
on a file that we skipped over.

If nothing else, document that extractfile("filename"), getmember() and 
getmembers() won't work reliably in streaming mode, and possibly raise an 
exception whenever someone tries just to make behavior consistent.

--
components: Library (Lib)
messages: 121308
nosy: David.Nesting
priority: normal
severity: normal
status: open
title: tarfile.extractfile in "r|" stream mode fails with filenames or members 
from getmembers()
type: behavior
versions: Python 2.6, Python 2.7

___
Python tracker 

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



[issue2901] "error: can't allocate region" from mmap() when receiving big chunk of data

2010-11-16 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This still needs to be verified that there is a problem with a *current* 
release. That means 2.7.1 (rc just out) or 3.2 (a4 just out).

If this would be considered a security issue (I do not know) then 'current' 
includes 2.5.5, 2.6.6, and 3.1.3 (rc or final).

Without such verification, this should be closed until the problem appears 
again.

--
status: open -> pending

___
Python tracker 

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



[issue10394] subprocess Popen deadlock

2010-11-16 Thread Christoph Mathys

Christoph Mathys  added the comment:

Yes, it's the correct file. Sorry, I'm making quite a mess in my description 
about program: The "attached program" is deadlock.py. Program One and Two are 
python scripts executed using "python -c", the code is inside deadlock.py.

I installed python 2.7 (2.7.0+) and 3.1 (3.1.2, had to fix a print statement) 
and could reproduce the error on both versions. Checking the code in 
subprocess.py confirmed that the bug is still there. However, I had to increase 
the number of threads (deadlock.py, line 38) to provoke the error, but I used 
different hardware and OS release than in the first test ((but still multi core 
on Linux).

What do you expect on fail? I'm a noob when it comes to python, the script just 
prints "command took too long: ", nothing else...

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



[issue10437] ThreadPoolExecutor should accept max_workers=None

2010-11-16 Thread Daniel Stutzbach

New submission from Daniel Stutzbach :

ProcessPoolExecutor allows the max_workers parameter to the constructor to be 
omitted or None, in which case it will set the max_workers based on the number 
of CPUs.

It would be nice if ThreadPoolExecutor's constructor worked the same way; 
having the same interface is one of the wonderful things about this pair of 
classes.

I have a patch pretty much ready (with tests and a doc update), but it causes 
concurrent/futures/thread.py to import multiprocessing.  Were you trying to 
avoid that?

--
assignee: stutzbach
components: Library (Lib)
messages: 121311
nosy: bquinlan, stutzbach
priority: normal
severity: normal
stage: needs patch
status: open
title: ThreadPoolExecutor should accept max_workers=None
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



[issue7900] posix.getgroups() failure on Mac OS X

2010-11-16 Thread Stephen Hansen

Stephen Hansen  added the comment:

On 11/16/10 5:44 AM, Ronald Oussoren wrote:
> Ronald Oussoren  added the comment:
> Please explain how the failure can be reproduced.

I have. But to do so more directly:

1. Launch Terminal.app; leave the window console open.
2. Run: id -G
3. Run: python
4. Type: import posix; posix.getgroups()
5. Go into System Preferences, add a user.
6. Type again, posix.getgroups(): notice, the values have not changed.
7. Either os.system("id -G") or ^D and type id -G: in either case, these
values *have* changed. Tested both.

> I've done some testing on my machine using Apple's copy of python 2.6.1 (on 
> OSX 10.6), which has the same getgroups implementation as the current heads 
> of the active branches.

As I said, the slave is running the latest on 10.5. Perhaps its a
platform bug which is fixed in 10.6: either way, the test is declaring
behavior is true that it shouldn't, I think.

Perhaps the test should only be skipped on 10.5? I am happy to provide a
patch which tests sys.platform == "darwin" and then runs sw_vars to make
only skip < 10.6.

I verified posix.getgroups() on 10.6 does not appear to exhibit this
behavior on my SL slave. However, that box does a LOT, so I can't vouch
for its 'purity' like the 10.5 box.

> Was the buildbot started using launchd (the recipe at 
>  seems correct)? If not, how is 
> it started?

It was started with launchd, yes: with a variation of that recipe.
However as I stated, the behavior can be readily reproduced directly in
Terminal.

--

___
Python tracker 

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



[issue2901] "error: can't allocate region" from mmap() when receiving big chunk of data

2010-11-16 Thread Stephen Hansen

Stephen Hansen  added the comment:

I can try to do some testing to reproduce w/ 2.7: 2.5 was IIRC 32-bit on 
leopard by default though, so should I force a non-64-bit build to test this? 
I'm not entirely sure if that'll change things, but want to make sure. I can 
test with both 2.5 and 2.7 on leopard.

--
status: pending -> open

___
Python tracker 

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



[issue10438] list an example for calling static methods from WITHIN classes

2010-11-16 Thread Ian

New submission from Ian :

Concerning this section of the docs:
http://docs.python.org/library/functions.html#staticmethod

There is no example for calling a static method from another static method 
within the same class.

As I discovered later, it's simple: C.f() -- from inside the class or outside 
it.

A total newbie will accept this and move on... but in other programming 
languages, it's frowned upon to the class name from within the class.  For 
example, in PHP you use the "self::" prefix and Java you don't need a prefix at 
all.  

So, even though I had it right the first time, it didn't SEEM right... so I 
went on a wild goose chase, for nothing.  Googling "java call static method" 
will get you java documentation that lists both cases, as does "c++ call static 
method" and "php call static method".  

I feel that by adding "Note: you must also use the C.f() syntax when calling 
from within the class", the documentation will be more complete.

--
assignee: d...@python
components: Documentation
messages: 121314
nosy: d...@python, ifreecarve
priority: normal
severity: normal
status: open
title: list an example for calling static methods from WITHIN classes
type: feature request

___
Python tracker 

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



[issue10438] list an example for calling static methods from WITHIN classes

2010-11-16 Thread R. David Murray

R. David Murray  added the comment:

IMO this follows logically from Python's self-consistent rules.  I'm not 
convinced that the amount of extra verbiage required to detail this particular 
case would make the docs clearer, but you are welcome to suggest a wording for 
us to consider.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue10438] list an example for calling static methods from WITHIN classes

2010-11-16 Thread R. David Murray

R. David Murray  added the comment:

Woops, I see you did suggest a wording.  However, what you wrote is imprecise 
and confused me when I first read it (I thought you meant that self.f() didn't 
work!).

--

___
Python tracker 

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



[issue10438] list an example for calling static methods from WITHIN classes

2010-11-16 Thread Georg Brandl

Georg Brandl  added the comment:

I tend to agree with David.  Especially since calling base class methods also 
uses the explicit class name.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue6745] (curses) addstr() takes str in Python 3

2010-11-16 Thread Łukasz Langa

Łukasz Langa  added the comment:

We'll try to solve this for 3.2.

--
assignee:  -> lukasz.langa
nosy: +lukasz.langa
priority: normal -> high
versions: +Python 3.2 -Python 3.1

___
Python tracker 

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



[issue10438] list an example for calling static methods from WITHIN classes

2010-11-16 Thread Georg Brandl

Georg Brandl  added the comment:

> However, what you wrote is imprecise and confused me when I first read
> it (I thought you meant that self.f() didn't work!).

Well, it doesn't work in the specific case he mentioned of calling from another 
static method :)

--

___
Python tracker 

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



[issue10438] list an example for calling static methods from WITHIN classes

2010-11-16 Thread R. David Murray

R. David Murray  added the comment:

Only because you don't *have* self.  Which is why I said "imprecise" and not 
"incorrect" :)

--

___
Python tracker 

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



[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Tue, Nov 16, 2010 at 10:38 AM, M.-A. Lemburg  wrote:
> Alexander Belopolsky wrote:
..
>> I also have a similar question about C API.  Here, in absence of
>> __all__, the answer should be clear: all symbols in public header
>> files should start with either _Py_ or Py_ and those that start with
>> Py_ are public.   The question is what should be done with names that
>> start with Py_, but are not documented?  Can we add an underscore to
>> those names?  If so, should a (deprecated) alias be made available?
>> Should they be documented as deprecated?
>>
>> I think these questions can only be answered on a case by case bases
>> which choices being:
>>
>> 1. Document.
>> 2. Document as deprecated.
>> 3. Document as deprecated, add underscore prefix and retain a deprecated 
>> alias.
>> 4. Add an underscore prefix.
>>
>> The specific set of names that I would like to consider is the
>> following from unicode.h.  I am marking with (*) the names that I
>> think should be documented and with (D) those that should be
>> deprecated:
>>
>> PyUnicode_GetMax
>> PyUnicode_Resize (*)
>> PyUnicode_InternImmortal
>> PyUnicode_FromOrdinal (*)
>> PyUnicode_GetDefaultEncoding (D)
>> PyUnicode_AsDecodedObject
>> PyUnicode_AsDecodedUnicode
>> PyUnicode_AsEncodedObject
>> PyUnicode_AsEncodedUnicode
>> PyUnicode_BuildEncodingMap
>> PyUnicode_EncodeDecimal (*)
>> PyUnicode_Append (*)
>> PyUnicode_AppendAndDel (*)
>> PyUnicode_Partition (*)
>> PyUnicode_RPartition (*)
>> PyUnicode_RSplit (*)
>> PyUnicode_IsIdentifier (*)
>> Py_UNICODE_strlen
>> Py_UNICODE_strcpy
>> Py_UNICODE_strcat
>> Py_UNICODE_strncpy
>> Py_UNICODE_strcmp
>> Py_UNICODE_strncmp
>> Py_UNICODE_strchr
>> Py_UNICODE_strrchr
>
> For Unicode, unicodeobject.h defines which APIs are private or not.
> APIs which don't appear in the header file are either private or
> need to be added to the header file (but I don't think there are
> any in this category).
>
> All APIs in the header that do not appear in the documentation,
> should be added there as well. unicodeobject.h already provides
> documentation for most of the APIs you've listed above (except some
> new ones that were added later on).
>
> One API I'm not sure about is PyUnicode_AppendAndDel(). It's somewhat
> obscure and given that we already have PyUnicode_Concat(), I think
> it should be made private and eventually dropped.
>

I would also like to nominate PyUnicode_AsEncodedObject and 
PyUnicode_AsEncodedUnicode.  The later is a particularly attractive candidate 
for removal because it appears to be broken:

v = PyCodec_Encode(unicode, encoding, errors);
if (v == NULL)
goto onError;
if (!PyUnicode_Check(v)) {
PyErr_Format(PyExc_TypeError,
 "encoder did not return an str object (type=%.400s)",
 Py_TYPE(v)->tp_name);

Since PyCodec_Encode() returns bytes in 3.x, the code above will always raise 
an error.

--

___
Python tracker 

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



[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
nosy: +haypo, lemburg, loewis

___
Python tracker 

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



[issue10430] _sha.sha().digest() method is endian-sensitive. and hexdigest()

2010-11-16 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue10438] list an example for calling static methods from WITHIN classes

2010-11-16 Thread Ian

Ian  added the comment:

Am I to understand that self.f() is a valid way to call a static method?  Can 
you see how that would run counter to intuition for someone who is familiar 
with other languages?

Given that, I would make the following (more precise) change:

< It can be called either on the class (such as C.f()) or on an instance (such 
as C().f()). 
---
> It can be called either on the class (such as C.f()) or on an instance (such 
> as C().f() or self.f()).

--

___
Python tracker 

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



[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

PyUnicode_AsDecodedObject() and PyUnicode_AsDecodedUnicode() appear to be 
broken as well: both start with a PyUnicode_Check(unicode) and then pass 
unicode to PyCodec_Decode() which expects bytes.

--

___
Python tracker 

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



[issue10438] list an example for calling static methods from WITHIN classes

2010-11-16 Thread Ian

Ian  added the comment:

Disregard my previous comment; calling self.f() does not work from a static 
method.

I stand by my previous suggestion, but I'll clarify it like this:

"Note: you must also use the C.f() syntax when calling from a static method 
within the C class"

--

___
Python tracker 

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



[issue10435] Document unicode C-API in reST

2010-11-16 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Please note that PyCodec_Encode()/PyCodec_Decode() will return whatever the 
codec returns for these operations.

The codec system is not limited to converting between Unicode and bytes only.

A typical example is a same-type codec such as rot13 that only transforms 
Unicode data.

--

___
Python tracker 

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



[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Tue, Nov 16, 2010 at 5:54 PM, Marc-Andre Lemburg
 wrote:
>
> Marc-Andre Lemburg  added the comment:
>
> Please note that PyCodec_Encode()/PyCodec_Decode() will return whatever the 
> codec returns for these operations.
>
> The codec system is not limited to converting between Unicode and bytes only.

Not according to the latest reST documentation:

"""
* Encoding converts a string object to a bytes object using a
particular character set encoding (e.g., cp1252 or iso-8859-1).

* Decoding converts a bytes object encoded using a particular
character set encoding to a string object.
""" 
http://docs.python.org/dev/library/codecs.html?highlight=codecs#codecs.Codec.encode

> A typical example is a same-type codec such as rot13 that only transforms 
> Unicode data.

I thought rot13 would only transform English (or Latin) alphabet.

--

___
Python tracker 

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



[issue9173] logger statement not guarded in shutil._make_tarball

2010-11-16 Thread v_peter

v_peter  added the comment:

Added a test to the patch

--
nosy: +v_peter
Added file: http://bugs.python.org/file19620/shutil_logger_with_test.py27.patch

___
Python tracker 

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



[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Attached patch documents all previously undocumented unicode C API functions.  
Note that for the PyUnicode_As{En,De}codedObject() and 
PyUnicode_As{En,De}DecodedUnicode() functions I attempted to capture what they 
are supposed to do rather than what the current implementation does.

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file19621/issue10435.diff

___
Python tracker 

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



[issue10439] PyCodec C API is not documented in reST

2010-11-16 Thread Alexander Belopolsky

New submission from Alexander Belopolsky :

Python Codec Registry and support functions are well documented in codecs.h 
header file.  It should be easy to convert that to reST.

--
assignee: d...@python
components: Documentation
keywords: easy
messages: 121329
nosy: belopolsky, d...@python, haypo, lemburg, loewis
priority: normal
severity: normal
stage: needs patch
status: open
title: PyCodec C API is not documented in reST
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



[issue10435] Document unicode C-API in reST

2010-11-16 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Alexander Belopolsky wrote:
> 
> Alexander Belopolsky  added the comment:
> 
> On Tue, Nov 16, 2010 at 5:54 PM, Marc-Andre Lemburg
>  wrote:
>>
>> Marc-Andre Lemburg  added the comment:
>>
>> Please note that PyCodec_Encode()/PyCodec_Decode() will return whatever the 
>> codec returns for these operations.
>>
>> The codec system is not limited to converting between Unicode and bytes only.
> 
> Not according to the latest reST documentation:
> 
> """
> * Encoding converts a string object to a bytes object using a
> particular character set encoding (e.g., cp1252 or iso-8859-1).
> 
> * Decoding converts a bytes object encoded using a particular
> character set encoding to a string object.
> """ 
> http://docs.python.org/dev/library/codecs.html?highlight=codecs#codecs.Codec.encode

That's another documentation bug, then. The codec system has always
supported other type combinations for encoding/decoding as well.

Only certain methods on str and bytes objects in 3.x limit the possible
types to either str or bytes - which probably results in the
idea that Python codecs don't support anything else.

The text from the 2.7 documentation is correct, also for 3.x:

http://docs.python.org/library/codecs.html#codec-objects

>> A typical example is a same-type codec such as rot13 that only transforms 
>> Unicode data.
> 
> I thought rot13 would only transform English (or Latin) alphabet.

Right, everything else passes through as-is.

Other examples are codecs that escape certain code points using e.g.
XML entity sequences, backslash notations or other such techniques.

For bytes, you have the zip, base64 and hex codecs which work in
a similar way.

--

___
Python tracker 

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



[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Tue, Nov 16, 2010 at 7:19 PM, Marc-Andre Lemburg
 wrote:
..
>> * Decoding converts a bytes object encoded using a particular
>> character set encoding to a string object.
>> """ 
>> http://docs.python.org/dev/library/codecs.html?highlight=codecs#codecs.Codec.encode
>
> That's another documentation bug, then. The codec system has always
> supported other type combinations for encoding/decoding as well.
>
> Only certain methods on str and bytes objects in 3.x limit the possible
> types to either str or bytes - which probably results in the
> idea that Python codecs don't support anything else.
>
> The text from the 2.7 documentation is correct, also for 3.x:
>
> http://docs.python.org/library/codecs.html#codec-objects
>

I agree and will handle this in #10435 because codecs.h
(unsurprisingly) supports your POV and we don't want C-API docs to be
in conflict with Py-API docs.

If you have time, please take a look at
PyUnicode_As{En,De}codedObject() and
PyUnicode_As{En,De}DecodedUnicode() documentation in the attached
patch.

--

___
Python tracker 

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



[issue10435] Document unicode C-API in reST

2010-11-16 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue10439] PyCodec C API is not documented in reST

2010-11-16 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

> I agree and will handle this in #10435 because codecs.h

s/#10435/#10439/

--

___
Python tracker 

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



[issue7900] posix.getgroups() failure on Mac OS X

2010-11-16 Thread Ned Deily

Ned Deily  added the comment:

The problem Stephen is seeing with the buildbot machine is ABI-dependent; the 
behavior of getgroups(2) changed in 10.6.  You can demonstrate this all on a 
10.6 system.  Open a terminal session and verify the process's groups:

$ id -G
20 40200 401 204 100 98 80 61 12 403 40100 103
$ /usr/local/bin/python3.2 -c 'import posix; print(posix.getgroups())'
[20, 40200, 401, 204, 100, 98, 80, 61, 12, 403, 40100, 103]

Now create a new user with System Preferences.  One of the quirks here is that 
OS X 10.5 and 10.6 create a new group for that user and assign other existing 
users to that group.  (The new group is one of the somewhat mysteriously named 
com.apple.sharepoint.group.n groups.)

Still in the same terminal session after the new user/group was created and the 
existing user name we are running under was automatically added to the new 
group:
$ id -G
20 40200 401 204 100 98 80 61 12 403 40100 402 103
$ # note: new group membership 402 = com.apple.sharepoint.group.1
$ now test with 3 Pythons built from the same source, py3k tip:
$ cd ../../sdk10-4/py3k/
$ ./python -c 'import posix; print(posix.getgroups())'
[20, 40200, 401, 204, 100, 98, 80, 61, 12, 403, 40100, 103]
$ cd ../../sdk10-5/py3k/
$ ./python -c 'import posix; print(posix.getgroups())'
[20, 40200, 401, 204, 100, 98, 80, 61, 12, 403, 40100, 103]
$ cd ../../sdk10-6/py3k/
$ ./python -c 'import posix; print(posix.getgroups())'
[20, 40200, 401, 204, 100, 98, 80, 61, 12, 403, 40100, 402, 103]

Only the version built with a deployment target of 10.6 - that is, using the 
10.6 SDK and the 10.6 ABI - reflects the updated grouplist.  And that 
difference can be seen, as Alexander noted earlier, in the symbols referenced.  
An nm ./python | grep getgroups for each shows:
U _getgroups$DARWIN_EXTSN
for the 10.6 deployment target version but
U _getgroups
for the 10.5 and 10.4 targeted versions.

So unless building for a deployment target of 10.6 (or higher), it is to be 
expected that the output of /usr/bin/id will not match the results of 
getgroups(2) if the user's group membership changes during the run (as can 
happen when another user is created or deleted).

This particular problem should only be an issue when running on 10.5 and higher 
and using a 10.5 or earlier ABI.  On 10.4, neither getgroups(2) (as expected) 
nor /usr/bin/id see updates to group memberships made during the lifetime of 
the parent terminal session; starting a new login terminal session does see the 
updates.

Also note that this issue would be observable with all existing current 
python.org OS X installers running on 10.5 or 10.6 as most have been built with 
a 10.3 deployment target while 2.7 also provides an additional 32-/64-bit one 
with a 10.5 deployment target.  (I believe Ronald intends to build future 
32-/64-bit installers with a 10.6 deployment target so they would be the first 
to not be subject to this issue.)

FTR, here are the configure options I used for each build:

./configure --enable-universalsdk=/Developer/SDKs/MacOSX10.4u.sdk 
--with-universal-archs=32-bit MACOSX_DEPLOYMENT_TARGET=10.4

./configure --enable-universalsdk=/Developer/SDKs/MacOSX10.5.sdk 
--with-universal-archs=intel MACOSX_DEPLOYMENT_TARGET=10.5

./configure --enable-universalsdk=/Developer/SDKs/MacOSX10.6.sdk 
--with-universal-archs=intel MACOSX_DEPLOYMENT_TARGET=10.6

--
nosy: +ned.deily

___
Python tracker 

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



[issue7900] posix.getgroups() failure on Mac OS X

2010-11-16 Thread Ned Deily

Ned Deily  added the comment:

(Argh! Just to be very clear, those ./configure commands are all one line, 
including the MACOSX_DEPLOYMENT_TARGET as an argument to the configure script.)

--

___
Python tracker 

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



[issue10435] Document unicode C-API in reST

2010-11-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

It looks like I misunderstood what PyUnicode_As{En,De}codedObject() and
PyUnicode_As{En,De}codedUnicode() functions are designed to do.  Attaching a 
corrected patch, issue10435a.diff.

--
Added file: http://bugs.python.org/file19622/issue10435a.diff

___
Python tracker 

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



[issue10440] support RUSAGE_THREAD as a constant in the resource module

2010-11-16 Thread Robert Collins

New submission from Robert Collins :

RUSAGE_THREAD (since Linux 2.6.26)
  Return resource usage statistics for the calling thread.

This is very handy for multi threaded apps in determining runtime in a thread, 
page faults from the thread etc.

--
messages: 121336
nosy: rbcollins
priority: normal
severity: normal
status: open
title: support RUSAGE_THREAD as a constant in the resource module
type: feature request

___
Python tracker 

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