[issue1569356] sys.settrace cause curried parms to show up as attributes

2008-12-06 Thread Georg Brandl

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

Assigning to the 2.4/2.5 RM.

--
assignee: jhylton -> loewis
nosy: +loewis

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4558] with_stdc89

2008-12-06 Thread Georg Brandl

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

Patch looks good.

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



[issue4557] array('c') in python 3.0 produces error, doc says it is ok

2008-12-06 Thread Georg Brandl

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

Thanks, fixed the docs in r67605.

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



[issue4556] cmp() function erroneously noted as gone in "What's New"

2008-12-06 Thread Georg Brandl

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

This can be seen as a reminder for #1717.

I've "fixed" the whatsnew in r67606.

--
assignee: georg.brandl -> gvanrossum
nosy: +gvanrossum
resolution:  -> fixed
status: open -> closed
superseder:  -> Get rid of more refercenes to __cmp__

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-06 Thread Georg Brandl

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

cmp() the function is also still there.

--
priority: high -> critical
resolution: fixed -> 

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4558] with_stdc89

2008-12-06 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

The updated patch moves the compiler option to the right place.

Added file: http://bugs.python.org/file12247/with_stdc89_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



[issue1569356] sys.settrace cause curried parms to show up as attributes

2008-12-06 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

Because of the incompatibility in locals(), this patch cannot be backported.

--
versions: +Python 2.6 -Python 2.4

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4559] Whats new recommendation error

2008-12-06 Thread Lennart Regebro

New submission from Lennart Regebro <[EMAIL PROTECTED]>:

The whatsnew/3.0.rst document claims

"It is not recommended to try to write source code that runs unchanged
under both Python 2.6 and 3.0; you’d have to use a very contorted coding
style, e.g. avoiding print statements, metaclasses, and much more. "

This is no longer true, since 2.6 now has much backwards compatibility,
including fopr print statements and unicode, so it's prefectly possible
and not at all contorted to support both any longer.

I'd recommend that the above statement is changed to "under both Python
2.5 and 3.0" or simply removed.

--
assignee: georg.brandl
components: Documentation
messages: 77108
nosy: georg.brandl, lregebro
severity: normal
status: open
title: Whats new recommendation error
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



[issue4559] Whats new recommendation error

2008-12-06 Thread Raymond Hettinger

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

No thanks.  We need to STRONGLY discourage such efforts.  The official
recommended approach is to run 2.6 with a -3 option to identify code
that cannot be automatically converted and then after making the
appropriate updates to use the 2-to-3 converter.  Trying to bypass that
path is asking for unnecessary pain.

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



[issue4559] Whats new recommendation error

2008-12-06 Thread Lennart Regebro

Lennart Regebro <[EMAIL PROTECTED]> added the comment:

That is not true, and statement as it stands now is still factually
incorrect.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4559] Whats new recommendation error

2008-12-06 Thread Raymond Hettinger

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

Guido, the OP wants you to change your long-standing guidance on the
relationship between 2.6 and 3.0.  Care to pronounce?

--
assignee: georg.brandl -> gvanrossum
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



[issue4560] "Flouted", not "flaunted"

2008-12-06 Thread Jonathan Feinberg

New submission from Jonathan Feinberg <[EMAIL PROTECTED]>:

http://docs.python.org/3.0/whatsnew/3.0.html#library-changes

"Some modules were renamed because their old name flaunted PEP 0008"
should read "Some modules were renamed because their old name flouted
PEP 0008".

--
assignee: georg.brandl
components: Documentation
messages: 77112
nosy: georg.brandl, jdf
severity: normal
status: open
title: "Flouted", not "flaunted"
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



[issue4560] "Flouted", not "flaunted"

2008-12-06 Thread Georg Brandl

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

It's already "disobeyed" in SVN.

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



[issue1163367] correct/clarify documentation for super

2008-12-06 Thread Raymond Hettinger

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

Updated again in r67607.  Hopefully, this one has been put to rest.  If
someone has further issues with the super() docs, please open a new
report (preferably with suggested wording).

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



[issue4488] Python Documentation not Newb Friendly

2008-12-06 Thread Georg Brandl

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

You are quite right. I've given PIPE and STDOUT their own entries now in
r67608.

--
status: pending -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4561] Optimize new io library

2008-12-06 Thread Christian Heimes

New submission from Christian Heimes <[EMAIL PROTECTED]>:

The new io library needs some serious profiling and optimization work.
I've already fixed a severe slowdown in _fileio.FileIO's read buffer
allocation algorithm (#4533).

More profiling tests have shown a speed problem in write() files opened
in text mode. For example three str.count() calls are taking up 20% of
the time. The str.count calls can be replaced with an optimized C
function that returns the count of (\r\n, \n, \r) in one pass instead of
three passes.

--
components: Extension Modules, Library (Lib)
messages: 77116
nosy: christian.heimes
priority: high
severity: normal
stage: test needed
status: open
title: Optimize new io library
type: performance
versions: Python 3.0, Python 3.1

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4561] Optimize new io library

2008-12-06 Thread David M. Beazley

David M. Beazley <[EMAIL PROTECTED]> added the comment:

I've done some profiling and the performance of reading line-by-line is 
considerably worse in Python 3 than in Python 2.  For example, this 
code:

for line in open("somefile.txt"):
pass

Ran 35 times slower in Python 3.0 than Python 2.6 when I tested it on a 
big text file (100 Megabytes).   If you disable Unicode by opening the 
file in binary mode, it runs even slower.

This slowdown is really unacceptable for anyone who uses Python for 
parsing big non-Unicode text files (and I would claim that there are 
many such people).

--
nosy: +beazley

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4561] Optimize new io library

2008-12-06 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

Your issue is most like caused by #4533. Please download the latest svn
version of Python 3.0 (branches/release30_maint) and try again.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4509] possible memoryview bug

2008-12-06 Thread Antoine Pitrou

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

> There may be other places this can happen but I haven't checked yet.

PyByteArray_Resize() is called in various places in bytearrayobject.c,
some of them where it is mandatory to mutate the underlying storage
before reallocating it. The solution would be to have a separate
function to check whether resizing is allowed (but it would not solve
the problem in the face of MemoryErrors).

--
title: bugs in bytearray with exports (buffer protocol) -> possible memoryview 
bug

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4561] Optimize new io library

2008-12-06 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

Here is a patch againt the py3k branch that reduces the time for the
line ending detection from 0.55s to 0.22s for a 50MB file on my test
system.

--
keywords: +patch
Added file: http://bugs.python.org/file12248/count_linenendings.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3206] Multiprocessing Array and sharedctypes.Array error in docs/implementation

2008-12-06 Thread Santiago Gala

Santiago Gala <[EMAIL PROTECTED]> added the comment:

Note that if the error is in the documentation semantics, and not in the
implementation, then the benchmark code in the documentation is also
broken, and should be change to not use lock=True/False respectively...

I'm not sure if the patch here is good or rather lock=True/False should
be the right API and the implementation should be changed along this lines:

diff --git a/Lib/multiprocessing/sharedctypes.py
b/Lib/multiprocessing/sharedctypes.py
index b94cd52..2f68e74 100644
--- a/Lib/multiprocessing/sharedctypes.py
+++ b/Lib/multiprocessing/sharedctypes.py
@@ -79,10 +79,11 @@ def Array(typecode_or_type, size_or_initializer,
**kwds):
 if kwds:
 raise ValueError('unrecognized keyword argument(s): %s' %
list(kwds.keys()))
 obj = RawArray(typecode_or_type, size_or_initializer)
-if lock is None:
+if lock is True:
 lock = RLock()
-assert hasattr(lock, 'acquire')
-return synchronized(obj, lock)
+return synchronized(obj, lock)
+return obj
+
 
 def copy(obj):
 new_obj = _new_value(type(obj))

--
nosy: +sgala

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4483] Error to build _dbm module during make

2008-12-06 Thread Floris Bruynooghe

Floris Bruynooghe <[EMAIL PROTECTED]> added the comment:

Hi, I'd like to confirm that Skip's last patch fixes the issue.  Hope it
gets included soon!

Thanks

--
nosy: +flub

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3206] Multiprocessing Array and sharedctypes.Array error in docs/implementation

2008-12-06 Thread Santiago Gala

Santiago Gala <[EMAIL PROTECTED]> added the comment:

oops, there is a proper code patch in issue4449 , and the documentation
is right.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4561] Optimize new io library

2008-12-06 Thread David M. Beazley

David M. Beazley <[EMAIL PROTECTED]> added the comment:

Tried this using projects/python/branches/release30-maint and using the 
patch that was just attached.   With a 66MB input file, here are the 
results of this code fragment:

for line in open("BIGFILE):
pass

Python 2.6: 0.67s
Python 3.0: 32.687s (48 times slower)

This is running on a MacBook with a warm disk cache. For what it's 
worth, I didn't see any improvement with that patch.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4561] Optimize new io library

2008-12-06 Thread David M. Beazley

David M. Beazley <[EMAIL PROTECTED]> added the comment:

Just as one other followup, if you change the code in the last example 
to use binary mode like this:

for line in open("BIG","rb"):
pass

You get the following results:

Python 2.6:  0.64s
Python 3.0:  42.26s   (66 times slower)

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4562] zip() documentation was not updated

2008-12-06 Thread Mariano M. Chouza

New submission from Mariano M. Chouza <[EMAIL PROTECTED]>:

zip() function documentatio still shows the old behavior of the
function, returning a list.

http://docs.python.org/3.0/library/functions.html?highlight=zip#zip

--
assignee: georg.brandl
components: Documentation
messages: 77126
nosy: georg.brandl, mchouza
severity: normal
status: open
title: zip() documentation was not updated
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



[issue4562] zip() documentation was not updated

2008-12-06 Thread Georg Brandl

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

Fixed in r67609.

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



[issue4563] Wrong formatting of contributor list in About page

2008-12-06 Thread Ori Avtalion

New submission from Ori Avtalion <[EMAIL PROTECTED]>:

The bulleted list of credits in the about page is turning people's
initials into numbering.

For example:
   * A. Amoroso
   * L. Peter Deutsch
appear as 
   * 1. Amoroso
   * 12. Peter Deutsch



--
assignee: georg.brandl
components: Documentation
messages: 77128
nosy: georg.brandl, salty-horse
severity: normal
status: open
title: Wrong formatting of contributor list in About page
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



[issue4561] Optimize new io library

2008-12-06 Thread Georg Brandl

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

David, the reading bug fix/optimization is not (yet?) on
release30-maint, only on branches/py3k.

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



[issue4564] bytearray.fromhex doesn't respect bytearray subclass

2008-12-06 Thread Antoine Pitrou

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

The following code says it all:

>>> class B(bytearray): pass
... 
>>> b = B.fromhex("0c0a")
>>> b
bytearray(b'\x0c\n')
>>> isinstance(b, B)
False

--
messages: 77130
nosy: pitrou
priority: normal
severity: normal
status: open
title: bytearray.fromhex doesn't respect bytearray subclass
type: behavior
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



[issue4561] Optimize new io library

2008-12-06 Thread David M. Beazley

David M. Beazley <[EMAIL PROTECTED]> added the comment:

Just checked it with branches/py3k and the performance is the same.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3439] create a numbits() method for int and long types

2008-12-06 Thread Mark Dickinson

Changes by Mark Dickinson <[EMAIL PROTECTED]>:


--
assignee:  -> marketdickinson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4565] io write() performance very slow

2008-12-06 Thread Istvan Albert

New submission from Istvan Albert <[EMAIL PROTECTED]>:

The write performance into text files is substantially slower (5x-8x)
than that of python 2.5. This makes python 3.0 unsuited to any
application that needs to write larger amounts of data.

test code follows ---

import time

lo, hi, step = 10**5, 10**6, 10**5

# writes increasingly more lines to a file
for N in range(lo, hi, step):
fp = open('foodata.txt', 'wt')
start = time.time()
for i in range( N ):
fp.write( '%s\n' % i)
fp.close()
stop = time.time()
print ( "%s\t%s" % (N, stop-start) )

--
components: Interpreter Core
messages: 77132
nosy: ialbert
severity: normal
status: open
title: io write() performance very slow
type: performance
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



[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2008-12-06 Thread Craig Holmquist

New submission from Craig Holmquist <[EMAIL PROTECTED]>:

Applications on Windows that don't link to the MSVCR90.DLL via a
manifest are broken with Python 2.6.1.  This includes apps that link
with the C library statically and apps that link with other versions of
it.  These applications worked fine with Python 2.6.

To test this, I created a simple application that did nothing but call
Py_Main (compiled with VS2008).  When that app links with the C library
statically, attempting to import the socket module gives this error:

Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Python26\lib\socket.py", line 46, in 
import _socket
ImportError: DLL load failed: The specified module could not be found.

When that app links with the C library dynamically, it works properly.

In particular, this issue breaks mod_python.  From the Apache error log:

[Sat Dec 06 00:49:21 2008] [error] make_obcallback: could not import
mod_python.apache.\n
Traceback (most recent call last):
  File "C:\Python26\lib\site-packages\mod_python\apache.py", line 29, in

import cgi
  File "C:\Python26\Lib\cgi.py", line 40, in 
import urllib
  File "C:\Python26\Lib\urllib.py", line 26, in 
import socket
  File "C:\Python26\lib\socket.py", line 46, in 
import _socket
ImportError: DLL load failed: A dynamic link library (DLL)
initialization routine failed.

I'm guessing this is a side-effect of the fix for #4120.  Since modules
like _socket.pyd don't have manifests that tell Windows where to find
the side-by-side assembly to load, and the application loading
_socket.pyd doesn't have it in its manifest either, Windows has no clue
where to find MSVCR90.dll.

Something I discovered (by accident) is that, if there's an external
manifest in the same folder as the hosting application (ie,
testpy.exe.manifest) that points to the C runtime, it fixes the problem,
even if the host app links statically to the C runtime.  I don't recall
off-hand whether these external manifests take precedence over the
internal ones, but in this case it seems to provide enough information
to Windows that it can resolve the dependency.

--
components: Windows
messages: 77133
nosy: craigh
severity: normal
status: open
title: 2.6.1 breaks many applications that embed Python on Windows
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



[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2008-12-06 Thread Craig Holmquist

Changes by Craig Holmquist <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file12249/testpy.c

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4199] add shorthand global and nonlocal statements

2008-12-06 Thread Amaury Forgeot d'Arc

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

- the add_ast_fields() function seems to be added by this patch, but it 
is already in svn.

- Are 1-tuple supported?

t = [1]
global a, = t

--
nosy: +amaury.forgeotdarc

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4509] possible memoryview bug

2008-12-06 Thread Antoine Pitrou

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

New bytearray patch at http://codereview.appspot.com/10049. I think I've
covered all bases. array.array will need another patch (I must admit I
care a bit less about it, since it's not a builtin type).

The patch will have to be backported for 2.6/2.7 as well, but memoryview
doesn't exist there, so the tests will have to be disabled.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2008-12-06 Thread Craig Holmquist

Craig Holmquist <[EMAIL PROTECTED]> added the comment:

I've attached the test program I was using.  The commands I used to
compile it are:

cl /MT /c /IC:\Python26\include testpy.c
link /LIBPATH:C:\Python26\libs testpy.obj

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4445] String allocations waste 3 bytes of memory on average.

2008-12-06 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

Applied to py3k in r67610.

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



[issue4565] io write() performance very slow

2008-12-06 Thread Amaury Forgeot d'Arc

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

This is expected: the I/O stack has been completely rewritten... in 
almost pure-python code.

There is a project to rewrite it in C. It started at
http://svn.python.org/view/sandbox/trunk/io-c/

--
assignee:  -> amaury.forgeotdarc
nosy: +amaury.forgeotdarc
priority:  -> high

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4564] bytearray.fromhex doesn't respect bytearray subclass

2008-12-06 Thread Amaury Forgeot d'Arc

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

The same kind of request has been rejected several times: issue2267, 
issue1562.

The explanation given is here:
http://mail.python.org/pipermail/python-list/2005-January/300791.html
"""a base class has no idea what requirements may exist for invoking a 
subclass's constructor"""

--
nosy: +amaury.forgeotdarc
resolution:  -> wont fix
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



[issue4506] 3.0 make test failures on Solaris 10

2008-12-06 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

The segfault is a little worrying;  I don't understand that at all.

Skip, can you come up with a configure patch that would allow isinf to be 
detected on Solaris?

I'll also patch Py_IS_INFINITY to make sure that it forces its argument 
into memory before testing it;  this *should* fix the problem on platforms 
that don't have isinf.  (Note to self:  first find out whether 
Py_IS_INFINITY is ever applied to single precision floats, or whether we 
can assume the argument is always a double.)

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4558] with_stdc89

2008-12-06 Thread Roumen Petrov

Roumen Petrov <[EMAIL PROTECTED]> added the comment:

There is no reason to overload configure script.

Please look into pyport.h :
#define Py_LOCAL(type) static type
#define Py_LOCAL_INLINE(type) static inline type

Someone add USE_INLINE - not finished.
I guess that other source files has to use macros from one
header(pyport.h) instead every C-file to resolve issue independently.

--
nosy: +rpetrov

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2008-12-06 Thread Craig Holmquist

Craig Holmquist <[EMAIL PROTECTED]> added the comment:

I've attached a manifest file that references the C runtime; adding this
file to the Apache bin folder seems to workaround this issue.

Added file: http://bugs.python.org/file12250/httpd.exe.manifest

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-06 Thread Guido van Rossum

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

Bah. That means we'll have to start deprecating cmp() in 3.1, and won't
be able to remove it until 3.2 or 3.3. :-)

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4558] with_stdc89

2008-12-06 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

I think you don't get the point of the patch. The configure option
*enforces* the C89 standard. Every non C89 conform C feature like //
comments and the "inline" keyword will cause a compiler error.

The patch is meant for testing the Python code on the build bots.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4561] Optimize new io library

2008-12-06 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

What's your OS, David? Please post the output of "uname -r" and ./python
-c "import sys; print(sys.version)"

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4558] with_stdc89

2008-12-06 Thread Roumen Petrov

Roumen Petrov <[EMAIL PROTECTED]> added the comment:

Christian did you like to propose a separate configure flag for every
dialect that GCC support? I prefer variables like OPT.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3167] math test fails on Solaris 10

2008-12-06 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

Skip, Jean:

Could you try the attached patch to see if it fixes the math.log and 
math.log10 test failures.  (The patch is generated against the trunk, but 
should apply cleanly to py3k or either of the 2.6 or 3.0 maintenance 
branches.

Added file: http://bugs.python.org/file12251/math_log.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4558] with_stdc89

2008-12-06 Thread Roumen Petrov

Roumen Petrov <[EMAIL PROTECTED]> added the comment:

P.S. About C++ comments ( // ) I think that another issue is already
opened (problem on AIX ? ) .

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4558] with_stdc89

2008-12-06 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

Python core code must be compliant with the C89 standard but we don't
have any checks for C89 compatibility. This patch adds a clean way to
check our code base.

You can verify my patch by adding a // comment somewhere in the code and
./configure --with-stdc89 && make.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3682] test_math: math.log(-ninf) fails to raise exception on OpenBSD

2008-12-06 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

Damien, if you're still there:

Please could you try the patch "math_log.patch" attached to issue 3167, 
and let me know whether it fixes the test failure?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1597850] Cross compiling patches for MINGW

2008-12-06 Thread n03702

n03702 <[EMAIL PROTECTED]> added the comment:

There is port of cross-2.6-0.7.diff patch for python 3.0 final

--
nosy: +n03702
Added file: http://bugs.python.org/file12252/cross-3.0-0.7.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3167] math test fails on Solaris 10

2008-12-06 Thread Skip Montanaro

Skip Montanaro <[EMAIL PROTECTED]> added the comment:

Mark> Could you try the attached patch to see if it fixes the math.log
Mark> and math.log10 test failures.  (The patch is generated against the
Mark> trunk, but should apply cleanly to py3k or either of the 2.6 or
Mark> 3.0 maintenance branches.

Seems to work on Sol10 for me:

% ./python Lib/test/regrtest.py -v test_math 
test_math
testAcos (test.test_math.MathTests) ... ok
testAcosh (test.test_math.MathTests) ... ok
testAsin (test.test_math.MathTests) ... ok
testAsinh (test.test_math.MathTests) ... ok
testAtan (test.test_math.MathTests) ... ok
testAtan2 (test.test_math.MathTests) ... ok
testAtanh (test.test_math.MathTests) ... ok
testCeil (test.test_math.MathTests) ... ok
testConstants (test.test_math.MathTests) ... ok
testCopysign (test.test_math.MathTests) ... ok
testCos (test.test_math.MathTests) ... ok
testCosh (test.test_math.MathTests) ... ok
testDegrees (test.test_math.MathTests) ... ok
testExp (test.test_math.MathTests) ... ok
testFabs (test.test_math.MathTests) ... ok
testFactorial (test.test_math.MathTests) ... ok
testFloor (test.test_math.MathTests) ... ok
testFmod (test.test_math.MathTests) ... ok
testFrexp (test.test_math.MathTests) ... ok
testFsum (test.test_math.MathTests) ... ok
testHypot (test.test_math.MathTests) ... ok
testIsinf (test.test_math.MathTests) ... ok
testIsnan (test.test_math.MathTests) ... ok
testLdexp (test.test_math.MathTests) ... ok
testLog (test.test_math.MathTests) ... ok
testLog10 (test.test_math.MathTests) ... ok
testLog1p (test.test_math.MathTests) ... ok
testModf (test.test_math.MathTests) ... ok
testPow (test.test_math.MathTests) ... ok
testRadians (test.test_math.MathTests) ... ok
testSin (test.test_math.MathTests) ... ok
testSinh (test.test_math.MathTests) ... ok
testSqrt (test.test_math.MathTests) ... ok
testTan (test.test_math.MathTests) ... ok
testTanh (test.test_math.MathTests) ... ok
test_exceptions (test.test_math.MathTests) ... ok
test_testfile (test.test_math.MathTests) ... ok
test_trunc (test.test_math.MathTests) ... ok
Doctest: ieee754.txt ... ok

--
Ran 39 tests in 0.237s

OK
1 test OK.

Skip

___
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-12-06 Thread Benoit Boissinot

Benoit Boissinot <[EMAIL PROTECTED]> added the comment:

> Why does it need to be in 2.6? mimetools is still there.

Because it outputs a warning with python2.6 -3, it's annoying for people
trying to port their application to python3k

--
nosy: +bboissin

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4483] Error to build _dbm module during make

2008-12-06 Thread Skip Montanaro

Skip Montanaro <[EMAIL PROTECTED]> added the comment:

Fix checked in for py3k (r67612), release26-maint (r67613),
release30-maint (r67615) branches as well as trunk (r67614).

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



[issue4567] Registry key not set if unattended installation used

2008-12-06 Thread Stuart Axon

New submission from Stuart Axon <[EMAIL PROTECTED]>:

If the msi is installed with /quiet it installs to the default location,
but the registry key is not set, making it harder for other programs to
find the installation.

 - in my case I had to make a batch file that installed it, then read
the log file to find this information, which is less than ideal.

--
components: Installation
messages: 77155
nosy: stuaxo
severity: normal
status: open
title: Registry key not set if unattended installation used
type: behavior
versions: Python 2.5.3

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4558] with_stdc89

2008-12-06 Thread Roumen Petrov

Roumen Petrov <[EMAIL PROTECTED]> added the comment:

make EXTRA_CFLAGS='-std=c89' works for me.

Added file: http://bugs.python.org/file12253/python-trunk-20081206-c89.patch

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4558>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4559] Whats new recommendation error

2008-12-06 Thread Guido van Rossum

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

It is true for 2.6 unless you use various from __future__ imports, which
I consider a form of contortion.

Even with 2.6 I don't see how you can specify a metaclass without doing
something weird like

  foo = MyMetaclass('foo', bases_tuple, namespace_dict)

which is hardly an improvement over either the 2.x or 3.0 syntax.

Given that it will always be true for 2.5, I don't want to back down.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4565] io write() performance very slow

2008-12-06 Thread Istvan Albert

Istvan Albert <[EMAIL PROTECTED]> added the comment:

Well I would strongly dispute that anyone other than the developers
expected this. The release documentation states:

"The net result of the 3.0 generalizations is that Python 3.0 runs the
pystone benchmark around 10% slower than Python 2.5."

There is no indication of an order of magnitudes in read/write slowdown.
I believe that this issue is extremely serious! IO is an essential part
of a program, and today we live in the world of gigabytes of data. I am
reading reports of even more severe io slowdowns than what I saw:

http://bugs.python.org/issue4561

Java has had a hard time getting rid of the "it is very slow" stigma
even after getting a JIT compiler, so there is a danger there for a
lasting negative impression.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4199] add shorthand global and nonlocal statements

2008-12-06 Thread Benjamin Peterson

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

I think I may have been merging add_ast_fields when I wrote the patch.

Here's a new patch that handles "global x, = (5,)". To do it, I added a
new flag* to the Global and Nonlocal AST objects that indicates whether
the value needs to be unpacked or not.

* The flag is an int. The bool AST type was removed in py3k.

Added file: http://bugs.python.org/file12254/global_nonlocal_shorthand2.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4084] Decimal.max(NaN, x) gives incorrect results when x is finite and long

2008-12-06 Thread Mark Dickinson

Changes by Mark Dickinson <[EMAIL PROTECTED]>:


--
versions: +Python 3.1

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4561] Optimize new io library

2008-12-06 Thread David M. Beazley

David M. Beazley <[EMAIL PROTECTED]> added the comment:

bash-3.2$ uname -a
Darwin david-beazleys-macbook.local 9.5.1 Darwin Kernel Version 9.5.1: Fri 
Sep 19 16:19:24 PDT 2008; root:xnu-1228.8.30~1/RELEASE_I386 i386
bash-3.2$ ./python.exe -c "import sys; print(sys.version)"
3.1a0 (py3k:67609, Dec  6 2008, 08:47:06) 
[GCC 4.0.1 (Apple Inc. build 5465)]
bash-3.2$

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4559] Whats new recommendation error

2008-12-06 Thread Lennart Regebro

Lennart Regebro <[EMAIL PROTECTED]> added the comment:

A future import is not much of a contortion, and metaclasses is not
exactly an everyday occurrence, after 9 years of python I have yet to
write a metaclass...

Of course I don't like that it specifically mentiones 2.6, while 2.6 has
lot's of forwards compatibility just to make it possible to write code
that runs under both. It will always be true for 2.5, and then we could
fix the issue by changing 2.6 to 2.5. 

If you want to keep the statement for 2.6, it could possibly be
reformulated less strongly, or as a minimum change come up with another
example than something that actually has a forward compatibility in 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



[issue4506] 3.0 make test failures on Solaris 10

2008-12-06 Thread Skip Montanaro

Skip Montanaro <[EMAIL PROTECTED]> added the comment:

> can you come up with a configure patch that would allow isinf to be
> detected on Solaris?

The plot thickens.  I know squat about autoconf sorts of things so I
asked on the autoconf mailing list.  Eric Drake responded (in part):

  The Python ACHECK_FUNCS test should be rewritten (with proper m4
  quoting) as:

  AC_CHECK_FUNCS([acosh asinh atanh expm1 finite log1p])
  AC_CHECK_DECLS([isinf, isnan], [], [], [[#include ]])

so I gave that a whirl.  Whaddya know?  isinf *really* isn't available,
at least not until C99 apparently.  The AC_CHECK_DECLS macro generates
a conftest.c which looks like this:

  #include  
 
  int 
  main () 
  { 
  #ifndef isinf 
(void) isinf; 
  #endif 
 
; 
return 0; 
  } 

which fails to compile/link on our Sol10 boxes.  Turns out libm.so
doesn't export an _isinf symbol.  The macro I found (in iso/math_c99.h)
doesn't expand in gcc -E output of the above code, so in my non-c99
environment I don't get to use isinf.  Looks like your Py_IS_INFINITY
fix will be necessary.  Eric also suggested using the gnu isinf and
isnan modules:

  http://git.savannah.gnu.org/gitweb/?
p=gnulib.git;a=blob;f=m4/isinf.m4;h=1b9e45a;hb=67461c3

I'll leave that for you to decide.

In any case, the above changes to AC_CHECK_FUNCS should probably be
made.

Skip

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4559] Whats new recommendation error

2008-12-06 Thread Guido van Rossum

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

You're misrepresenting or misunderstanding the goal of 2.6.  Its goal
isn't to make it easy to write code that runs under both.  Its stated
goal is to make it easy to write code that can easily be *ported* to
3.0.  That's a very different story.

I will not be taking it back.

If you want further discussion on this, open a thread on python-dev.

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



[issue4559] Whats new recommendation error

2008-12-06 Thread Lennart Regebro

Lennart Regebro <[EMAIL PROTECTED]> added the comment:

I've never said that is the goal. You are misrepresenting or
misinterpreting my standpoint.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4559] Whats new recommendation error

2008-12-06 Thread Guido van Rossum

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

Then what did you mean by "just to make it possible to write code
that runs under both" ?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4559] Whats new recommendation error

2008-12-06 Thread Lennart Regebro

Lennart Regebro <[EMAIL PROTECTED]> added the comment:

Well, that *is* the intention of a from __future__ import, isn't it?
That doesn't mean that's the intention of 2.6 as a whole, just that
statement.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4559] Whats new recommendation error

2008-12-06 Thread Guido van Rossum

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

But that's all part of the "make it easy to port" strategy.

I stick to my claim that trying to write code that runs unchanged in 3.0
is a non-goal of Python 2.6, and I do not want to suggest that this is a
good idea in the official documentation.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4483] Error to build _dbm module during make

2008-12-06 Thread Roumen Petrov

Roumen Petrov <[EMAIL PROTECTED]> added the comment:

now 2008-12-06 trunk fail on linux

--
nosy: +rpetrov
versions: +Python 2.7

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4483] Error to build _dbm module during make

2008-12-06 Thread Roumen Petrov

Roumen Petrov <[EMAIL PROTECTED]> added the comment:

may be patch is not applied correctly :
http://svn.python.org/view/python/trunk/setup.py?rev=67614&view=auto

libraries = gdbm_libs ) )
?   exts.append( Extension('dbm', ['dbmmodule.c'],
? define_macros=[('HAVE_GDBM_NDBM_H',None)],
? libraries = ['gdbm'] ) )
  elif db_incs is not None:

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4565] io write() performance very slow

2008-12-06 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' <[EMAIL PROTECTED]>:


--
nosy: +giampaolo.rodola

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4561] Optimize new io library

2008-12-06 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' <[EMAIL PROTECTED]>:


--
nosy: +giampaolo.rodola

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4528] test_httpservers consistently fails on OS X

2008-12-06 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' <[EMAIL PROTECTED]>:


--
nosy: +giampaolo.rodola

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4561] Optimize new io library

2008-12-06 Thread Antoine Pitrou

Changes by Antoine Pitrou <[EMAIL PROTECTED]>:


--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4565] io write() performance very slow

2008-12-06 Thread Antoine Pitrou

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

Hi Amaury,

> There is a project to rewrite it in C

Thanks for publicizing this. I'm a bit surprised by the adopted
approach. It seems you are merely translating the Python code into C. I
think the proper approach for the buffered IO classes would be to use a
fixed-size buffer which never gets reallocated.

If you look at bufferedwriter2.patch in #3476, I had rewritten
BufferedWriter using a fixed-size buffer (although not for performance
reasons), I think it would be a good starting point for a C implementation.

--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4565] io write() performance very slow

2008-12-06 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

For more bug reports see #4533 and #4561.

I suggest we close this bug report as duplicate and keep the discussion
in #4561.

--
nosy: +christian.heimes

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4561] Optimize new io library

2008-12-06 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

I've updated the patch with proper formatting, some minor cleanups and a
unit test.

Added file: http://bugs.python.org/file12255/count_linenendings2.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4561] Optimize new io library

2008-12-06 Thread Christian Heimes

Changes by Christian Heimes <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file12248/count_linenendings.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-06 Thread Georg Brandl

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

I hope the smiley really indicates a joke...

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-06 Thread Guido van Rossum

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

Well what would you suggest we do?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-06 Thread Georg Brandl

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

I'd release 3.0.1 quickly, maybe also with the in-development
improvements to the io library that alleviate the factor-1000 slowdowns.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4561] Optimize new io library

2008-12-06 Thread Antoine Pitrou

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

I don't think this is a public API, so the function should probably be
renamed _count_lineendings.
Also, are there some benchmark numbers?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4561] Optimize new io library

2008-12-06 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

I'll come up with some reading benchmarks tomorrow. For now here is a
benchmark of write(). You can clearly see the excessive usage of closed,
len() and isinstance().

Added file: http://bugs.python.org/file12256/test_write.log

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4561] Optimize new io library

2008-12-06 Thread Christian Heimes

Changes by Christian Heimes <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file12256/test_write.log

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4561] Optimize new io library

2008-12-06 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

Roundup doesn't display .log files as plain text files.

Added file: http://bugs.python.org/file12257/test_write.txt

___
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-12-06 Thread Brett Cannon

Brett Cannon <[EMAIL PROTECTED]> added the comment:

Benoit has a good point, so I have opened this issue again so we can get
2.7 even closer to 3.x compatibility.

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



[issue4565] io write() performance very slow

2008-12-06 Thread Amaury Forgeot d'Arc

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

> I'm a bit surprised by the adopted approach. 
> It seems you are merely translating the Python code into C. 
> I think the proper approach for the buffered IO classes would be 
> to use a fixed-size buffer which never gets reallocated.

You are certainly right, but the code io.py is already difficult to understand 
and 
maintain; the corresponding C code adds one level of complexity;
had I changed the buffering strategy at the same time, it would have been 
impossible 
to ensure a correct implementation.
Now that my C implementation of the Buffered classes seems correct (all tests 
pass, 
except a few about destructors) we could try alternative approaches.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-06 Thread Raymond Hettinger

Changes by Raymond Hettinger <[EMAIL PROTECTED]>:


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



[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2008-12-06 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

I would claim that this is not a bug. There is simpler no other way to
deal with this entire SxS mess.

--
nosy: +loewis

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-06 Thread Raymond Hettinger

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

Since cmp() was documented as removed in whatsnew3.0, it may be fair
game to complete the removal, treating it as a bugfix.  

If as Georg suggests it is done *very* quickly in 3.0.1 (say in the next
week or so), it is likely harmless and better than living with a
half-removed feature for the next three years.  Also, Georg intimated,
we will likely need to do 3.0.1 almost immediately anyway (the current
state of affairs with IO borders on the unusable.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2008-12-06 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

A mess it is :/

--
nosy: +christian.heimes

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-06 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

A quick ballot on #python-dev resulted in 3 of 3 votes for removing
cmp() in a quick bug fix release.

About the io misery: 
My quick fix for the buffer reallocation schema has made the situation a
bit better. For the 3.0.x series I like to discuss if we shouldo declare
critical performance fixes as bug fixes and not as new features.

--
nosy: +christian.heimes

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4568] Improved optparse "varargs" callback example

2008-12-06 Thread Gregg Lind

New submission from Gregg Lind <[EMAIL PROTECTED]>:

In the trunk (r67617) documentation for *optparse* callback example 6
doesn't handle negative number arguments, and fixing it is "left as an
exercise for the reader."  Well, I'm a reader, and I've attached my stab
at it.  Caveat: It relies in trying to coerce the argument into a
float... maybe there's a cleaner way to do it?

(This is my first patch, so I apologize if I've fouled it up in some
way, particularly in the headers of the patch format.)

--
assignee: georg.brandl
components: Documentation
files: better_optparse_varargs_example.diff
keywords: patch
messages: 77185
nosy: georg.brandl, gregg.lind
severity: normal
status: open
title: Improved optparse "varargs" callback example
Added file: 
http://bugs.python.org/file12258/better_optparse_varargs_example.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4509] possible memoryview bug

2008-12-06 Thread gumpy

gumpy <[EMAIL PROTECTED]> added the comment:

It turns out the problems in array are more serious than I thought and
allow writing to unallocated memory through a memoryview leading to
memory corruption, segfaults and possibly exploits. The following
example extends an array enough to trigger a realloc of the array's buffer.

Python 3.0 (r30:67503, Dec  4 2008, 13:30:57) 
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from array import array
>>> a = array('i', range(16))
>>> m = memoryview(a)
>>> a.extend(array('i', range(48))
... )
>>> m[:] = array('i', [0] * (len(m) // m.itemsize))
*** glibc detected *** python3.0: corrupted double-linked list:
0x0822c1f8 ***

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-06 Thread Guido van Rossum

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

OK, remove it in 3.0.1, provided that's released this year.

Performance fixes are always fair game for bugfix releases.

Please don't "fix" the what's new document (or undo the fix).

I do hope cmp() was already undocumented elsewhere.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4567] Registry key not set if unattended installation used

2008-12-06 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

Can you please be more explicit? What exact command line have you been
using, and what exact registry do you think should have been set but wasn't?

--
nosy: +loewis

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-12-06 Thread Barry A. Warsaw

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


--
priority: deferred blocker -> 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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-06 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



  1   2   >