[issue2137] test_crasher in test_struct uses 8 GB memory on 64 bit systems

2008-06-11 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

Test disabled on 64bit when using the supplied patch when forward
porting to 2.6 in trunk revision 64114.

--
assignee:  -> gregory.p.smith
keywords: +64bit, easy, patch
nosy: +gregory.p.smith
priority:  -> high
resolution: fixed -> accepted
versions: +Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3077] h2py char literal doesn work

2008-06-11 Thread Gabriel

New submission from Gabriel <[EMAIL PROTECTED]>:

Tools/scripts/h2py.py doesn't work with char literals in a define. This
was first reported in the following post :

http://mail.python.org/pipermail/python-list/2005-September/340608.html

The fix works, I have included the patch as h2py.py.patch2.

Also, the current thing that is done when a char literal is encountered
is to use the char's ordinal value. I think that this is misleading,
since in C, if you use a char literal you are usually meaning to check
for an ascii char value like so :

#define EXIT_CHAR 'x'

/* . */

if(char_read == EXIT_CHAR)
   exit(0)

and not an integer/numeric value, and if you intend to do numerical
things then you'd use an integer/numeric value instead.

This is the way ctypes does it with their h2xml.py & xml2py.py scripts.

So currently, a defines like the following :

#define EXIT_CHAR 'x'
#define MASK 0xfe
#define LIMIT 4

give (after the h2py.py.patch2 being applied) :

EXIT_CHAR = 120
MASK = 0xfe
LIMIT = 4

and the second patch I am submitting (h2py.py.patch) makes it give :

EXIT_CHAR = 'x'
MASK = 0xfe
LIMIT = 4

which I think is a better interpretation of the intent of the defines.

So to resume :

h2py.py.patch2 : this fixes the bug, maintaining the way the original
h2py script tried to process a char literal.

h2py.py.patch : this fixes the bug, but makes a char literal become a
string literal in python instead of the ordinal value.

Gabriel

--
components: Demos and Tools
files: h2py.py.patch2
messages: 67943
nosy: grossetti
severity: normal
status: open
title: h2py char literal doesn work
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file10578/h2py.py.patch2

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3077] h2py char literal doesn work

2008-06-11 Thread Gabriel

Changes by Gabriel <[EMAIL PROTECTED]>:


--
keywords: +patch
Added file: http://bugs.python.org/file10579/h2py.py.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2517] Error when printing an exception containing a Unicode string

2008-06-11 Thread Nick Coghlan

Nick Coghlan <[EMAIL PROTECTED]> added the comment:

As far as I am concerned, the implementation of PyObject_Unicode in
object.c has a bug in it: it should NEVER be retrieving __unicode__ from
the instance object. The implementation of PyObject_Format in abstract.c
shows the correct way to retrieve a pseudo-slot method like __unicode__
from an arbitrary object.

Line 482 in object.c is the offending line:
func = PyObject_GetAttr(v, unicodestr);

Fix that bug, then add a __unicode__ method back to Exception objects
and you will have the best of both worlds.

--
nosy: +ncoghlan

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2632] performance problem in socket._fileobject.read

2008-06-11 Thread Ralf Schmitt

Ralf Schmitt <[EMAIL PROTECTED]> added the comment:

Can we get the fix for release25-maint? It will not get worse than the
current state is.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2517] Error when printing an exception containing a Unicode string

2008-06-11 Thread Nick Coghlan

Nick Coghlan <[EMAIL PROTECTED]> added the comment:

Here's the key difference with the way PyObject_Format looks up the
pseudo-slot method:

PyObject *method = _PyType_Lookup(Py_TYPE(obj),
  str__format__);

_PyType_Lookup instead of PyObject_GetAttr - so unicode(Exception) would
only look for type.__unicode__ and avoid getting confused by the utterly
irrelevant Exception.__unicode__ method (which is intended only for
printing Exception instances, not for printing the Exception type itself).

You then need the PyInstance_Check/PyObject_GetAttr special case for
retrieving the bound method because _PyType_Lookup won't work on classic
class instances.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2517] Error when printing an exception containing a Unicode string

2008-06-11 Thread Marc-Andre Lemburg

Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment:

On 2008-06-11 11:32, Nick Coghlan wrote:
> Nick Coghlan <[EMAIL PROTECTED]> added the comment:
> 
> As far as I am concerned, the implementation of PyObject_Unicode in
> object.c has a bug in it: it should NEVER be retrieving __unicode__ from
> the instance object. The implementation of PyObject_Format in abstract.c
> shows the correct way to retrieve a pseudo-slot method like __unicode__
> from an arbitrary object.

The only difference I can spot is that the PyObject_Format() code
special cases non-instance objects.

> Line 482 in object.c is the offending line:
>   func = PyObject_GetAttr(v, unicodestr);
> 
> Fix that bug, then add a __unicode__ method back to Exception objects
> and you will have the best of both worlds.

I'm not sure whether that would really solve anything.

IMHO, it's better to implement the tp_unicode slot and then
check that before trying .__unicode__ (as mentioned in the comment
in PyObject_Unicode()).

___
Python tracker <[EMAIL PROTECTED]>

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



[issue643841] New class special method lookup change

2008-06-11 Thread Barry A. Warsaw

Barry A. Warsaw <[EMAIL PROTECTED]> added the comment:

This is a huge thread and I don't have time to look at the entire patch.  

However, it seems like the main purpose of the proxy class is to work
around a basic deficiency in Python.  Now, if this is a purposeful
omissions (i.e. defined as part of the language), then a proxy class
makes sense.  If not, then you should probably work to fix the
implementation.

In general, the concept of a base proxy mixin makes sense if it's
generic enough and flexible enough to be of wider use to Python
programmers.  One measure of that might be to re-implement the existing
proxy-like classes to use this mixin class.  If that can't be done, then
this is too specialized (or too unproven) and should probably be a
cheeseshop module first.

I'm also uncomfortable with adding a new typestool module, mostly
because we have a types module.  I know they're there for different
purposes, but still, it seems ugly to me.  On top of that, adding a
module for a single class seems like overkill.

Do you have any ideas about where this might go in an existing module?

Overall, I'm -0 on adding this to Python.  Guido should have the final
say though.  I'm knocking this down to critical so it won't hold up the
betas.  Other than the refactoring, it seems like adding a proxy class,
while being a new feature, is isolated enough that it could go in after
beta.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue643841] New class special method lookup change

2008-06-11 Thread Barry A. Warsaw

Changes by Barry A. Warsaw <[EMAIL PROTECTED]>:


--
priority: release blocker -> critical

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2517] Error when printing an exception containing a Unicode string

2008-06-11 Thread Simon Cross

Simon Cross <[EMAIL PROTECTED]> added the comment:

Attached a patch which implements Nick Coghlan's suggestion. All
existing tests in test_exceptions.py and test_unicode.py pass as does
the new unicode(Exception(u"\xe1")) test.

Added file: 
http://bugs.python.org/file10580/exception-unicode-with-type-fetch.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3050] Implement PEP 371: multiprocessing module

2008-06-11 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Please see Georg's Python-dev message about importing multiprocessing.

--
status: closed -> open

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3051] heapq change breaking compatibility

2008-06-11 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

Thomas, please let me know if r64116 works for you.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue762920] API Functions for PyArray

2008-06-11 Thread Raymond Hettinger

Changes by Raymond Hettinger <[EMAIL PROTECTED]>:


--
assignee: rhettinger -> teoliphant

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2384] [Py3k] line number is wrong after encoding declaration

2008-06-11 Thread Barry A. Warsaw

Barry A. Warsaw <[EMAIL PROTECTED]> added the comment:

This is a bug and not a new feature, so it could go in after beta.  I'm
knocking it down to a critical.

--
nosy: +barry
priority: release blocker -> critical

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1023290] proposed struct module format code addition

2008-06-11 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

Don't think there is sufficient agreement on this one to move forward.  
It looks like OP has a completely different conception of the struct 
module than the other respondants.  

For the time being, pickle.dumps with protocol 2 can serve as a way to 
save arrays of long integers in binary.

--
assignee: rhettinger -> 
priority: normal -> low

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3050] Implement PEP 371: multiprocessing module

2008-06-11 Thread Jesse Noller

Jesse Noller <[EMAIL PROTECTED]> added the comment:

Specifically:

>>> import multiprocessing
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/jesse/open_source/subversion/python-
trunk/Lib/multiprocessing/__init__.py", line 63, in 
import _multiprocessing
AttributeError: 'module' object has no attribute 'BufferTooShort'

This occurs due to the fact that __init__.py imports _multiprocessing 
prior to the definition of the exceptions. This should be moved to the 
ccode. From Georg:

"The test suite passes (at least for some buildbots) because it imports
_multiprocessing first, which then in its init function imports 
multiprocessing
to get the BufferTooShort exception.

Since BufferTooShort and other exceptions inheriting from ProcessError 
are
simple derived exceptions, why aren't they created in the C module in 
the
first place?"

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2911] rewrite test_struct as a unittest

2008-06-11 Thread Giampaolo Rodola'

Giampaolo Rodola' <[EMAIL PROTECTED]> added the comment:

In case you're interested there are a bunch of other tests I converted:
http://bugs.python.org/issue?%40search_text=unittest&title=&%40columns=title&id=&%40columns=id&creation=&creator=giampaolo.rodola&activity=&%40columns=activity&%40sort=activity&actor=&nosy=&type=&components=&versions=&dependencies=&assignee=&keywords=&priority=&%40group=priority&status=1&%40columns=status&resolution=&%40pagesize=50&%40startwith=0&%40queryname=&%40old-queryname=&%40action=search
Some of them are really simple and can be committed easily.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2911] rewrite test_struct as a unittest

2008-06-11 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

On Wed, Jun 11, 2008 at 7:33 AM, Giampaolo Rodola'
<[EMAIL PROTECTED]> wrote:
>
> Giampaolo Rodola' <[EMAIL PROTECTED]> added the comment:
>
> In case you're interested there are a bunch of other tests I converted:
> http://bugs.python.org/issue?%40search_text=unittest&title=&%40columns=title&id=&%40columns=id&creation=&creator=giampaolo.rodola&activity=&%40columns=activity&%40sort=activity&actor=&nosy=&type=&components=&versions=&dependencies=&assignee=&keywords=&priority=&%40group=priority&status=1&%40columns=status&resolution=&%40pagesize=50&%40startwith=0&%40queryname=&%40old-queryname=&%40action=search
> Some of them are really simple and can be committed easily.

Ok. Will do after these stressful betas.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3050] Implement PEP 371: multiprocessing module

2008-06-11 Thread Jesse Noller

Jesse Noller <[EMAIL PROTECTED]> added the comment:

Additional things to clean up post-beta:

- Review all docs fully to ensure the documented API is still in sync with 
the renames.
- Restore the commented out tests in test_event
- Restore the commented out test in test_bounded_semaphore

___
Python tracker <[EMAIL PROTECTED]>

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



[issue643841] New class special method lookup change

2008-06-11 Thread Nick Coghlan

Nick Coghlan <[EMAIL PROTECTED]> added the comment:

Unfortunately, the standard library doesn't tend to do this kind of
delegation (aside from weakref.proxy, which implements the equivalent
code directly in C), so there isn't a lot of standard library code that
will benefit from it directly.

However, maintaining such a class on PyPI is also fairly undesirable,
due to the extremely tight coupling between the list of methods it needs
to delegate explicitly and the tp_* slots in the PyType method
definitions - add a new tp_* slot, and it's necessary to add the same
methods to the proxy class. Different Python implementations are going
to have different needs as to which slots they have to delegate
explicitly, and which can be left to the __getattribute__ catch-all
delegation.

As far as adding a module for a single class goes, I wouldn't expect it
to remain that way forever. E.g., I'd hope to eventually see a
CallableMixin that defined __get__ the same way a function does, making
it easier to create callables that behave like functions when stored as
a class attribute.

That said, I'd be happy enough with adding the ProxyMixin to the types
module instead, but I thought we were still trying to get rid of that
module.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2997] PyNumberMethods has left-over fields in Py3

2008-06-11 Thread Barry A. Warsaw

Changes by Barry A. Warsaw <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2234] cygwinccompiler.py fails for latest MinGW releases.

2008-06-11 Thread Jason Tishler

Jason Tishler <[EMAIL PROTECTED]> added the comment:

There have been three different regular expressions proposed to 
resolve this issue:

1. http://bugs.python.org/issue2234
2. http://bugs.python.org/issue3013
3. http://cygwin.com/ml/cygwin/2008-05/msg00622.html

Does anyone know which one is best?

I would like to release a patched Cygwin Python 2.5.2 that resolves 
this issue, but I feel we should reach consensus on what regular 
expression to use before I do so.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue643841] New class special method lookup change

2008-06-11 Thread Nick Coghlan

Nick Coghlan <[EMAIL PROTECTED]> added the comment:

bleh, "application independent decision" in my last post should read
"interpreter implementation dependent decision".

___
Python tracker <[EMAIL PROTECTED]>

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



[issue643841] New class special method lookup change

2008-06-11 Thread Nick Coghlan

Nick Coghlan <[EMAIL PROTECTED]> added the comment:

and "__print__" was meant to be "__unicode__"...

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3051] heapq change breaking compatibility

2008-06-11 Thread Thomas Herve

Thomas Herve <[EMAIL PROTECTED]> added the comment:

Yes, the last commit did the trick. Thanks.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue643841] New class special method lookup change

2008-06-11 Thread Nick Coghlan

Nick Coghlan <[EMAIL PROTECTED]> added the comment:

And (mainly for Barry's benefit) a quick recap of why I think this is
necessary for Python 3.0:

For performance or correctness reasons, the interpreter is permitted to
bypass the normal __getattribute__ when looking up special methods such
as __print__ or __index__. Whether or not the normal attribute lookup
machinery is bypassed for a specific special method is an application
independent decision.

In CPython's case, this bypassing can occur either because there is a
tp_* slot dedicated to the method, or because the interpreter uses
Py_TYPE(obj) and _PyType_Lookup instead of PyObject_GetAttr to find the
method implementation (or type(obj).meth instead of obj.meth for special
method lookups implemented in Python code).

This behaviour creates a problem for value-based delegation such as that
provided by weakref.proxy: unlike overriding __getattr__ on a classic
class, merely overriding __getattribute__ on a new-style class instance
is insufficient to be able to correctly delegate all of the special methods.

The intent of providing a typetools.ProxyMixin (or alternatively a
types.ProxyMixin class) is to allow fairly simply conversion of classic
classes that implement value-based delegation to new-style classes by
inheriting from ProxyMixin rather than inheriting from object directly.

Given the close proximity of the beta perhaps I should PEP'ify this to
get a formal yea or nay from Guido? I haven't managed to get much
response to previous python-dev posts about it.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3078] tokenize.py improvements

2008-06-11 Thread Aristotelis Mikropoulos

New submission from Aristotelis Mikropoulos <[EMAIL PROTECTED]>:

Various tokenize.py performance boosts and code clarifications.

--
components: Library (Lib)
files: tokenize.py.patch
keywords: patch
messages: 67965
nosy: Indy
severity: normal
status: open
title: tokenize.py improvements
type: performance
versions: Python 2.5
Added file: http://bugs.python.org/file10581/tokenize.py.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3051] heapq change breaking compatibility

2008-06-11 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

Would like to make the 3.0 code use __lt__ only.
Any objections?

--
priority: high -> normal

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3051] heapq change breaking compatibility

2008-06-11 Thread Thomas Herve

Thomas Herve <[EMAIL PROTECTED]> added the comment:

Sure, that's fine with me.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3051] heapq change breaking compatibility

2008-06-11 Thread Jean-Paul Calderone

Jean-Paul Calderone <[EMAIL PROTECTED]> added the comment:

I tried this too and then wrote a couple unit tests for this.  The one
for the Python implementation which tests the case where only __le__ is
defined fails, though.

Diff attached.

--
keywords: +patch
Added file: http://bugs.python.org/file10582/test_heapq.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3051] heapq change breaking compatibility

2008-06-11 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

I saw no need to complicate the pure python code for this.

Really, the client code should use __cmp__ or define all six rich 
comparisons.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2848] Remove mimetools usage from the stdlib

2008-06-11 Thread Humberto Diogenes

Humberto Diogenes <[EMAIL PROTECTED]> added the comment:

mimetools removal is almost complete, with the exception of only two 
broken tests: test_urllib2_localnet and test_xmlrpc. I'm not sure if it 
can make it to this beta, but at least it's really close.

Added file: http://bugs.python.org/file10583/remove_mimetools.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2848] Remove mimetools usage from the stdlib

2008-06-11 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

Barry, can you take a look at this?
Ideally, it should go it before the beta
so it can get thoroughly exercised.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3050] Implement PEP 371: multiprocessing module

2008-06-11 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file10584/py3k_failing.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3051] heapq change breaking compatibility

2008-06-11 Thread Jean-Paul Calderone

Jean-Paul Calderone <[EMAIL PROTECTED]> added the comment:

Thanks for the explanation.  Unfortunately, even if we change our code
to work with the new requirements, all the old code is still out there.
 Maybe this doesn't matter, since there are so many other
incompatibilities between Python 2.5 and Python 2.6.  And there aren't
many cases where the extension module isn't available, anyway.  It will
be surprising and probably hard to debug if anyone runs into this, but I
suppose it's possible that no one will.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3051] heapq change breaking compatibility

2008-06-11 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

There should be no cases where the pure python code runs instead of the 
C code.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2517] Error when printing an exception containing a Unicode string

2008-06-11 Thread Nick Coghlan

Nick Coghlan <[EMAIL PROTECTED]> added the comment:

Minor cleanup of Simon's patch attached - aside from a couple of
unneeded whitespace changes, it all looks good to me.

Not checking it in yet, since it isn't critical for this week's beta
release - I'd prefer to leave it until after that has been dealt with.

Added file: 
http://bugs.python.org/file10585/exception-unicode-with-type-fetch-no-whitespace-changes.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3050] Implement PEP 371: multiprocessing module

2008-06-11 Thread Tim Golden

Tim Golden <[EMAIL PROTECTED]> added the comment:

The _multiprocessing module is not building under Windows at the moment.
Attempting to import multiprocessing (from an .exe build from the
current svn) gives "ImportError: No module named _multiprocessing" and
the test suite skips the test for the same reason.

--
nosy: +tim.golden

___
Python tracker <[EMAIL PROTECTED]>

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



[issue643841] New class special method lookup change

2008-06-11 Thread Nick Coghlan

Nick Coghlan <[EMAIL PROTECTED]> added the comment:

New patch (proxymixin.diff) uploaded that correctly delegates
__format__, as well as using an overridable return_inplace() method to
generate the inplace operation return values. The _target attribute has
also been made formally part of the public API (as 'target'), although
you obviously need to explicitly invoke object.__getattribute__ in order
for it to be visible. The name of the attribute is also available at the
module level as _PROXY_TARGET_ATTR.

Added file: http://bugs.python.org/file10586/proxymixin.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue643841] New class special method lookup change

2008-06-11 Thread Nick Coghlan

Nick Coghlan <[EMAIL PROTECTED]> added the comment:

Note that I don't make any promises about the correctness of the ReST
formatting in that latest patch - my Doc build is misbehaving at the
moment, and I haven't had a chance to look at what is wrong with it.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue762920] API Functions for PyArray

2008-06-11 Thread Travis Oliphant

Travis Oliphant <[EMAIL PROTECTED]> added the comment:

I will look at the patch, but generally I'm not inclined to give the
array module more legs because I agree that the desired functionality
should be put into the memoryview object and the buffer protocol.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3050] Implement PEP 371: multiprocessing module

2008-06-11 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

On Wed, Jun 11, 2008 at 9:20 AM, Tim Golden <[EMAIL PROTECTED]> wrote:
>
> Tim Golden <[EMAIL PROTECTED]> added the comment:
>
> The _multiprocessing module is not building under Windows at the moment.
> Attempting to import multiprocessing (from an .exe build from the
> current svn) gives "ImportError: No module named _multiprocessing" and
> the test suite skips the test for the same reason.

Can you tell why it's not building?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2517] Error when printing an exception containing a Unicode string

2008-06-11 Thread Marc-Andre Lemburg

Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment:

On 2008-06-11 16:15, Nick Coghlan wrote:
> Nick Coghlan <[EMAIL PROTECTED]> added the comment:
> 
> Minor cleanup of Simon's patch attached - aside from a couple of
> unneeded whitespace changes, it all looks good to me.
> 
> Not checking it in yet, since it isn't critical for this week's beta
> release - I'd prefer to leave it until after that has been dealt with.
> 
> Added file: 
> http://bugs.python.org/file10585/exception-unicode-with-type-fetch-no-whitespace-changes.diff

That approach is fine as well.

I still like the idea to add a tp_unicode slot, though, since that's
still missing for C extension types to benefit from.

Perhaps we can have both ?!

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3050] Implement PEP 371: multiprocessing module

2008-06-11 Thread Tim Golden

Tim Golden <[EMAIL PROTECTED]> added the comment:

Benjamin Peterson wrote:
> Benjamin Peterson <[EMAIL PROTECTED]> added the comment:
> 
> On Wed, Jun 11, 2008 at 9:20 AM, Tim Golden <[EMAIL PROTECTED]> wrote:
>> Tim Golden <[EMAIL PROTECTED]> added the comment:
>>
>> The _multiprocessing module is not building under Windows at the moment.
>> Attempting to import multiprocessing (from an .exe build from the
>> current svn) gives "ImportError: No module named _multiprocessing" and
>> the test suite skips the test for the same reason.
> 
> Can you tell why it's not building?

I was hoping you wouldn't ask :) I can't run VS visually at the
moment so I'm down to inspecting the .sln file by hand which
I have no experience of. I suspect that someone better versed
in VS solution files than I needs to add the module in. I'll try to
get to it unless someone else chips in.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2065] trunk version does not compile with vs8 and vc6

2008-06-11 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

First, thank you for keeping these patches up to date.

- The patch for 2.5 is OK for me. We could just add the a paragraph that
appears in your patch for trunk (PC/VC6/readme.txt):
+_msi
+_msi.c. You need to install Windows Installer SDK to build this module.

- I worked on your patch for trunk/ and py3k/ to allow compilation with
a stock VC6 *without* a modern PlatformSDK installed (i.e NTDDI_VERSION
is not defined)
This is relevant only for socketmodule; with a stock VC6, IPV6 is not
available, WSAIoctl is not exposed, and getaddrinfo() is emulated.

- Replacing _wstat with GetFileAttributesW is good thing: stat("nul")
says that the file exists!
But it is not enough: try to "import con" or "import nul", before and
after your patch. Fun in both cases (if you "import con", type some
chars, and press ^Z)

- The patches also work for VS8.0 (I just had to update the list of .c)

I will try to come with updated files, and test them with VS2003 Express
(VS7.1).

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1023290] proposed struct module format code addition

2008-06-11 Thread Josiah Carlson

Josiah Carlson <[EMAIL PROTECTED]> added the comment:

This isn't about packing arrays of long integers in an array.  I know
the discussion is old, and I know the discussion is long, and honestly,
I don't really need this particular functionality anymore (in the struct
module in particular), but I still believe that being able to pack and
unpack arbitrarily lengthed integers is useful.

What is interesting is that this functionality was supposed to be in
binascii years ago (which I resolved to myself as being sufficient), yet
currently is not.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2517] Error when printing an exception containing a Unicode string

2008-06-11 Thread Nick Coghlan

Nick Coghlan <[EMAIL PROTECTED]> added the comment:

I'm not sure adding a dedicated method slot would be worth the hassle
involved - Py3k drop backs to just the tp_str slot anyway, and the only
thing you gain with a tp_unicode slot over _PyType_Lookup of a
__unicode__ attribute is a small reduction in memory usage and a slight
speed increase.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2517] Error when printing an exception containing a Unicode string

2008-06-11 Thread Simon Cross

Simon Cross <[EMAIL PROTECTED]> added the comment:

Re msg67974:
> Minor cleanup of Simon's patch attached - aside from a couple of
> unneeded whitespace changes, it all looks good to me.
>
> Not checking it in yet, since it isn't critical for this week's beta
> release - I'd prefer to leave it until after that has been dealt with.

Thanks for the clean-up, Nick. The mixture of tabs and spaces in the
current object.c was unpleasant :/.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3050] Implement PEP 371: multiprocessing module

2008-06-11 Thread Jesse Noller

Jesse Noller <[EMAIL PROTECTED]> added the comment:

Here is a diff for the tests under py3k, I applied the svnmerge, then 
ben's patch and made a couple of import changes.

Added file: http://bugs.python.org/file10587/py3k_fixed.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue643841] New class special method lookup change

2008-06-11 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

The name Proxy seems too vague.  This class is all about targeted 
delegation.  Am curious, has this been out as a recipe; has it been 
used in combat yet?

--
nosy: +rhettinger

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3050] Implement PEP 371: multiprocessing module

2008-06-11 Thread Tim Golden

Tim Golden <[EMAIL PROTECTED]> added the comment:

I'm sorry; I've had a look and there's no chance of my updating the
solution and project files by hand; and I can't run Visual Studio at the
moment. I'll try emailing Trent or Christian in the hope that one of
them's available to do it.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3021] Lexical exception handlers

2008-06-11 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Commited in r64121.

--
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2507] Exception state lives too long in 3.0

2008-06-11 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Solved by r64121.

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2833] __exit__ silences the active exception

2008-06-11 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Fixed in r64121.

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3050] Implement PEP 371: multiprocessing module

2008-06-11 Thread Tim Golden

Tim Golden <[EMAIL PROTECTED]> added the comment:

Trent's supplied me with enough info to patch the project files
manually. The attached patch against r64120 results in the
_multiprocessing module building. I'm running the tests now but I'll
upload the patch in any case.

Added file: http://bugs.python.org/file10588/pcbuild.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2605] Descriptor instance attributes not interpreted consistently

2008-06-11 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

The behavior observed is intentional.  The docs should be updated.

--
nosy: +gvanrossum
resolution:  -> rejected
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2517] Error when printing an exception containing a Unicode string

2008-06-11 Thread Marc-Andre Lemburg

Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment:

On 2008-06-11 16:49, Nick Coghlan wrote:
> Nick Coghlan <[EMAIL PROTECTED]> added the comment:
> 
> I'm not sure adding a dedicated method slot would be worth the hassle
> involved - Py3k drop backs to just the tp_str slot anyway, and the only
> thing you gain with a tp_unicode slot over _PyType_Lookup of a
> __unicode__ attribute is a small reduction in memory usage and a slight
> speed increase.

AFAIK, _PyType_Lookup will only work for base types, ie. objects
subclassing from object. C extension types often do not inherit from
object, since the attribute access mechanisms and object creation
are a lot simpler when not doing so.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3050] Implement PEP 371: multiprocessing module

2008-06-11 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Thanks very much Tim and Trent. I've merged multiprocessing into Py3k
and added the Windows files. I hope that works.

--
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue643841] New class special method lookup change

2008-06-11 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

I want to make this "bypass getattr" behavior mandatory for those
operations that currently use it, forcing the issue for other
implementations of Python.  That's a doc change (but an important one!).
 There are probably many random places where the docs imply that getattr
is used where it isn't.

I am not sure that we need a proxy implementation in the stdlib; usually
when proxying there is some intentional irregularity (that's why you're
proxying) and I'm not sure how useful the mix-in class will be in
practice.  We should wait and see how effective it is in some realistic
situations before accepting it into the stdlib.  Also, typetools strikes
me as a horrible name.

--
nosy: +gvanrossum

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2234] cygwinccompiler.py fails for latest MinGW releases.

2008-06-11 Thread Will Brown

Will Brown <[EMAIL PROTECTED]> added the comment:

None of the above will work on both '2.18.50.20080523' & '1.2.3a'

-- William Brown --
-- Boeing Networked Systems Technology --
   Kent:253.657.5586 Blvu:425.373.2738

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3066] FD leak in urllib2

2008-06-11 Thread Sharmila Sivakumar

Sharmila Sivakumar <[EMAIL PROTECTED]> added the comment:

Since the socket object is added to a list, a reference to the object
always exists right? That would mean that it would not be garbage
collected as long as the reference exists.  

On the other hand, it should also be noted that in close method, the
socket is not explicitly closed and for a single urlopen, atleast 3
sockets are opened.

--
nosy: +sharmila

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3079] sys.exit() called from optparse - bad, bad, bad

2008-06-11 Thread Skip Montanaro

New submission from Skip Montanaro <[EMAIL PROTECTED]>:

This seems like a bug in optparse.OptionParser:

def exit(self, status=0, msg=None):
if msg:
sys.stderr.write(msg)
sys.exit(status)

def error(self, msg):
"""error(msg : string)

Print a usage message incorporating 'msg' to stderr and exit.
If you override this in a subclass, it should not return -- it
should either exit or raise an exception.
"""
self.print_usage(sys.stderr)
self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg))

By default I think it should raise an exception when it encounters an
error, not exit.  Programmers shouldn't be forced to subclass code in
the standard library to get recommended practice.

If you feel this behavior can't be changed in 2.6 it should at least
be corrected in 3.0.

The cruel irony is that inside OptionParser.parse_args it actually
catches both BadOptionError and OptionValueError but suppresses them
by calling self.error() within the except block...  *arrhhh*...
The correct behavior there is (in my opinion) to get rid of the
try/except statement altogether and just let the exceptions propagate.
Other calls to self.error() should be replaced with suitable raise
statements.

Skip

--
components: Library (Lib)
keywords: easy
messages: 67999
nosy: skip.montanaro
priority: normal
severity: normal
status: open
title: sys.exit() called from optparse - bad, bad, bad
type: behavior
versions: Python 2.5

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2997] PyNumberMethods has left-over fields in Py3

2008-06-11 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

I say let's go with the cleanup.  Extensions that want to be compiled
under 2.x and 3.0 will need lots of #ifdef code anyway.

--
nosy: +gvanrossum

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3079] sys.exit() called from optparse - bad, bad, bad

2008-06-11 Thread Skip Montanaro

Changes by Skip Montanaro <[EMAIL PROTECTED]>:


--
versions: +Python 2.6, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue643841] New class special method lookup change

2008-06-11 Thread Barry A. Warsaw

Barry A. Warsaw <[EMAIL PROTECTED]> added the comment:

Thanks for the pronouncement Guido.  We will not let this issue hold up
the beta releases.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3050] Implement PEP 371: multiprocessing module

2008-06-11 Thread Jesse Noller

Jesse Noller <[EMAIL PROTECTED]> added the comment:

Debian PPC build crash:
http://python.org/dev/buildbot/stable/ppc%20Debian%20unstable%203.0/buil
ds/1063/step-test/0

...snip
Re-running test 'test_multiprocessing' in verbose mode
test test_multiprocessing crashed -- : [Errno 38] 
Function not implemented
Traceback (most recent call last):
  File "./Lib/test/regrtest.py", line 601, in runtest_inner
indirect_test()
  File "/home/pybot/buildarea/3.0.klose-debian-
ppc/build/Lib/test/test_multiprocessing.py", line 1764, in test_main
ProcessesMixin.pool = multiprocessing.Pool(4)
  File "/home/pybot/buildarea/3.0.klose-debian-
ppc/build/Lib/multiprocessing/__init__.py", line 225, in Pool
return Pool(processes, initializer, initargs)
  File "/home/pybot/buildarea/3.0.klose-debian-
ppc/build/Lib/multiprocessing/pool.py", line 84, in __init__
self._setup_queues()
  File "/home/pybot/buildarea/3.0.klose-debian-
ppc/build/Lib/multiprocessing/pool.py", line 131, in _setup_queues
self._inqueue = SimpleQueue()
  File "/home/pybot/buildarea/3.0.klose-debian-
ppc/build/Lib/multiprocessing/queues.py", line 315, in __init__
self._rlock = Lock()
  File "/home/pybot/buildarea/3.0.klose-debian-
ppc/build/Lib/multiprocessing/synchronize.py", line 106, in __init__
SemLock.__init__(self, SEMAPHORE, 1, 1)
  File "/home/pybot/buildarea/3.0.klose-debian-
ppc/build/Lib/multiprocessing/synchronize.py", line 38, in __init__
sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue)
OSError: [Errno 38] Function not implemented
[801671 refs]
make: *** [buildbottest] Error 1
program finished with exit code 2

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2997] PyNumberMethods has left-over fields in Py3

2008-06-11 Thread Barry A. Warsaw

Changes by Barry A. Warsaw <[EMAIL PROTECTED]>:


--
resolution:  -> accepted

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2542] PyErr_ExceptionMatches must not fail

2008-06-11 Thread Barry A. Warsaw

Barry A. Warsaw <[EMAIL PROTECTED]> added the comment:

This is a bug, not a new feature so it's not release critical for the
first alphas.

--
nosy: +barry
priority: release blocker -> critical

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3050] Implement PEP 371: multiprocessing module

2008-06-11 Thread Jesse Noller

Jesse Noller <[EMAIL PROTECTED]> added the comment:

Small diff for the ACKs/NEWS file

Added file: http://bugs.python.org/file10589/news.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2997] PyNumberMethods has left-over fields in Py3

2008-06-11 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


___
Python tracker <[EMAIL PROTECTED]>

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



[issue2997] PyNumberMethods has left-over fields in Py3

2008-06-11 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
assignee:  -> benjamin.peterson
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3080] Full unicode import system

2008-06-11 Thread Amaury Forgeot d'Arc

New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:

This is the most difficult part of issue1342:
"""
On Windows, don't use the FileSystemEncoding on Windows for sys.path items.
Instead, it should use the wide API to perform all system calls. Py3k
shouldn't ever use the file system encoding for anything on Windows.
"""

This imply to rewrite all functions in import.c, and replace all char*
arguments with unicode variables.

--
components: Interpreter Core
messages: 68005
nosy: amaury.forgeotdarc
severity: normal
status: open
title: Full unicode import system
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1342] Crash on Windows if Python runs from a directory with umlauts

2008-06-11 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Fixed as r64126, using Py_FileSystemDefaultEncoding.

I close this issue, and open issue3080 to rewrite all functions in
import.c with full unicode in mind.

--
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1819] Speed hack for function calls with named parameters

2008-06-11 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Here is a new patch against SVN trunk. Nothing changed, except that I
updated pybench to test keyword arguments as well.

Added file: http://bugs.python.org/file10590/namedparam2.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2630] repr() should not escape non-ASCII characters

2008-06-11 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Patch committed to Py3k branch in r64138. Thanks all!

--
resolution:  -> accepted
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1819] Speed hack for function calls with named parameters

2008-06-11 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
assignee: gvanrossum -> georg.brandl
nosy: +georg.brandl

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3081] Py_(X)SETREF macros

2008-06-11 Thread Antoine Pitrou

New submission from Antoine Pitrou <[EMAIL PROTECTED]>:

This is an implementation of the Py_SETREF and Py_XSETREF macros
proposed in http://mail.python.org/pipermail/python-dev/2008-May/079862.html

As an example, I added a few conversions among the extension modules.

--
components: Extension Modules, Interpreter Core
files: py_setref.patch
keywords: patch
messages: 68009
nosy: pitrou
severity: normal
status: open
title: Py_(X)SETREF macros
versions: Python 3.0
Added file: http://bugs.python.org/file10591/py_setref.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3081] Py_(X)SETREF macros

2008-06-11 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

FWIW, I also wanted to propose for Py_INCREF(op) to evaluate as (op), so
that it can be used as return or assignment value, e.g.:
return Py_INCREF(result);
or:
self->var = Py_INCREF(obj);

but it's perhaps a bit more controversial.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3042] Add PEP 8 compliant aliases to threading module

2008-06-11 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Applied in r64125, and r64144.

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3081] Py_(X)SETREF macros

2008-06-11 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
nosy: +benjamin.peterson
type:  -> feature request
versions: +Python 2.6 -Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3081] Py_(X)SETREF macros

2008-06-11 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Benjamin, the patch is against py3k, also it might also apply cleanly on
trunk...

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3081] Py_(X)SETREF macros

2008-06-11 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Sorry for the confusion. It seems to me this sort of thing would be
useful in 2.6, too, so I marked it.

--
versions: +Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2997] PyNumberMethods has left-over fields in Py3

2008-06-11 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Applied in r64149.

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3080] Full unicode import system

2008-06-11 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

I suspect importlib may help with this.

--
nosy: +benjamin.peterson, brett.cannon

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2744] Fix test_cProfile

2008-06-11 Thread Alexandre Vassalotti

Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:

I will try to fix this one with profile/cProfile merge.

--
assignee:  -> alexandre.vassalotti
nosy: +alexandre.vassalotti

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3082] test_multiprocessing broken

2008-06-11 Thread Gregory P. Smith

New submission from Gregory P. Smith <[EMAIL PROTECTED]>:

Python 2.6a3+ (trunk:64150M, Jun 11 2008, 14:08:14)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

% ./python Lib/test/test_multiprocessing.py
Fatal Python error: Invalid thread state for this thread
Traceback (most recent call last):
  File "Lib/test/test_multiprocessing.py", line 1791, in 
main()
  File "Lib/test/test_multiprocessing.py", line 1788, in main
test_main(unittest.TextTestRunner(verbosity=2).run)
  File "Lib/test/test_multiprocessing.py", line 1768, in test_main
ManagerMixin.pool = ManagerMixin.manager.Pool(4)
  File
"/home/greg/sandbox/python/trunk/Lib/multiprocessing/managers.py", line
647, in temp
token, exp = self._create(typeid, *args, **kwds)
  File
"/home/greg/sandbox/python/trunk/Lib/multiprocessing/managers.py", line
545, in _create
conn = self._Client(self._address, authkey=self._authkey)
  File
"/home/greg/sandbox/python/trunk/Lib/multiprocessing/connection.py",
line 139, in Client
answer_challenge(c, authkey)
  File
"/home/greg/sandbox/python/trunk/Lib/multiprocessing/connection.py",
line 380, in answer_challenge
message = connection.recv_bytes(256) # reject large message
EOFError
[50971 refs]


This is on a single cpu i686 linux system.

--
components: Library (Lib)
messages: 68017
nosy: gregory.p.smith
priority: high
severity: normal
status: open
title: test_multiprocessing broken
type: behavior
versions: Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2548] Undetected error in exception handling

2008-06-11 Thread Barry A. Warsaw

Barry A. Warsaw <[EMAIL PROTECTED]> added the comment:

This is a bug that can be fixed after beta, so I'm knocking it back to
critical for beta 1.

--
priority: release blocker -> critical

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3082] test_multiprocessing broken

2008-06-11 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Are you running a debug build? Please see #1683.

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3083] Add alternate (#) formatting for bin, oct, hex output for str.format()

2008-06-11 Thread Eric Smith

New submission from Eric Smith <[EMAIL PROTECTED]>:

Per Guido in
http://mail.python.org/pipermail/python-3000/2008-May/013912.html, add
this to the PEP 3101 (Advanced String Formatting) implementation.

This will add the prefixes 0b, 0o, and 0x.

--
assignee: eric.smith
components: Interpreter Core
messages: 68020
nosy: eric.smith
priority: normal
severity: normal
status: open
title: Add alternate (#) formatting for bin, oct, hex output for str.format()
versions: Python 2.6, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1742669] "%d" format handling for long values

2008-06-11 Thread Pádraig Brady

Pádraig Brady <[EMAIL PROTECTED]> added the comment:

A couple of comments.

1. This bug supersedes issue 1153226
That has good info, including the suggestion that one should
be using the %.f format rather than %d in this case anyway

2. The patch here was actually applied in r61041

--
nosy: +pixelbeat

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3082] test_multiprocessing broken

2008-06-11 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

ah yes that is indeed the same problem.  marking this one as a dup.

--
dependencies: +Thread local storage and PyGILState_* mucked up by os.fork()
resolution:  -> duplicate
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2874] Remove use of the stat module in the stdlib

2008-06-11 Thread Barry A. Warsaw

Barry A. Warsaw <[EMAIL PROTECTED]> added the comment:

Perhaps collections.namedtuple() can be used with a custom subclass?

In any case, it's not worth holding up the first beta for this.  We can
fix it after beta.  Knocking this down to critical.

--
nosy: +barry
priority: release blocker -> critical

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1683] Thread local storage and PyGILState_* mucked up by os.fork()

2008-06-11 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

we need this in before 2.6 is released.

--
assignee:  -> gregory.p.smith
nosy: +gregory.p.smith
priority: high -> critical

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1819] Speed hack for function calls with named parameters

2008-06-11 Thread Marc-Andre Lemburg

Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment:

On 2008-06-11 20:38, Antoine Pitrou wrote:
> Antoine Pitrou <[EMAIL PROTECTED]> added the comment:
> 
> Here is a new patch against SVN trunk. Nothing changed, except that I
> updated pybench to test keyword arguments as well.
> 
> Added file: http://bugs.python.org/file10590/namedparam2.patch

When changing parameters or other aspects of pybench tests, you *have*
to update the version number of the test as well. Otherwise, pybench
would compare apples with oranges.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jun 11 2008)
 >>> Python/Zope Consulting and Support ...http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/

2008-07-07: EuroPython 2008, Vilnius, Lithuania25 days to go

 Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! 

eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611

--
nosy: +lemburg

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1819] Speed hack for function calls with named parameters

2008-06-11 Thread Marc-Andre Lemburg

Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment:

On 2008-06-11 23:27, M.-A. Lemburg wrote:
> On 2008-06-11 20:38, Antoine Pitrou wrote:
>> Antoine Pitrou <[EMAIL PROTECTED]> added the comment:
>>
>> Here is a new patch against SVN trunk. Nothing changed, except that I
>> updated pybench to test keyword arguments as well.
>>
>> Added file: http://bugs.python.org/file10590/namedparam2.patch
> 
> When changing parameters or other aspects of pybench tests, you *have*
> to update the version number of the test as well. Otherwise, pybench
> would compare apples with oranges.

BTW: It would probably be better to add a completely new test
PythonNamedParameterCalls or something along those lines instead
of changing an existing test.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2917] merge pickle and cPickle in 3.0

2008-06-11 Thread Alexandre Vassalotti

Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:

I updated the patch to use the new module framework.

Added file: http://bugs.python.org/file10592/add-cpickle-2.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2918] Merge StringIO/cStringIO in 3.0

2008-06-11 Thread Alexandre Vassalotti

Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:

I updated the patch to use the new module framework.

Added file: http://bugs.python.org/file10593/add-stringio-3.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2912] let platform.uname try harder

2008-06-11 Thread James Thomas

James Thomas <[EMAIL PROTECTED]> added the comment:

Here is the patch (apply to platform.py)

--
keywords: +patch
Added file: http://bugs.python.org/file10594/platform.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3084] sys.exit() called from optparse - bad, bad, bad

2008-06-11 Thread Skip Montanaro

New submission from Skip Montanaro <[EMAIL PROTECTED]>:

This seems like a bug in optparse.OptionParser:

def exit(self, status=0, msg=None):
if msg:
sys.stderr.write(msg)
sys.exit(status)

def error(self, msg):
"""error(msg : string)

Print a usage message incorporating 'msg' to stderr and exit.
If you override this in a subclass, it should not return -- it
should either exit or raise an exception.
"""
self.print_usage(sys.stderr)
self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg))

By default I think it should raise an exception when it encounters an error,
not exit.  Programmers shouldn't be forced to subclass code in the standard
library to get recommended practice.

If you feel this behavior can't be changed in 2.6 it should at least be
corrected in 3.0.

Skip

--
messages: 68030
nosy: skip.montanaro
severity: normal
status: open
title: sys.exit() called from optparse - bad, bad, bad

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1683] Thread local storage and PyGILState_* mucked up by os.fork()

2008-06-11 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Gregory, go ahead and apply and see if can stop the hell in the buildbots.

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

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




  1   2   >