[Python-Dev] multiprocessing problems

2008-06-10 Thread Georg Brandl
Currently, multiprocessing cannot be imported: >>> import multiprocessing Traceback (most recent call last): File "", line 1, in File "/home/gbr/devel/python/Lib/multiprocessing/__init__.py", line 63, in import _multiprocessing AttributeError: 'module' object has no attribute 'BufferTooSh

Re: [Python-Dev] segfault in struct module

2008-06-10 Thread Gregory P. Smith
On Tue, Jun 10, 2008 at 9:04 AM, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED]:~$ ~/Projects/python/trunk/python > Python 2.6a3+ (trunk:63964, Jun 5 2008, 16:49:12) > [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 > Type "help", "copyright", "credits" or "license" fo

Re: [Python-Dev] Have been sick, am behind on mail, let me know if there's anything urgent for me

2008-06-10 Thread Stefan Behnel
Hi Guido, glad to hear you're recovering. Guido van Rossum wrote: > anything someone really needs me to look at ASAP (e.g. a BDFL decision > affecting the impending beta release) please send me an email This seems to require a BDFL decision: http://bugs.python.org/issue2997 Executive Summary:

Re: [Python-Dev] bug or a feature?

2008-06-10 Thread Greg Ewing
Maciej Fijalkowski wrote: What do you think about this code: class A: locals()[42] = 98 Seems people rely on it working. Do we consider it part of python language? Modifying the dict returned by locals() is documented as NOT being guaranteed to work, isn't it? -- Greg

Re: [Python-Dev] [Python-3000] Stabilizing the C API of 2.6 and 3.0

2008-06-10 Thread Gregory P. Smith
On Mon, Jun 9, 2008 at 1:44 AM, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > On 2008-06-09 07:20, Gregory P. Smith wrote: > >> On Fri, Jun 6, 2008 at 2:19 AM, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: >> >> On 2008-06-03 01:29, Gregory P. Smith wrote: >>> >>> On Mon, Jun 2, 2008 at 4:09 PM, Guido v

Re: [Python-Dev] pep8ity __future__

2008-06-10 Thread Guido van Rossum
I don't see it the same way; this is a terribly unimportant API, so let's not mess with it. threading.py is worth fixing (a) because it's so popular, and (b) because some folks insisted that the new multiprocessing module have an API that is as similar as possible to threading. IOW The general mora

Re: [Python-Dev] bug or a feature?

2008-06-10 Thread Benjamin Peterson
On Tue, Jun 10, 2008 at 9:18 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > I see no reason to invent a new custom dict to prevent people from > doing something they find to be useful. If you can't segfault with it, > who cares. Don't worry; I'm not suggesting it. -- Cheers, Benjamin Pete

Re: [Python-Dev] bug or a feature?

2008-06-10 Thread Raymond Hettinger
What do you think about this code: class A: locals()[42] = 98 Seems people rely on it working. Do we consider it part of python language? (Note that you cannot do the same with getattr/setattr which checks if argument is a string) Seems like a bug to me, but I don't think there is much we ca

Re: [Python-Dev] bug or a feature?

2008-06-10 Thread Benjamin Peterson
On Tue, Jun 10, 2008 at 8:37 PM, Maciej Fijalkowski <[EMAIL PROTECTED]> wrote: > On Wed, Jun 11, 2008 at 3:36 AM, Scott Dial >> >> I apologize for my ignorance, but who? Could you please cite something >> reputable that relies on this detail? >> > > It's in tests of sqlalchemy. My question is among

Re: [Python-Dev] bug or a feature?

2008-06-10 Thread Maciej Fijalkowski
On Wed, Jun 11, 2008 at 3:36 AM, Scott Dial <[EMAIL PROTECTED]> wrote: > Maciej Fijalkowski wrote: >> >> What do you think about this code: >> >> class A: >> locals()[42] = 98 >> >> Seems people rely on it working. > > I apologize for my ignorance, but who? Could you please cite something > reput

Re: [Python-Dev] bug or a feature?

2008-06-10 Thread Scott Dial
Maciej Fijalkowski wrote: What do you think about this code: class A: locals()[42] = 98 Seems people rely on it working. I apologize for my ignorance, but who? Could you please cite something reputable that relies on this detail? -- Scott Dial [EMAIL PROTECTED] [EMAIL PROTECTED] ___

Re: [Python-Dev] bug or a feature?

2008-06-10 Thread Steve Holden
Benjamin Peterson wrote: On Tue, Jun 10, 2008 at 8:10 PM, Maciej Fijalkowski <[EMAIL PROTECTED]> wrote: What do you think about this code: class A: locals()[42] = 98 Seems people rely on it working. Do we consider it part of python language? (Note that you cannot do the same with getattr/set

Re: [Python-Dev] bug or a feature?

2008-06-10 Thread Benjamin Peterson
On Tue, Jun 10, 2008 at 8:10 PM, Maciej Fijalkowski <[EMAIL PROTECTED]> wrote: > What do you think about this code: > > class A: > locals()[42] = 98 > > Seems people rely on it working. Do we consider it part of python > language? (Note that you cannot do the same with getattr/setattr which > che

[Python-Dev] bug or a feature?

2008-06-10 Thread Maciej Fijalkowski
What do you think about this code: class A: locals()[42] = 98 Seems people rely on it working. Do we consider it part of python language? (Note that you cannot do the same with getattr/setattr which checks if argument is a string) Cheers, fijal ___

[Python-Dev] Have been sick, am behind on mail, let me know if there's anything urgent for me

2008-06-10 Thread Guido van Rossum
All, I've been sick since Saturday and still don't feel up to much. I've collected a severe email backlog going back to June 6th. If there's anything someone really needs me to look at ASAP (e.g. a BDFL decision affecting the impending beta release) please send me an email (a followup to this thre

Re: [Python-Dev] Nab those release blockers!

2008-06-10 Thread Jesse Noller
I'll try to roll an updated patch with the review info tonight for you On Jun 10, 2008, at 7:26 PM, "Benjamin Peterson" <[EMAIL PROTECTED] > wrote: On Tue, Jun 10, 2008 at 6:23 PM, Barry Warsaw <[EMAIL PROTECTED]> wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Jun 9, 2008, at 6:33

Re: [Python-Dev] Nab those release blockers!

2008-06-10 Thread Benjamin Peterson
On Tue, Jun 10, 2008 at 6:23 PM, Barry Warsaw <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Jun 9, 2008, at 6:33 AM, Jesse Noller wrote: > >> For the multiprocessing module all I have left is the docs in rest format >> - given I'm a rest newbie, it's taking lon

Re: [Python-Dev] Nab those release blockers!

2008-06-10 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Jun 9, 2008, at 6:33 AM, Jesse Noller wrote: For the multiprocessing module all I have left is the docs in rest format - given I'm a rest newbie, it's taking longer than I thought It's okay if docs don't make it into the beta. That's the kind

[Python-Dev] PEP 371 trunk implementation

2008-06-10 Thread Jesse Noller
I've uploaded the first "rolled up" patch against trunk for PEP 371's implementation. This includes docs, tests, module, the works. The only outstanding issues with this are: * Had to comment out several unit tests due to threading._Event and multiprocessing Event API differences. * One test fail

[Python-Dev] bogus comment in Python.h

2008-06-10 Thread Doug Evans
I spent a bit of time trying to figure out what's going on here (was getting errors regarding missing uintptr_t while trying to compile an external module with Python 2.4). pyport.h now includes stdint.h but can we fix up this in Python.h? /* For uintptr_t, intptr_t */ #ifdef HAVE_STDDEF_H #includ

Re: [Python-Dev] Assignment to None

2008-06-10 Thread Georg Brandl
Thomas Lee schrieb: What happened in 3k? Were the constants in xmlrpclib renamed/removed? They were removed, as there is no way they can be accessed as attributes of a module now. Georg ___ Python-Dev mailing list Python-Dev@python.org http://mail.

[Python-Dev] Exception.__unicode__ and tp_unicode

2008-06-10 Thread Simon Cross
Originally Python exceptions had no __unicode__ method. In Python 2.5 __unicode__ was added. This led to "unicode(Exception)" failing and so the addition of __unicode__ was reverted [1]. This leaves Python 2.6 in a position where calls to "unicode(Exception(u'\xe1'))" fail as they are equivalent t

[Python-Dev] segfault in struct module

2008-06-10 Thread Jean-Paul Calderone
[EMAIL PROTECTED]:~$ ~/Projects/python/trunk/python Python 2.6a3+ (trunk:63964, Jun 5 2008, 16:49:12) [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import struct >>> struct.pack("357913941c", 'a') Seg

Re: [Python-Dev] asyncore patch

2008-06-10 Thread Josiah Carlson
On Tue, Jun 10, 2008 at 8:26 AM, Giampaolo Rodola' <[EMAIL PROTECTED]> wrote: > On 10 Giu, 07:01, "Josiah Carlson" <[EMAIL PROTECTED]> wrote: >> On Mon, Jun 9, 2008 at 7:19 PM, Benjamin Peterson >> >> <[EMAIL PROTECTED]> wrote: >> > On Mon, Jun 9, 2008 at 8:42 PM, Josiah Carlson <[EMAIL PROTECTED]>

Re: [Python-Dev] Assignment to None

2008-06-10 Thread Thomas Lee
Martin v. Löwis wrote: The question is, what is the specification for Python. Now, that's a more interesting question than the question originally asked (which I interpreted as "why does it work the way it works"). The only indication in the specification of that feature I could find was:

Re: [Python-Dev] asyncore patch

2008-06-10 Thread Giampaolo Rodola'
On 10 Giu, 07:01, "Josiah Carlson" <[EMAIL PROTECTED]> wrote: > On Mon, Jun 9, 2008 at 7:19 PM, Benjamin Peterson > > <[EMAIL PROTECTED]> wrote: > > On Mon, Jun 9, 2008 at 8:42 PM, Josiah Carlson <[EMAIL PROTECTED]> wrote: > > >> Would it be ok if I committed the changes?  Neal, do you want to > >>

Re: [Python-Dev] asyncore patch

2008-06-10 Thread Josiah Carlson
I'm working on it now. I'll do my best to have a fix by the time I go to work this morning. - Josiah On Tue, Jun 10, 2008 at 6:12 AM, Benjamin Peterson <[EMAIL PROTECTED]> wrote: > On Tue, Jun 10, 2008 at 8:10 AM, Barry Warsaw <[EMAIL PROTECTED]> wrote: >>> I don't want to be picky, but it seem

Re: [Python-Dev] asyncore patch

2008-06-10 Thread Benjamin Peterson
On Tue, Jun 10, 2008 at 8:10 AM, Barry Warsaw <[EMAIL PROTECTED]> wrote: >> I don't want to be picky, but it seems the commit broke the tests: >> >> test test_asyncore failed -- Traceback (most recent call last): >> File "/tmp/python-test/local/lib/python2.6/test/test_asyncore.py", line >> 387, in

Re: [Python-Dev] asyncore patch

2008-06-10 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Jun 10, 2008, at 9:08 AM, Georg Brandl wrote: Nick Coghlan schrieb: Josiah Carlson wrote: On Mon, Jun 9, 2008 at 7:19 PM, Benjamin Peterson <[EMAIL PROTECTED]> wrote: On Mon, Jun 9, 2008 at 8:42 PM, Josiah Carlson <[EMAIL PROTECTED] > wrote:

Re: [Python-Dev] asyncore patch

2008-06-10 Thread Georg Brandl
Nick Coghlan schrieb: Josiah Carlson wrote: On Mon, Jun 9, 2008 at 7:19 PM, Benjamin Peterson <[EMAIL PROTECTED]> wrote: On Mon, Jun 9, 2008 at 8:42 PM, Josiah Carlson <[EMAIL PROTECTED]> wrote: Would it be ok if I committed the changes? Neal, do you want to commit the changes if I post an up

Re: [Python-Dev] asyncore patch

2008-06-10 Thread Nick Coghlan
Josiah Carlson wrote: On Mon, Jun 9, 2008 at 7:19 PM, Benjamin Peterson <[EMAIL PROTECTED]> wrote: On Mon, Jun 9, 2008 at 8:42 PM, Josiah Carlson <[EMAIL PROTECTED]> wrote: Would it be ok if I committed the changes? Neal, do you want to commit the changes if I post an updated patch with a blur

Re: [Python-Dev] Tuple pack/unpack and the definition of AST Assign nodes

2008-06-10 Thread Nick Coghlan
Thomas Lee wrote: Nick Coghlan wrote: I haven't looked at that code recently, but I believe the ADSL sequence in the assignment node is for statements where there are actually multiple assignment targets, such as: >>> p = x, y = 1, 2 >>> p, x, y ((1, 2), 1, 2) Cheers, Nick. Ah I see. A q