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

2009-01-02 Thread Mark Hammond

Mark Hammond mhamm...@users.sourceforge.net added the comment:

I've hacked together something that fixes the problem.  I'm working on
making it a real patch, but the basis is:

* In DllMain (dl_nt.c), we call:
  case DLL_PROCESS_ATTACH:
GetCurrentActCtx(PyWin_DLLhActivationContext);
AddRefActCtx(PyWin_DLLhActivationContext);
  case DLL_PROCESS_DETACH:
ReleaseActCtx(PyWin_DLLhActivationContext);

  (where PyWin_DLLhActivationContext is a module level HANDLE global)

* The LoadLibraryEx (in dynload_win.c) changes to:

ActivateActCtx(PyWin_DLLhActivationContext, cookie);
/* XXX This call doesn't exist in Windows CE */
hDLL = LoadLibraryEx(... as currently ...);
DeactivateActCtx(0, cookie);

This makes the import socket test case work for me.  I'm not sure what
the impact will be should the .pyd file reference other assemblies. 
Also, the calls above all need to move to function pointer calls as the
functions only exist on Vista and later (hence the slight delay in
making a real patch)

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-01-02 Thread Amaury Forgeot d'Arc

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

But then you get a nasty pop-up window on code like this:

 fd = os.open(foo, 0)
 os.close(fd)
 os.close(fd)

Instead of a gentle OSError: [Errno 9] Bad file descriptor

--
nosy: +amaury.forgeotdarc

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-01-02 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

Yes, this is the biggest reason why this is required.
This, and and os.closerange().
I have browsed the CRT source and I find no way to determine if a fd is 
actually valid, before calling any of the functions that check for it.
Reintroducing the assertion will prevent a debug build python from passing the 
testsuite.
Much as I think this is useful (turning on the crt tests helped me find a 
couple of python bugs recently) it unfortunately needs to be off because of 
os.close().  All other troublesome cases (strftime(), open()) have workarounds.

Kristján

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-01-02 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

Btw,
It occurred to me that a more gentle way to do this is to disable the 
functionality only around close().
This is far less intrusive, for example, in an embedded environment.
I must confess that I had completely forgototten about the disabling of the 
assertion and only stumbled on this recently when I was trying to find out why 
none of my _ASSERTS in eve worked!  Making wholesale CRT settings certainly 
should be avoided.

So, as I said, we could very well avoid this by just wrapping a few instances 
of close() with a CrtSetErrorHandler calls and friends.  With the caveat that 
these are not threadsafe, that is, it is a process global setting for the CRT.  
But toggling it during a limited scope surely is less intrusive than modifying 
it for the entire process permanently.

Kristján

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-01-02 Thread Mark Hammond

Mark Hammond mhamm...@users.sourceforge.net added the comment:

It would be interesting to know which tests actually fail.  If the tests
are explicitly checking a bad fd, then IMO it makes more sense for that
test to simply be avoided in debug builds and nothing of value would be
left untested.  OTOH, I'd also be happy with just disabling them around
the 2 functions known to cause issues - anything other than leaving
assertions globally disabled for the process!

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-01-02 Thread Mark Hammond

Mark Hammond mhamm...@users.sourceforge.net added the comment:

I guess another option is to expose it via msvcrt and let the test
themselves disable it?

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



[issue4738] Patch to make zlib-objects better support threads

2009-01-02 Thread ebfe

Changes by ebfe knabberknusperh...@yahoo.de:


Removed file: http://bugs.python.org/file12466/zlib_threads-2.diff

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



[issue4738] Patch to make zlib-objects better support threads

2009-01-02 Thread ebfe

ebfe knabberknusperh...@yahoo.de added the comment:

Here is a small test-script with concurrent access to a single
compressosbj. The original patch will immediately deadlock.

The patch attached releases the GIL before trying to get the zlib-lock.
This allows the other thread to release the zlib-lock but comes at the
cost of one additional GIL lock/unlock.

Added file: http://bugs.python.org/file12531/zlib_threads-3.diff

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



[issue4738] Patch to make zlib-objects better support threads

2009-01-02 Thread ebfe

ebfe knabberknusperh...@yahoo.de added the comment:

test-script

Added file: http://bugs.python.org/file12532/zlibtest2.py

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



[issue4751] Patch for better thread support in hashlib

2009-01-02 Thread ebfe

ebfe knabberknusperh...@yahoo.de added the comment:

Releasing the GIL is somewhat expensive and should be avoided if
possible. I've moved LEAVE_HASHLIB in EVP_update so the object gets
unlocked before we call Py_END_ALLOW_THREADS. This is *only* possible
because EVP_update does not use the object beyond those lines.

Here is a new patch and a small test-script.

Added file: http://bugs.python.org/file12533/hashopenssl_threads-4.diff

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



[issue4751] Patch for better thread support in hashlib

2009-01-02 Thread ebfe

ebfe knabberknusperh...@yahoo.de added the comment:

test-script

Added file: http://bugs.python.org/file12534/hashlibtest2.py

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



[issue4751] Patch for better thread support in hashlib

2009-01-02 Thread ebfe

Changes by ebfe knabberknusperh...@yahoo.de:


Removed file: http://bugs.python.org/file12461/hashopenssl_threads-3.diff

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



[issue4751] Patch for better thread support in hashlib

2009-01-02 Thread ebfe

ebfe knabberknusperh...@yahoo.de added the comment:

gnarf, actually it should be 'threads.append(Hasher(md))' in the script :-\

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



[issue4472] Is shared lib building broken on trunk for Mac OS X?

2009-01-02 Thread Ronald Oussoren

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

LDLIBRARY is indeed a good variable to use. 

I've applied issue447-v2.patch in r68146. Backported to 2.6.x in r68147.

Added file: http://bugs.python.org/file12535/issue4472-v2.patch

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



[issue4472] Is shared lib building broken on trunk for Mac OS X?

2009-01-02 Thread Ronald Oussoren

Changes by Ronald Oussoren ronaldousso...@mac.com:


--
resolution: accepted - fixed
status: open - pending

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



[issue4780] Makefile.pre.in patch to run regen on OSX (framework build)

2009-01-02 Thread Ronald Oussoren

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

I've ported the fix to the trunk in r68149

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

2009-01-02 Thread Mark Hammond

Mark Hammond mhamm...@users.sourceforge.net added the comment:

Attaching a patch which works for me against python 2.6.  Only ever
tested on Vista (ie, where the function pointers etc all load)

--
keywords: +needs review, patch
Added file: http://bugs.python.org/file12536/bug4566.patch

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

2009-01-02 Thread Mark Hammond

Changes by Mark Hammond mhamm...@users.sourceforge.net:


Removed file: http://bugs.python.org/file12536/bug4566.patch

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

2009-01-02 Thread Mark Hammond

Mark Hammond mhamm...@users.sourceforge.net added the comment:

Attaching a new patch with some typos in the comments corrected.  While
I'm here, I also meant to mention (again!):

* No need to remove the the assembly from the sxs cache - the test
fails correctly with VS2009 installed.  FWIW, I compiled test.c from
the command line with:
  % cl /I {pypath}\include /I {pypath}\PC /DDEBUG /D_DEBUG /MTd test.c
/LINK {pypath}\pcbuild\python26_d.lib

* It appears the sxscache and the gac are indeed different things,
although at least one MS page refers to the sxscache as the native
assembly cache wink/sigh

Added file: http://bugs.python.org/file12537/bug4566.patch

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-01-02 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

Ok, I'll prepare a patch to the trunk.  I've had some experience with this and 
should have the code lying around somewhere.  I'll let you know once I´ve 
created an issue.
K

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



[issue4796] Decimal to receive from_float method

2009-01-02 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

 Accordingly, I recommend Decimal.from_float(f) with no qualifiers or
 optional arguments.

I agree with this.  Since lossless conversion is feasible, this seems 
the obvious way to go.

It's lucky that the exponent range for (binary) floats is relatively 
small, though:  for IEEE 754 floats the worst case conversions (e.g., 
(2**53-1)/2**1074) produce Decimals with something like 767 significant 
digits, which is still plenty small enough not to cause difficulties.

The recipe in the docs is not industrial strength: it doesn't handle 
infinities, nans and negative zero.  I think there's a place for a 
from_float method that handles these special cases correctly---or at 
least as correctly as reasonable:  +-infinity should convert to +-
infinity, nans to (quiet) nans.  I don't think it's worth worrying about 
preserving the sign or payload of a binary nan: just convert all float 
nans to Decimal('NaN').I do however think it's worth trying to 
preserve the sign of negative zero.  Note: I'm not suggesting changing 
the *documentation* at all---the recipe there is fine as it is, IMO, but 
I think an official version should include these corner cases.

--
nosy: +marketdickinson

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



[issue3055] test_list on 64-bit platforms

2009-01-02 Thread Ronald Oussoren

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

I can confirm that this issue is fixed.

--
resolution: works for me - fixed

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



[issue4796] Decimal to receive from_float method

2009-01-02 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

One also has to worry about the exponent of the converted result:  e.g., 
should Decimal.from_float(10.0) produce Decimal('1E1') or Decimal('10')?
The latter looks nicer, to me.

IEEE 754 isn't much help here:  as far as I can tell it says nothing about 
binary - decimal conversions.

I see two reasonable strategies:  (1) always use the largest exponent 
possible (so we'd get Decimal('1E1') above), or (2) when the quantity 
converted is an exact integer, use an exponent of zero; otherwise fall 
back to (1).

Option (2) is pretty much what the recipe in the docs does already, I 
think:  it computes a quotient of two Decimals, each having exponent zero, 
so the preferred exponent of the result is also zero.

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



[issue3433] Mac, 3.0 framework install error with fink cp

2009-01-02 Thread Ronald Oussoren

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

Fixed in r68150 (python-trunk), r68151 (python 2.6.x), r68152 (python 
3.x).

Could someone that actually has Fink installed confirm that the issue is 
actually fixed? My patch consists of changing 'cp' to '/bin/cp' to ensure 
that the system copy of that command is used.

--
resolution:  - fixed
status: open - pending
title: libtk - Mac, 3.0 framework install error with fink cp

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



[issue2754] Mac version of IDLE doesn't scroll as expected

2009-01-02 Thread Ronald Oussoren

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

This is almost certainly a Tk issue and hence not something we can fix.

I'm not closing the bug though because I no too little of Tk to be sure.

--
nosy: +ronaldoussoren

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



[issue4165] Failure building 64-bit Python on Leopard

2009-01-02 Thread Ronald Oussoren

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

I located the problem, it's in the configure line:

 ./configure --with-framework-name=Python64 --
with-universal-archs=all --enable-framework --enable-
universalsdk=MACOSX_DEPLOYMENT_TARGET=10.5

That's wrong because the argument for --enable-universalsdk should be a 
filesystem path for the SDK. In this case the following command-line 
will work:

./configure --with-framework-name=Python64 --
with-universal-archs=all --enable-framework --enable-
universalsdk=/

--
resolution:  - works for me
status: open - pending

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



[issue4718] wsgiref package totally broken

2009-01-02 Thread Dmitry Vasiliev

Dmitry Vasiliev d...@hlabs.spb.ru added the comment:

Graham Dumpleton wrote:
 Thus have odd situation where with Python 3.0, one could technically return 
 str as iterable, with rule that would apply would be that each str returned 
 would then be converted to bytes by way of latin-1 conversion, but for 
 bytes returned as iterable, should fail.
 
 Not sure how this plays out in wsgiref server yet as haven't looked. 

If application return bytes instead of an iterable AssertionError will
be raised in handlers.BaseHandler.write().

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



[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2009-01-02 Thread Hagen Fürstenau

New submission from Hagen Fürstenau hfuerste...@gmx.net:

If we call some function f with a generator as star argument and this
generator raises a TypeError, we get the following exception:

 def f(x): pass
... 
 def broken(): raise TypeError
... 
 f(*(broken() for x in (0,)))
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: f() argument after * must be a sequence, not generator

This is a misleading error message, as it's usually no problem to use a
generator as a star argument. Even just replacing the TypeError by some
other exception leads to the expected result, i.e. the exception gets
correctly propagated.

The problem seems to be around line 3710 of Python/ceval.c where the
generator is converted to a tuple. If this conversion raises a
TypeError, then the error message is replaced, which will mask any
TypeError raised by the generator.

I'm not sure how to solve this. We probably can't distinguish a good
TypeError from a bad TypeError at this point, so we might have to make
a special case for the conversion of generators.

--
components: Interpreter Core
messages: 78788
nosy: hagen
severity: normal
status: open
title: Function calls taking a generator as star argument can mask TypeErrors 
in the generator
type: behavior
versions: Python 2.6, Python 3.0

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



[issue4796] Decimal to receive from_float method

2009-01-02 Thread Steven D'Aprano

Steven D'Aprano st...@pearwood.info added the comment:

Mark suggested the following strategy for Decimal.from_float: always 
use the largest exponent possible.

Just for the avoidance of all doubt, do you mean the largest exponent 
with the number normalised to one digit to the right of the decimal 
place? Because 1e1 = 0.1e2 = 0.01e3 = ... and there is no largest 
exponent possible if you allow unnormalised numbers. Seems obvious to 
me, but maybe I'm missing something.

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



[issue4807] wrong wsprintf usage

2009-01-02 Thread Ulrich Eckhardt

New submission from Ulrich Eckhardt eckha...@satorlaser.com:

Note up front: there is a win32 function wsprintf() and an ISO C
function swprintf(), these are different things in case you wonder.

In _winreg.c, there are two functions that use wsprintf on a char
buffer, while the function takes a TCHAR buffer instead. This leads to
compile warning and runtime errors when _UNICODE is defined, like e.g.
under MS Windows CE. The attached patch replaces the two calls to that
function with calls to fprintf() and PyString_FromFormat().

--
components: Windows
files: python-2.7-no-wsprint.0.patch
keywords: patch
messages: 78790
nosy: eckhardt
severity: normal
status: open
title: wrong wsprintf usage
type: compile error
versions: Python 2.7
Added file: http://bugs.python.org/file12538/python-2.7-no-wsprint.0.patch

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



[issue3549] Missing IDLE Preferences on Mac

2009-01-02 Thread Ronald Oussoren

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

The lack of a preferences menu is a bug: the current revisions of python 
contain some code to detect a recent version of Tcl/Tk, used to create the 
Preferences... menu in different way. Sadly enough this code is buggy, the 
end result is that you will not have a IDLE-Preferences...' menu when 
using the system version of Tcl/Tk.

Fixed in r68153 (python-trunk), r68154 (python-2.6), r68155 (python-3.1)

--
nosy: +ronaldoussoren
resolution:  - fixed
status: open - pending

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



[issue789545] zappyfiles.py absent from MacPython binary

2009-01-02 Thread Ronald Oussoren

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

Closing because zappyfiles.py is no longer part of the python distribution

--
nosy: +ronaldoussoren
resolution:  - wont fix
status: open - closed

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



[issue4796] Decimal to receive from_float method

2009-01-02 Thread Steven D'Aprano

Steven D'Aprano st...@pearwood.info added the comment:

Raymond:
 Accordingly, I recommend Decimal.from_float(f) with no 
 qualifiers or optional arguments.

-0 on this one. It's going to confuse an awful lot of newbies when 
they write Decimal.from_float(1.1) and get 
Decimal('110008881784197001252...e-51').

Also, why not just extend the Decimal() constructor to accept a float 
as the argument? Why have a separate from_float() method at all?

 To support the use case of wanting to round the input, I 
 suggest a separate method modeled on Context.create_decimal().

+1 on this.

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



[issue1602133] non-framework built python fails to define environ properly

2009-01-02 Thread Ronald Oussoren

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

I won't commit this patch because I cannot reproduce the problem.

The python trunk works fine for my in these build configurations: unix-
build (static library), unix-build (shared library), framework build.

All of this on OSX 10.5. 

Can you please provide more information on how to reproduce the problem 
(os releases, which version of python, how to build, what should I do to 
get the segfault you mention)?

--
resolution:  - works for me
status: open - pending

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



[issue4681] mmap offset should be off_t instead of ssize_t, and size calculation needs corrected

2009-01-02 Thread Ulrich Eckhardt

Changes by Ulrich Eckhardt eckha...@satorlaser.com:


--
nosy: +eckhardt

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



[issue1699259] replacing char* with const char* in sysmodule.c/.h

2009-01-02 Thread Ulrich Eckhardt

Ulrich Eckhardt eckha...@satorlaser.com added the comment:

Concerning the SetArgv( int, char**), that one will have to be changed
to a SetArgv( int, char const* const*), i.e. applying the const on both
levels. Otherwise, there is no implicit conversion between the two.

The reason is a bit complicated: if the function stored a
pointer-to-const in the array, it would become a pointer-to-nonconst
outside. Only if modification of the array is forbidden, changing the
element type to pointer-to-const is allowed.

Otherwise, I'm +1 on this kind of changes, because it makes immediately
obvious which functions modify a passed buffer and which don't.

--
nosy: +eckhardt

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



[issue4796] Decimal to receive from_float method

2009-01-02 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

 Just for the avoidance of all doubt, do you mean the largest exponent 
 with the number normalised to one digit to the right of the decimal 
 place?

No.  I'm using 'exponent' in the sense described in the standard.  See:

http://speleotrove.com/decimal/dbover.html

Equivalently, it's the value of the _exp attribute for a Decimal 
instance.  (For the purposes of disambiguation, the alternative exponent 
that you describe above is often referred to as the 'adjusted exponent' 
in the documentation and code.)

Briefly, every finite Decimal can be thought of as a triple (sign, 
coefficient, exponent), representing the value (-1)**sign * coefficient 
* 10**exponent, with the coefficient an integer.  It's this exponent 
that should be maximized.

 Because 1e1 = 0.1e2 = 0.01e3 = ... and there is no largest 
 exponent possible

All these have exponent 1:

 Decimal('1e1')._exp
1
 Decimal('0.1e2')._exp
1
 Decimal('0.01e3')._exp
1

IOW, leading zeros have no significance;  only trailing zeros do.

 Also, why not just extend the Decimal() constructor to accept a float 
 as the argument? Why have a separate from_float() method at all?

This was discussed extensively when the decimal module was being 
proposed;  see the Decimal PEP for arguments against this.

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



[issue1594] MacOS.GetCreatorAndType() and SetCreatorAndType() broken on intel

2009-01-02 Thread Ronald Oussoren

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

Fixed in r68156 (including testcase). Annoyingly enough only 
GetCreatorAndType needed fixing, SetCreatorAndType already did the right 
thing (makeing the two functions inconsistent with each other).

Won't fix for earlier releases, this might break existing code.

--
nosy: +ronaldoussoren
resolution:  - fixed
status: open - closed
versions: +Python 2.6

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



[issue2754] Mac version of IDLE doesn't scroll as expected

2009-01-02 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

I see some issues related to scrolling under macosx were fixed in tk
8.4.13, but I can't test them since I don't have a mac.

If scrolling doesn't work with the example below then I can just say the
problem is indeed with tk, but you could try upgrading it.

import Tkinter

root = Tkinter.Tk()

text = Tkinter.Text()
text.focus_set()
vbar = Tkinter.Scrollbar(orient='vertical', command=text.yview)
text.configure(yscrollcommand=vbar.set)

vbar.pack(side='right', fill='y')
text.pack(fill='both', expand=True)

for l in range(int(text['height']) + 10):
text.insert('end', x\n)

root.mainloop()

--
nosy: +gpolo
Added file: http://bugs.python.org/file12539/tktext_scroll.py

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



[issue4791] retrlines('LIST') and dir hang at end of listing in ftplib (python3.0)

2009-01-02 Thread STINNER Victor

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

Can you paste the full output with debuglevel=3?

if not line: should be equivalent to if len(line) == 0: and to if 
line == '':.

ftp.dir() is equivalent to ftp.retrlines('LIST').

By default, the socket created to get the result of LIST has no 
timeout (is blocking). So fp.readline() only returns an empty string 
when the socket is closed (by the server).

fp is a io.BufferedReader(SocketIO(socket, r), 
io.DEFAULT_BUFFER_SIZE).

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



[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2009-01-02 Thread Amaury Forgeot d'Arc

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

The issue1615 has the same kind of problems: an AttributeError is masked
by another one.

--
nosy: +amaury.forgeotdarc

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



[issue4751] Patch for better thread support in hashlib

2009-01-02 Thread STINNER Victor

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

 Releasing the GIL is somewhat expensive and should be avoided 
 if possible.

Another possible solution is to create a lockless object by default, 
and create a lock if the data size is bigger than N (eg. 8 KB). When 
the lock is created, update will always use the lock (and so the GIL).

In general, you have two classes of hashlib usages:
 - hash a big files by chunk of k KB (eg. 256 KB)
 - hash a very small string (eg. 8 bytes)

When you have a small string, you don't need to release the GIL nor to 
use locks. Whereas for a file, you can always release the GIL (and so 
you need a lock to protect the context).

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



[issue4791] retrlines('LIST') and dir hang at end of listing in ftplib (python3.0)

2009-01-02 Thread Christopher Mahan

Christopher Mahan chris.ma...@gmail.com added the comment:

Full output with debuglevel 3

*cmd* 'CWD chrismahan-675'
*put* 'CWD chrismahan-675\r\n'
*get* '250 CWD command successful\n'
*resp* '250 CWD command successful'
*cmd* 'TYPE A'
*put* 'TYPE A\r\n'
*get* '200 Type set to A\n'
*resp* '200 Type set to A'
*cmd* 'PASV'
*put* 'PASV\r\n'
*get* '227 Entering Passive Mode (72,21,82,190,217,227).\n'
*resp* '227 Entering Passive Mode (72,21,82,190,217,227).'
*cmd* 'LIST'
*put* 'LIST\r\n'
*get* '150 Opening ASCII mode data connection for file list\n'
*resp* '150 Opening ASCII mode data connection for file list'
*retr* '-rwxrwxrwx   1 nobody   nogroup   3905538 Dec 29 09:51 Bronski
Beat - Why.mp3\n'
-rwxrwxrwx   1 nobody   nogroup   3905538 Dec 29 09:51 Bronski Beat -
Why.mp3
*retr* '-rwxrwxrwx   1 nobody   nogroup873966 Dec 28 13:53 test9.avi\n'
-rwxrwxrwx   1 nobody   nogroup873966 Dec 28 13:53 test9.avi
*retr* '-rwxrwxrwx   1 nobody   nogroup   2512653 Dec 29 08:28
test9_lg.wmv\n'
-rwxrwxrwx   1 nobody   nogroup   2512653 Dec 29 08:28 test9_lg.wmv
*retr* '-rwxrwxrwx   1 nobody   nogroup  6549 Dec 29 08:28
test9_lg.wmv.jpg\n'
-rwxrwxrwx   1 nobody   nogroup  6549 Dec 29 08:28 test9_lg.wmv.jpg
*retr* '-rwxrwxrwx   1 nobody   nogroup   1788466 Dec 29 03:04
test9_med.flv\n'
-rwxrwxrwx   1 nobody   nogroup   1788466 Dec 29 03:04 test9_med.flv
*retr* '-rwxrwxrwx   1 nobody   nogroup  6394 Dec 29 03:04
test9_med.flv.jpg\n'
-rwxrwxrwx   1 nobody   nogroup  6394 Dec 29 03:04 test9_med.flv.jpg
*retr* '-rwxrwxrwx   1 nobody   nogroup   1263041 Dec 28 13:53
test9_sm.flv\n'
-rwxrwxrwx   1 nobody   nogroup   1263041 Dec 28 13:53 test9_sm.flv
*retr* '-rwxrwxrwx   1 nobody   nogroup  6465 Dec 28 13:53
test9_sm.flv.jpg\n'
-rwxrwxrwx   1 nobody   nogroup  6465 Dec 28 13:53 test9_sm.flv.jpg
*retr* ''

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



[issue900949] plat-mac/videoreader.py not working on OS X

2009-01-02 Thread Ronald Oussoren

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

Fixed in r68158.

--
nosy: +ronaldoussoren
resolution:  - fixed
status: open - closed

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



[issue1627952] plat-mac videoreader.py auido format info

2009-01-02 Thread Ronald Oussoren

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

Fixd in r68159

--
resolution:  - fixed
status: open - closed

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



[issue4791] retrlines('LIST') and dir hang at end of listing in ftplib (python3.0)

2009-01-02 Thread Christopher Mahan

Christopher Mahan chris.ma...@gmail.com added the comment:

haypo writes:
By default, the socket created to get the result of LIST has no 
timeout (is blocking). So fp.readline() only returns an empty string 
when the socket is closed (by the server).

Even if the server closed the socket and fp.readline() returned an empty
string, the prog should not hang, no?

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



[issue1737832] EasyDialogs patch to remove aepack dependency

2009-01-02 Thread Ronald Oussoren

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

I've applied this patch in r68160.

--
resolution:  - accepted
status: open - closed

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



[issue4808] doc issue for threading module (name/daemon properties)

2009-01-02 Thread Corey Goldberg

New submission from Corey Goldberg cgoldb...@gmail.com:

In the current 3.0 doc for threading:
http://docs.python.org/dev/py3k/library/threading.htm

it says:

Thread.getName()
Thread.setName()
  Old API for name.
  
and

Thread.isDaemon()
Thread.setDaemon()
  Old API for daemon.
  
  
'name' and 'daemon' properties should be listed as defaults and the old
getter/setter methods should be noted as Old API.

--
assignee: georg.brandl
components: Documentation
messages: 78807
nosy: cgoldberg, georg.brandl
severity: normal
status: open
title: doc issue for threading module (name/daemon properties)
versions: Python 3.0

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



[issue4753] Faster opcode dispatch on gcc

2009-01-02 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

On 2009-01-01 23:59, Antoine Pitrou wrote:
 Antoine Pitrou pit...@free.fr added the comment:
 
 I've updated the comments as per Alexandre's request, added support for
 SUN CC, and fixed the generation script to use the new filename.

Since the patch heavily relies on the compiler doing the right
thing (which esp. GCC often doesn't, unfortunately), I think that the
opcode dispatch code should only be enabled via a configure option.

This is safer than enabling the support unconditionally for GCC and
the SUN Pro C compiler, since it is rather likely that some GCC versions
have bugs which could render Python unusable if compiled with the
dispatching support enabled.

A configure option also has the additional benefit that you can enable
the support for compilers which support the syntax, but are not included
in the hard-coded list of compilers included in the patch.

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



[issue4472] Is shared lib building broken on trunk for Mac OS X?

2009-01-02 Thread Roumen Petrov

Roumen Petrov bugtr...@roumenpetrov.info added the comment:

Ronald,
cygwin is a special case too.
LDLIBRARY is so called import library !

So the make target can be (as I propose in py-issue-4472-makefile.patch)
+   if test -n $(DLLLIBRARY); then \
+   $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \

or if new check is not ok then we has to restore old code .
-   if test $(SO) = .dll; then \
-   $(INSTALL_SHARED) libpython$(VERSION)$(SO) 
$(DESTDIR)$(BINDIR); \

More info for cygwin:
- SO = .dll
- DLLLIBRARY is set only for cygwin
- libpython$(VERSION)$(SO) = $(DLLLIBRARY)
- but $(LDLIBRARY) = libpython$(VERSION).dll.a !!!

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



[issue1149804] macostools.mkdirs: not thread-safe

2009-01-02 Thread Ronald Oussoren

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

Fixed this issue in r68161 by porting the solution for this in os.mkdirs 
to macostools.

--
nosy: +ronaldoussoren
resolution:  - fixed
status: open - closed

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

2009-01-02 Thread Craig Holmquist

Craig Holmquist craigh...@gmail.com added the comment:

I haven't been able to try this patch myself yet, but I see a potential
problem:  the cookie variable is declared as a DWORD, while
ActivateActCtx expects a ULONG_PTR. DWORD and ULONG_PTR are only the
same thing in 32-bit Windows.

Also, where are you seeing that these SxS functions are Vista or
later?  My XP kernel32.dll has all of them.  MSDN says they're XP or Vista.

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



[issue4472] Is shared lib building broken on trunk for Mac OS X?

2009-01-02 Thread Ronald Oussoren

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

I've applied this patch. If I understand things correctly that should 
fix the cygwin issue.

Index: Makefile.pre.in
===
--- Makefile.pre.in (revision 68149)
+++ Makefile.pre.in (working copy)
@@ -773,8 +773,8 @@
done
$(INSTALL_PROGRAM) $(BUILDPYTHON) 
$(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE)
if test -f $(LDLIBRARY); then \
-   if test $(SO) = .dll; then \
-   $(INSTALL_SHARED) $(LDLIBRARY) 
$(DESTDIR)$(BINDIR); \
+   if test -n $(DLLLIBRARY) ; then \
+   $(INSTALL_SHARED) $(DLLLIBRARY) 
$(DESTDIR)$(BINDIR); \
else \
$(INSTALL_SHARED) $(LDLIBRARY) 
$(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
if test $(LDLIBRARY) != $(INSTSONAME); then \

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

2009-01-02 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Here's a patch (against py3k) generated from the current state of the 
py3k-issue1717 branch, for ease of review and testing.

The patch needs serious review;  it should be considered a first draft, 
and there are probably many more changes still to be made.  I don't 
think I can do much more for now without getting input from others.

Known places in the source tree where cmp/__cmp__ still lingers on:

Demos/many
Doc/extending/newtypes.rst
Misc/cheatsheet
Misc/python-mode.el
Misc/Vim/python.vim
Parser/spark.py   # (I don't know what this does.  Anyone?)
Tools/various   # (notably pynche and pybench)

Apart from the newtypes.rst, all of the above files are somewhat out of 
date in other ways.  In my opinion it's only the doc fixes that stop the 
patch from being complete enough.

--
stage: needs patch - patch review
Added file: http://bugs.python.org/file12540/remove_cmp6.patch

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



[issue900514] bundlebuilder: easily keep main routine in orig location

2009-01-02 Thread Ronald Oussoren

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

I agree with Bob's last response. Futhermore bundlebuilder is deprecated, 
use py2app instead.

--
nosy: +ronaldoussoren
resolution:  - wont fix
status: open - closed

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



[issue905737] BuildApplet needs to get more BuildApplication features

2009-01-02 Thread Ronald Oussoren

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

Closing this issue as bundlebundler is deprecated.

--
nosy: +ronaldoussoren
resolution:  - wont fix
status: open - closed

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



[issue841800] -O breaks bundlebuilder --standalone

2009-01-02 Thread Ronald Oussoren

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

Fixed in r68163

--
nosy: +ronaldoussoren
resolution:  - fixed
status: open - closed

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



[issue900506] bundlebuilder: an arg to disable zipping the code

2009-01-02 Thread Ronald Oussoren

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

Fixed in r68163

--
nosy: +ronaldoussoren
resolution:  - fixed
status: open - closed

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



[issue957652] Implement BundleBuilder GUI as plugin component

2009-01-02 Thread Ronald Oussoren

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

Closed as won't fix because bundlebuilder is deprecated and it is rather 
unlikely that anyone will spent time on this feature request.

--
nosy: +ronaldoussoren
resolution:  - wont fix
status: open - closed

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

2009-01-02 Thread Craig Holmquist

Craig Holmquist craigh...@gmail.com added the comment:

The patch works fine on my system (32-bit XP).  Also I verified in
Process Explorer that there's only one instance of msvcr90.dll loaded.

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



[issue4751] Patch for better thread support in hashlib

2009-01-02 Thread ebfe

ebfe knabberknusperh...@yahoo.de added the comment:

I don't think this is actually worth the trouble. You run into situation
where one thread might decide that it needs a lock now with other
threads being in the to-be-locked-area at that time.

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



[issue4805] Make python code compilable with a C++ compiler

2009-01-02 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Moving declarations into header files is not really in line with the way
Python developers use header files:

We usually only put code into header files that is meant for public use. 

Buy putting declarations into the header files without additional
warning, you implicitly document them and make them usable in
non-interpreter code.

--
nosy: +lemburg

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



[issue4805] Make python code compilable with a C++ compiler

2009-01-02 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Also note that by removing the extern C declarations, you not only
change the exported symbol names of functions, but also those of
exported globals.

Those would also have to get declared in the header files, to prevent
their names from being mangled (causing the exported C API to change).

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



[issue4805] Make python code compilable with a C++ compiler

2009-01-02 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

The added type casts are useful to have - even outside the context of
the idea behind the patch.

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



[issue2121] complex constructor doesn't accept string with nan and inf

2009-01-02 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

[Raymond]
 I would
 not like to see that extended to cmath or complex() unless compelling
 real-world use cases arise.

Hmm.  Have you looked at the cmath module recently?  You may be in for a 
nasty surprise...

 Mark, does Inf have a standard interpretation for complex numbers?  Do
 all infinities meet or do they radiate, each with their own phase
 angle?

Shrug.  Mathematically, by far the most common and useful model is the 
complex plane plus a single extra point at infinity.  But when complexes 
are implemented as pairs of floats things look a little strange. Kahan, 
in his 'branch cuts' paper identifies 9 'different' complex infinities 
in this model, and C99 Annex G specifies exactly how functions should 
behave for various different infinities.

It's never really been clear to me how useful it is to be able to 
distinguish these infinities.  But the cmath module *does* make an 
effort to return the 'correct' (according to C99 Annex G) values for 
inputs with a special real or imaginary component.  On balance, I'd 
support making complex('nan + nan*j') do the right thing.

(Though I can't help feeling that the repr of complex(nan, nan)
should have been 'nan + nan*1j' rather than the current 'nan + nan*j'.)

 Also, do you want to stick with the 754 interpretation of NaNs as the
 result of invalid operations

I've never much liked the use of NaN to represent missing values, and
I don't think Python should embrace that usage.

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



[issue4794] garbage collector blocks and takes worst-case linear time wrt number of objects

2009-01-02 Thread Martin v. Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Hard real-time applications written in Python should not rely on the
cyclic garbage collector. They should call gc.disable at startup, and
completely rely on reference counting for releasing memory. Doing so
might require rewrites to the application, explicitly breaking cycles so
that reference counting can release them.

Even with cyclic gc disabled, applications worried about meeting hard
deadlines need to look even more into memory allocation and
deallocation; e.g. releasing a single object may cause a chained release
of many objects, which can affect worst case execution times. There are
more issues to consider (which are all out of scope of the bug tracker).

--
nosy: +loewis

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



[issue3959] Add Google's ipaddr.py to the stdlib

2009-01-02 Thread Martin v. Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 I think this might be worth a look before any hard and fast decisions
 are made :-
 
 http://code.google.com/p/netaddr/

Looking at code isn't really helpful for determining whether it can
be included into Python. What matters more is whether the authors
want to contribute it, how they want to support it afterwards, and
so on.

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



[issue2121] complex constructor doesn't accept string with nan and inf

2009-01-02 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

cdavid, in your application, how hard is it to work around the problem by 
simply printing and parsing pairs of floats rather than complex numbers?

E.g.,

get real part and imaginary part from string 
z = complex(float(real_part), float(imag_part))

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



[issue4753] Faster opcode dispatch on gcc

2009-01-02 Thread Antoine Pitrou

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

 This is safer than enabling the support unconditionally for GCC and
 the SUN Pro C compiler, since it is rather likely that some GCC versions
 have bugs which could render Python unusable if compiled with the
 dispatching support enabled.

What do you mean, unusable? 10% slower? Well, Python 3.x is already
unusable (compared to 2.x) by that metric... Until now, only Skip has
reported a slowdown on his PPC machine, while x86 systems have all seen
a positive (if tiny, sometimes) improvement.

I fear that with a configure option, disabled by default, the code will
get very poor testing and perhaps get broken in some subtle way without
anyone noticing.

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



[issue4035] Support bytes for os.exec*()

2009-01-02 Thread Martin v. Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Any discussion in the tracker should be deferred until a PEP has been
written, discussed, and accepted. Then the question whether to accept a
specific patch shouldn't be a matter of taste, but should follow from
the general rules that the PEP has set up.

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



[issue4065] _multiprocessing doesn't build on macosx 10.3

2009-01-02 Thread Ronald Oussoren

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

The manpage for writev(2) mentions #include sys/uio.h. Adding a #include 
for sys/uio.h is the right fix after all...

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



[issue4753] Faster opcode dispatch on gcc

2009-01-02 Thread Skip Montanaro

Skip Montanaro s...@pobox.com added the comment:

Antoine I fear that with a configure option, disabled by default, the
Antoine code will get very poor testing and perhaps get broken in some
Antoine subtle way without anyone noticing.

That can be fixed by enabling that option on the buildbots where it is
presumed to help.  I see more slowdown on PPC than people are reporting as
speedups on Intel.  Is there something I can do to help debug the problem?
It doesn't appear the Apple version of gcc supports the -fno-crossjumping
flag.  If I dump the assembler code for ceval.c will that help others debug
the problem?

Skip

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



[issue4809] 2.5.4 release missing from python.org/downloads

2009-01-02 Thread Randy Syring

New submission from Randy Syring ra...@rcs-comp.com:

http://www.python.org/download/ is missing a link to 2.5.4 in the
standard releases section.

--
assignee: georg.brandl
components: Documentation
messages: 78832
nosy: georg.brandl, rsyring
severity: normal
status: open
title: 2.5.4 release missing from python.org/downloads

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



[issue2121] complex constructor doesn't accept string with nan and inf

2009-01-02 Thread Cournapeau David

Cournapeau David da...@ar.media.kyoto-u.ac.jp added the comment:

It is not really for an application, but for numpy. Of course, one can
always get around the problem - but since this is really a limitation
which can be easily fixed, why not fixing the problem :) ?

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



[issue4753] Faster opcode dispatch on gcc

2009-01-02 Thread Antoine Pitrou

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

 If I dump the assembler code for ceval.c will that help others debug
 the problem?

Well, I'm no PPC expert but it can be useful. Can you dump it with -S
-dA?

(also, can you try the latest patch? I've made some tiny adjustement in
the opcode epilogues, I don't think it will make a difference but who
knows)

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



[issue4800] little inaccuracy in Py_ssize_t explanation

2009-01-02 Thread Martin v. Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

I think the documentation is correct as it stands; the question is what
a distinct memory location is. Wrt. reference count, this surely
refers to pointers; each pointer is at least 4 bytes, and pointers are
four-aligned. So for N bits address space, there can be at most 2**(N-2)
pointers.

--
nosy: +loewis
resolution:  - wont fix
status: open - closed

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



[issue3959] Add Google's ipaddr.py to the stdlib

2009-01-02 Thread Martin v. Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 One point I will make is on licensing. netaddr is BSD, so you can do
 whatever you want with it and contribute as you see fit.

That is not sufficient for inclusion to Python. We also want support
from the author (along with a promise to eventually give up the external
project).

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



[issue4753] Faster opcode dispatch on gcc

2009-01-02 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

On 2009-01-02 17:10, Antoine Pitrou wrote:
 Antoine Pitrou pit...@free.fr added the comment:
 
 This is safer than enabling the support unconditionally for GCC and
 the SUN Pro C compiler, since it is rather likely that some GCC versions
 have bugs which could render Python unusable if compiled with the
 dispatching support enabled.
 
 What do you mean, unusable? 

Well, not working. GCC versions often have optimizer bugs (esp. the
3.x series and early 4.x versions) and I wouldn't bet on them always
getting the dispatch optimizations right.

Trying to compile Python with an unconditionally enabled dispatch
patch on such a system would render Python unusable.

 10% slower? Well, Python 3.x is already
 unusable (compared to 2.x) by that metric... Until now, only Skip has
 reported a slowdown on his PPC machine, while x86 systems have all seen
 a positive (if tiny, sometimes) improvement.
 
 I fear that with a configure option, disabled by default, the code will
 get very poor testing and perhaps get broken in some subtle way without
 anyone noticing.

Like Skip said: the buildbots could take care of identifying such
problems.

People using the option would certainly report problems as well and
I'm sure that Linux distributions would compile Python with the switch
after verifying that their GCC version works correctly.

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



[issue4810] timeit needs official '--' flag

2009-01-02 Thread Skip Montanaro

New submission from Skip Montanaro s...@pobox.com:

Consider this timeit run:

% python -m timeit '-1.0e-3  -0.0001  1.0e-3'
option -1 not recognized
use -h/--help for command line help

As it turns out this works:

% python -m timeit -- '-1.0e-3  -0.0001  1.0e-3'
1000 loops, best of 3: 0.192 usec per loop

but the output using the -h flag doesn't report it as a possibility.  It
probably should.

--
messages: 78838
nosy: skip.montanaro
severity: normal
status: open
title: timeit needs official '--' flag

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

2009-01-02 Thread Martin v. Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 Here's an option, though unfortunately not a trivial one:  use a private
 build of the C runtime.

I'm not sure whether the license allows us to do so.

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



[issue4614] Document PyModule_Create()

2009-01-02 Thread Martin v. Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

What's the policy for marking bug reports as critical? If the
description of the priority (Might block a future release) is normative,
why got this report marked critical? I don't think a documentation bug
can ever block a release.

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



[issue4614] Document PyModule_Create()

2009-01-02 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

I'm not suggesting that this should block a release (if that is the
definition of critical). I do however think this is critical for 3.x's
adoption and therefore should be of much importance to us.

--
nosy: +benjamin.peterson
priority: critical - high

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-01-02 Thread Martin v. Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

As long as the CRT contains bogus assertions (that violate standard C),
I think Python rightfully should continue to disable assertions. If
applications desire assertions, they should explicitly turn them on
(provided there is an API to do so).

--
nosy: +loewis

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



[issue4796] Decimal to receive from_float method

2009-01-02 Thread Steven D'Aprano

Steven D'Aprano st...@pearwood.info added the comment:

Mark wrote:
 Also, why not just extend the Decimal() constructor to accept
 a float as the argument? Why have a separate from_float() 
 method at all?

 This was discussed extensively when the decimal module was 
 being proposed;  see the Decimal PEP for arguments against this.

I'm very aware of that. The Decimal PEP says the consensus was for 
from_float() to take a second argument specifying the precision. 
Decimal(1.1) = Decimal(1.1) was rejected for the reasons given in 
the PEP by Paul Moore, and Decimal(1.1) = 
Decimal('110008881784197001252...e-51') was (presumably) 
rejected because it would confuse newbies. Hence the decision to (1) 
make an alternative constructor and (2) have it take a second 
argument.

It looks like you and Raymond have rejected #2 but are keeping #1, and 
I'm curious why. That's genuine curiosity, and a real question, not a 
thinly-veiled scowl of disapproval disguised as a question :)

Anyway, I'm happy enough so long as Raymond's suggested 
Context.create_decimal() exists, that's the actual functionality I'm 
after, so maybe I should let you guys get on with it. Thanks.

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



[issue4760] cmp gone---What's new in 3.1

2009-01-02 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

 Uhm ? The builtin cmp wasn't removed.

Non-removal of cmp for 3.0 was an oversight.  It *might* be removed in 
3.0.1.  See issue 1717.

--
nosy: +marketdickinson

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



[issue4614] Document PyModule_Create()

2009-01-02 Thread Martin v. Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

I'm a bit worried about committers giving other committers priorities on
how they should work; as a principle, volunteers are free to work on
whatever they please, in whatever order they please.

So unassigning Georg.

--
assignee: georg.brandl - 

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



[issue4796] Decimal to receive from_float method

2009-01-02 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

 It looks like you and Raymond have rejected #2 but are keeping #1

I'm not against #2, but I'm not particularly for it either.  In any case, 
once you've converted your float to Decimal it's trivial to round it to 
whatever precision you feel like, so #2 seems unnecessary to me.  -0.0.

I am -1.100088817841970012523233890533447265625 on any 
implementation of from_float (with or without keywords, defaults, etc.) 
for which Decimal.from_float(1.1) gives Decimal('1.1').

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



[issue4614] Document PyModule_Create()

2009-01-02 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

On Fri, Jan 2, 2009 at 11:24 AM, Martin v. Löwis rep...@bugs.python.org wrote:

 Martin v. Löwis mar...@v.loewis.de added the comment:

 I'm a bit worried about committers giving other committers priorities on
 how they should work; as a principle, volunteers are free to work on
 whatever they please, in whatever order they please.

Of course.


 So unassigning Georg.

It would be really nice if there were some notes on use of the tracker.

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-01-02 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

We've had this discussion before, you know, 2006.
MS is asserting on preconditions that are undefined by the standard.
As such, they are not in violation.  In fact, it is foolish by us to invoke 
undefined behaviour, because it may, proverbially, result in the formatting of 
the hard drive :)

K

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



[issue4738] Patch to make zlib-objects better support threads

2009-01-02 Thread Antoine Pitrou

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

Checked in r68165. Thanks!

--
resolution:  - fixed
status: open - closed

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



[issue4738] Patch to make zlib-objects better support threads

2009-01-02 Thread STINNER Victor

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

@pitrou: You added Also, the GIL is now released when computing the 
CRC of a large buffer. in the NEWS. The GIL released for crc32 but 
also for adler32.

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



[issue4614] Document PyModule_Create()

2009-01-02 Thread Martin v. Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 It would be really nice if there were some notes on use of the tracker.

I think Brett has a vision here; you might ping him what the status
of that is.

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



[issue4809] 2.5.4 release missing from python.org/downloads

2009-01-02 Thread Georg Brandl

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

Normally this bug tracker isn't meant for website problems (mail to
pydot...@python.org instead), but since this is minor, I've fixed it
right now. Thanks!

--
resolution:  - fixed
status: open - closed

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

2009-01-02 Thread Georg Brandl

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

Doc/extending/newtypes.rst

  I'll fix this one after the patch has landed.

Misc/cheatsheet

  This needs a general overhaul.

Misc/python-mode.el

  I think this should be removed from the distribution; it's maintained
externally.

Parser/spark.py   # (I don't know what this does.  Anyone?)

  This is used by asdl_c.py which generates Python-ast.c -- it should be
updated.

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-01-02 Thread Martin v. Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 We've had this discussion before, you know, 2006.
 MS is asserting on preconditions that are undefined by the standard.
 As such, they are not in violation.

I remember, and you were already wrong back then :-)

MS asserts (in winsig.c) that the signal number in signal() is one
of the explicit list of supported or ignored signals; if it isn't,
it aborts. This is in violation to ISO C, 7.14.1.1p8, which specifies
that SIG_ERR must be returned and errno set.

It is true that Python *also* invokes undefined behavior in certain
cases; contributions to eliminate these are welcome.

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



[issue4809] 2.5.4 release missing from python.org/downloads

2009-01-02 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

webmas...@python.org is better.

--
nosy: +benjamin.peterson

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



[issue4472] Is shared lib building broken on trunk for Mac OS X?

2009-01-02 Thread Roumen Petrov

Roumen Petrov bugtr...@roumenpetrov.info added the comment:

10x cygwin is now not impacted.

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



[issue4751] Patch for better thread support in hashlib

2009-01-02 Thread STINNER Victor

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

New implementation of finer lock grain in _hashlibopenssl: only create 
the lock at the first update with more than 8 KB bytes. Object 
creation/deallocation is faster if we hash less than 8 KB.

Changes between hashopenssl_threads-4.diff and my new patch: fix the 
deadlock in ENTER_HASHLIB() (for the GIL) without speed change 
(because we don't change the GIL state if we don't use a lock).

Changes between py3k trunk and my new patch:
 - release the GIL with large byte string = faster with multiple CPUs
 - fix EVP_get_block_size() and EVP_get_digest_size(): the context was 
not protected by the lock!

Added file: http://bugs.python.org/file12541/hashlibopenssl_small_lock.patch

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



[issue4751] Patch for better thread support in hashlib

2009-01-02 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file12459/hashopenssl_threads-2.diff

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



[issue4751] Patch for better thread support in hashlib

2009-01-02 Thread STINNER Victor

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

Update small lock patch: replace all tabs by spaces! I forget a change 
between Python trunk and my patch: there is also the error message for 
Unicode object. Before:
import hashlib; hashlib.md5(abc)
   TypeError: object supporting the buffer API required
after:
import hashlib; hashlib.md5(abc)
   TypeError: Unicode-objects must be encoded before hashing

Added file: http://bugs.python.org/file12542/hashlibopenssl_small_lock-2.patch

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



  1   2   >