Re: [Python-Dev] Continuing 2.x

2010-10-27 Thread Georg Brandl
Am 28.10.2010 06:13, schrieb Daniel Stutzbach: > 2010/10/27 Kristján Valur Jónsson > > > Firstly, the ease of integrating changes. It would be possible to port > those bugfixes that release-27 gets, and also backport selected things > from > py3k using

[Python-Dev] http://bugs.python.org/issue9981

2010-10-27 Thread Kristján Valur Jónsson
I didn't get any response to this. I know that it is a 2.7 patch, but I´m willing to port it to 3.x, if there is interest. Supporting parallel compilation is a big win. K ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/l

Re: [Python-Dev] Continuing 2.x

2010-10-27 Thread Stephen J. Turnbull
Kristján Valur Jónsson writes: > Second, it would be an official nod from the python community that, > yes, we are not actively developing 2.x anymore, we want to focus > on 3.x but we acknowledge that there are members of our community > that cannot, for various reasons, move to 3.x, but stil

Re: [Python-Dev] Continuing 2.x

2010-10-27 Thread Daniel Stutzbach
2010/10/27 Kristján Valur Jónsson > Firstly, the ease of integrating changes. It would be possible to port > those bugfixes that release-27 gets, and also backport selected things from > py3k using the tools already in place such as svnmerge. > py3k will soon be moving to Mercurial, so svnmerge

Re: [Python-Dev] Continuing 2.x

2010-10-27 Thread Benjamin Peterson
2010/10/27 Kristján Valur Jónsson : > Firstly, the ease of integrating changes.  It would be possible to port > those bugfixes that release-27 gets, and also backport selected things from > py3k using the tools already in place such as svnmerge. svn lets you merge across repos, I believe. > > Seco

Re: [Python-Dev] Continuing 2.x

2010-10-27 Thread Kristján Valur Jónsson
Firstly, the ease of integrating changes. It would be possible to port those bugfixes that release-27 gets, and also backport selected things from py3k using the tools already in place such as svnmerge. Second, it would be an official nod from the python community that, yes, we are not actively

Re: [Python-Dev] Continuing 2.x

2010-10-27 Thread James Y Knight
On Oct 27, 2010, at 10:22 PM, Kristján Valur Jónsson wrote: > Hello all. > > So, python 2.7 is in bugfix only mode. ‘trunk’ is off limit. So, where does > one make improvements to the distinguished, and still very much alive, 2.x > series of Python? > The answer would seem to be “one doesn’

Re: [Python-Dev] Continuing 2.x

2010-10-27 Thread Daniel Stutzbach
2010/10/27 Kristján Valur Jónsson > Svn.python.org already plays host to some other, less official, projects > such as stackless, so why not this? > What are the benefits of hosting such a project on svn.python.org instead of somewhere else? (such as GitHub or BitBucket) -- Daniel Stutzbach, P

Re: [Python-Dev] Continuing 2.x

2010-10-27 Thread Brian Curtin
2010/10/27 Kristján Valur Jónsson > > So, here is my suggestion: > > Let’s move the current ‘trunk’ into /branches/afterlife-27. Open it for > submissions from people such as myself that use 2.7 on a regular basis and > are willing to give it some extra love. Host it there without the usual > s

[Python-Dev] Continuing 2.x

2010-10-27 Thread Kristján Valur Jónsson
Hello all. So, python 2.7 is in bugfix only mode. 'trunk' is off limit. So, where does one make improvements to the distinguished, and still very much alive, 2.x series of Python? The answer would seem to be "one doesn't". But must it be that way? When Morris stopped producing the Oxford III

Re: [Python-Dev] MemoryError... how much memory?

2010-10-27 Thread Nick Coghlan
On Thu, Oct 28, 2010 at 8:00 AM, Ben Finney wrote: > Facundo Batista writes: > >> On Wed, Oct 27, 2010 at 12:05 PM, Benjamin Peterson >> wrote: >> >> > Isn't this usually when you do something like [None]*2**300? In that >> > case, wouldn't you know how much memory you're requesting? >> >> It c

Re: [Python-Dev] MemoryError... how much memory?

2010-10-27 Thread Ben Finney
Facundo Batista writes: > On Wed, Oct 27, 2010 at 12:05 PM, Benjamin Peterson > wrote: > > > Isn't this usually when you do something like [None]*2**300? In that > > case, wouldn't you know how much memory you're requesting? > > It could happen on any malloc. It depends on how much you have fre

Re: [Python-Dev] MemoryError... how much memory?

2010-10-27 Thread exarkun
On 07:09 pm, facundobati...@gmail.com wrote: On Wed, Oct 27, 2010 at 12:05 PM, Benjamin Peterson wrote: Isn't this usually when you do something like [None]*2**300? In that case, wouldn't you know how much memory you're requesting? It could happen on any malloc. It depends on how much you hav

Re: [Python-Dev] MemoryError... how much memory?

2010-10-27 Thread Facundo Batista
On Wed, Oct 27, 2010 at 12:05 PM, Benjamin Peterson wrote: > Isn't this usually when you do something like [None]*2**300? In that > case, wouldn't you know how much memory you're requesting? It could happen on any malloc. It depends on how much you have free. Don't think on getting a MemoryErro

Re: [Python-Dev] Fixing zipfile.BadZipfile to zipfile.BadZipFile

2010-10-27 Thread Éric Araujo
> From: *Boštjan Mejak* > Since Python 3.2 accepts feature requests, take this fix as a feature > request. Please forget about preserving the compatibility with old pickles. You can reopen #7351 as a feature request for 3.2. A serious proposal has to take compatibility into account, note. It is

[Python-Dev] Fwd: Fixing zipfile.BadZipfile to zipfile.BadZipFile

2010-10-27 Thread Boštjan Mejak
Forwarded conversation Subject: Fixing zipfile.BadZipfile to zipfile.BadZipFile From: *Boštjan Mejak* Date: Fri, Oct 15, 2010 at 11:02 PM To: python-dev@python.org I am very glad you're reorganizing the Standard Library. Thumbs up! I hope everything will comply to PEP 8

Re: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

2010-10-27 Thread R. David Murray
On Tue, 26 Oct 2010 23:37:10 -0400, Barry Warsaw wrote: > On Oct 26, 2010, at 09:54 PM, Antoine Pitrou wrote: > >I think it comes down to the preference of whoever works the most > >actively on it. Michael is the most active contributor to unittest by > >far, and I suppose he prefers it to be spli

Re: [Python-Dev] new buffer in python2.7

2010-10-27 Thread Kristján Valur Jónsson
Not cheap enough. There is no reason why creating another memoryview shouldn't be as cheap as creating a string slice. I'm investigating why. K -Original Message- From: python-dev-bounces+kristjan=ccpgames@python.org [mailto:python-dev-bounces+kristjan=ccpgames@python.org] O

Re: [Python-Dev] new buffer in python2.7

2010-10-27 Thread Kristján Valur Jónsson
Sorry, here the tables properly formatted: Function Name Inclusive Samples Exclusive Samples Inclusive Samples % Exclusive Samples % apply_slice 8.997 468 62,23 3,24 _PyObject_GetItem 6.257 400 43,28 2,77 memory_subscript 5.857 1.051 40,51 7,27 _PyMemoryVi

Re: [Python-Dev] new buffer in python2.7

2010-10-27 Thread Kristján Valur Jónsson
So, I did some profiling. It turns out that the difference is not due to the creation of the MemoryView object as such, but the much more complicated slice handling for generic objects. Here is the interesting part of the inclusive sample measurements for the MemoryView: Function Name Inclusi

Re: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

2010-10-27 Thread Ron Adam
On 10/27/2010 08:51 AM, Nick Coghlan wrote: On Wed, Oct 27, 2010 at 2:33 PM, Ron Adam wrote: I still would like to know what your thoughts are concerning where to put, and/or how to package, the simple threaded text server? Given the time frame until beta 1, I'd suggest leaving it in pydoc

Re: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

2010-10-27 Thread Nick Coghlan
On Wed, Oct 27, 2010 at 2:33 PM, Ron Adam wrote: > I still would like to know what your thoughts are concerning where to put, > and/or how to package, the simple threaded text server? Given the time frame until beta 1, I'd suggest leaving it in pydoc for now. We can look at possibly documenting i

[Python-Dev] MemoryError... how much memory?

2010-10-27 Thread Facundo Batista
There are a lot of places where Python or modules do something like: self->buf = (char *)malloc(size); if (!self->buf) { PyErr_SetString(PyExc_MemoryError, "out of memory"); At job, we're having some MemoryErrors, and one thing that we would love to know, if how much memory

Re: [Python-Dev] Misc/python-mode.el (was Re: r85838 - python/branches/py3k/.gitignore)

2010-10-27 Thread Barry Warsaw
On Oct 27, 2010, at 02:54 PM, Éric Araujo wrote: >I remember a discussion about Vim files some time ago. I use Vim with >the files from Misc/Vim, which are up-to-date and more useful than the >files shipped with Vim. I don’t use plugins or external files, so I’m >-1 on removing Misc/Vim. FWIW,

Re: [Python-Dev] Misc/python-mode.el (was Re: r85838 - python/branches/py3k/.gitignore)

2010-10-27 Thread Éric Araujo
I remember a discussion about Vim files some time ago. I use Vim with the files from Misc/Vim, which are up-to-date and more useful than the files shipped with Vim. I don’t use plugins or external files, so I’m -1 on removing Misc/Vim. Regards ___ Pyt

Re: [Python-Dev] Misc/python-mode.el (was Re: r85838 - python/branches/py3k/.gitignore)

2010-10-27 Thread Benjamin Peterson
2010/10/27 Barry Warsaw : > On Oct 27, 2010, at 03:54 AM, Scott Dial wrote: > >>As with others, I don't see the harm in committers who use those tools >>adding and maintaining these files. Seems akin to having >>Misc/python-mode.el and Misc/Vim/python.vim. It's all in the spirit of >>supporting the

Re: [Python-Dev] new buffer in python2.7

2010-10-27 Thread Antoine Pitrou
On Wed, 27 Oct 2010 20:00:10 +0800 Kristján Valur Jónsson wrote: > Calling getbuffer on a bytearray or a bytes object should > be really cheap, so I still don't accept this as a matter of fact > situation. It *is* cheap. It's just that copying a short slice is dirt cheap as well. Of course, it y

Re: [Python-Dev] Issue 10194 - Adding a gc.remap() function

2010-10-27 Thread exarkun
On 26 Oct, 11:31 pm, pinge...@yahoo.com wrote: --- On Tue, 10/26/10, exar...@twistedmatrix.com wrote: This can be implemented with ctypes right now (I half did it several years ago). Jean-Paul Is there a trick to doing it this way, or are you suggesting building a ctypes wrapper for each C t

Re: [Python-Dev] new buffer in python2.7

2010-10-27 Thread Kristján Valur Jónsson
Ah, well in 2.7 you don't have the luxury of a bytes object. A str() would be similar in 2.7 Anyway, isn't the "bytes" object immutable? In that case, it is not a useful target for a sock.recv_into() call. Calling getbuffer on a bytearray or a bytes object should be really cheap, so I still don

[Python-Dev] Misc/python-mode.el (was Re: r85838 - python/branches/py3k/.gitignore)

2010-10-27 Thread Barry Warsaw
On Oct 27, 2010, at 03:54 AM, Scott Dial wrote: >As with others, I don't see the harm in committers who use those tools >adding and maintaining these files. Seems akin to having >Misc/python-mode.el and Misc/Vim/python.vim. It's all in the spirit of >supporting the tools that people are actually u

Re: [Python-Dev] new buffer in python2.7

2010-10-27 Thread Antoine Pitrou
> >Here are micro-benchmarks under 3.2: > > > $ ./python -m timeit -s "x = b'x'*1" "x[:100]" > > 1000 loops, best of 3: 0.134 usec per loop > > $ ./python -m timeit -s "x = memoryview(b'x'*1)" "x[:100]" > > 1000 loops, best of 3: 0.151 usec per loop > > That's weird. The greedy

Re: [Python-Dev] new buffer in python2.7

2010-10-27 Thread Kristján Valur Jónsson
-Original Message- From: python-dev-bounces+kristjan=ccpgames@python.org [mailto:python-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of Antoine Pitrou Sent: Wednesday, October 27, 2010 18:36 >Here are micro-benchmarks under 3.2: > $ ./python -m timeit -s "x = b'x'*1000

Re: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

2010-10-27 Thread Antoine Pitrou
On Tue, 26 Oct 2010 22:06:37 -0400 Alexander Belopolsky wrote: > > While I appreciate your and Michael's eloquence, I don't really see > why five 400-line modules are necessarily easier to maintain than one > 2000-line module. Splitting code into modules is certainly a good > thing when the resu

Re: [Python-Dev] new buffer in python2.7

2010-10-27 Thread Antoine Pitrou
On Wed, 27 Oct 2010 10:13:12 +0800 Kristján Valur Jónsson wrote: > Although 2.7 has the new buffer interface and memoryview > objects, these are widely not accepted in the built in modules. That's true, and slightly unfortunate. It could be a reason for switching to 3.1/3.2 :-) > IMHO this is un

Re: [Python-Dev] r85838 - python/branches/py3k/.gitignore

2010-10-27 Thread Georg Brandl
Am 27.10.2010 09:25, schrieb anatoly techtonik: > On Tue, Oct 26, 2010 at 3:51 PM, Barry Warsaw wrote: >> On Oct 26, 2010, at 09:19 PM, Nick Coghlan wrote: >> >>>On Tue, Oct 26, 2010 at 5:31 PM, Georg Brandl wrote: This looks more like "Add gitignore". Do we really want to check in ign

Re: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

2010-10-27 Thread Raymond Hettinger
On Oct 26, 2010, at 8:37 PM, Barry Warsaw wrote: > If done well, a split can help improve the readability and discoverability of > the code. No doubt that is true. The problem is that splitting can also impair discoverability. When unittest was in one file, you knew the filename was unittest

Re: [Python-Dev] Issue 10194 - Adding a gc.remap() function

2010-10-27 Thread Hrvoje Niksic
On 10/26/2010 07:11 PM, Peter Ingebretson wrote: The main argument is that preserving immutable objects increases the complexity of remapping and does not actually solve many problems. The primary reason for objects to be immutable is so that their comparison operators and hash value can remain c

Re: [Python-Dev] r85838 - python/branches/py3k/.gitignore

2010-10-27 Thread Scott Dial
On 10/27/2010 3:25 AM, anatoly techtonik wrote: > On Tue, Oct 26, 2010 at 3:51 PM, Barry Warsaw wrote: >> On Oct 26, 2010, at 09:19 PM, Nick Coghlan wrote: >> >>> On Tue, Oct 26, 2010 at 5:31 PM, Georg Brandl wrote: This looks more like "Add gitignore". Do we really want to check in ig

Re: [Python-Dev] new buffer in python2.7

2010-10-27 Thread Ulrich Eckhardt
On Wednesday 27 October 2010, Kristján Valur Jónsson wrote: > Although 2.7 has the new buffer interface and memoryview objects, these are > widely not accepted in the built in modules. Examples are the structmodule, > some of the socketmodule apis, structmodule, etc. > > IMHO this is unfortunate.

Re: [Python-Dev] r85838 - python/branches/py3k/.gitignore

2010-10-27 Thread anatoly techtonik
On Tue, Oct 26, 2010 at 3:51 PM, Barry Warsaw wrote: > On Oct 26, 2010, at 09:19 PM, Nick Coghlan wrote: > >>On Tue, Oct 26, 2010 at 5:31 PM, Georg Brandl wrote: >>> This looks more like "Add gitignore".  Do we really want to check in >>> ignore files for every possible DVCS? >> >>No, but support