Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Facundo Batista
2008/5/22 Facundo Batista <[EMAIL PROTECTED]>: > I couldn't answer why, so I'm asking here...Is it because the > reference counting will be complicated? Is it because it'd be > inefficient in other way? It's something else? Or is something that > could be done... but is not done yet? Thank you al

Re: [Python-Dev] Importing bsddb 4.6.21; with or without AES encryption?

2008-05-22 Thread Bill Janssen
> That's all fine, but then I'm missing the OpenSSL license and > attribution notice somewhere in the installer, the README of the > installation or elsewhere. Good point. We need this for both the ssl module and the hashlib module. Bill ___ Python-Dev

Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Greg Ewing
Facundo Batista wrote: A thread in PyAr raised the question that, considering that strings are immutable, why a slice of a string is a copy and not a reference to a part of that string. Because it would make it too easy to accidentally keep a large string alive via a reference to a small part

Re: [Python-Dev] Importing bsddb 4.6.21; with or without AES encryption?

2008-05-22 Thread M.-A. Lemburg
On 2008-05-20 00:46, Jesus Cea wrote: Trent Nelson wrote: | I downloaded the source that includes AES encryption, for no reason | other than it was first on the list. I'm now wondering if we should | only be importing the 'NC' source that doesn't contain any | encryption? Jesus, does pybsddb us

Re: [Python-Dev] buffer interface for C extensions

2008-05-22 Thread Dan Lenski
On Thu, 22 May 2008 23:10:09 +0200, M.-A. Lemburg wrote: > On 2008-05-19 00:59, Dan Lenski wrote: > You should probably ask such questions on the capi-sig list. > > To answer your question: > > t# requires support for the read-only 8-bit character buffer interface > s# can use the read buffer in

Re: [Python-Dev] Trying to understand svn history (was: Buildbots have trouble checking out the repository due to recent changes.)

2008-05-22 Thread Martin v. Löwis
>>From what I can see of the changes, you simply added a > Lib/lib-old/Queue.py in that revision - Lib/queue.py was already > there. But your description "Moved..." implies you did something > slightly different (and the text of your original message on this > thread suggests that you might have do

Re: [Python-Dev] Trying to understand svn history (was: Buildbots have trouble checking out the repository due to recent changes.)

2008-05-22 Thread Paul Moore
2008/5/22 Paul Moore <[EMAIL PROTECTED]>: > I know it's a while ago but can you recall exactly what you did? Or > can some svn guru tell me how to get svn to tell me exactly what > operations it believes went on? Never mind, I found out how to do this using svn dump. Paul. ___

Re: [Python-Dev] buffer interface for C extensions

2008-05-22 Thread M.-A. Lemburg
On 2008-05-19 00:59, Dan Lenski wrote: Hi all, I've written a small C extension to submit commands to SCSI devices via Linux's sg_io driver (for a camera hacking project). The extension is just a wrapper around a couple ioctl()'s with Pythonic exception handling thrown in. One of my extensi

Re: [Python-Dev] Addition of "pyprocessing" module to standard lib.

2008-05-22 Thread Martin v. Löwis
> % make > cc -c -DNDEBUG -O -I. -IInclude -I./Include -DPy_BUILD_CORE -o > Modules/python.o ./Modules/python.c > "/usr/include/sys/feature_tests.h", line 353: #error: "Compiler or > options invalid for pre-UNIX 03 X/Open applications and pre-2001 > POSIX applications" > cc: acomp failed for

[Python-Dev] Trying to understand svn history (was: Buildbots have trouble checking out the repository due to recent changes.)

2008-05-22 Thread Paul Moore
2008/5/12 Paul Moore <[EMAIL PROTECTED]>: > Revision 63129 is not valid on case folding filesystems. In > particular, this horribly breaks using hg-svn to make a local mirror > of the Python repository: I'm still trying to identify what breaks in converting svn to Mercurial at around the time of y

Re: [Python-Dev] Committing bsddb 4.6.4, and where can I put testsuite temp files?

2008-05-22 Thread Martin v. Löwis
> I would like to print the Berkeley DB release used, also. Could that be done at build time as well? Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailma

Re: [Python-Dev] Importing bsddb 4.6.21; with or without AES encryption?

2008-05-22 Thread Martin v. Löwis
> |> In any case, what would be the procedure to update the buildbot > |> infraestructure?. > | > | You need to import the sources into the Python subversion repository; > | I understand Trent was about to do that. > | > | Then you need to adjust Tools/msi/external.bat to have the slaves export > |

Re: [Python-Dev] Importing bsddb 4.6.21; with or without AES encryption?

2008-05-22 Thread Martin v. Löwis
> I guess we need first all buildbots updated to 4.7.25 before changing > the setup.py to support BDB 4.7, to avoid no updated ones linking > against (old) buggy 4.6 releases. Why do you think so? Updating all buildbots is not feasible, atleast not within this year. Some machines *intentionally*

Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Martin v. Löwis
> I couldn't answer why, so I'm asking here...Is it because the > reference counting will be complicated? Is it because it'd be > inefficient in other way? It's something else? Or is something that > could be done... but is not done yet? There are two problems with that approach: a) you may hold

Re: [Python-Dev] vmgen based python interpretter

2008-05-22 Thread Martin v. Löwis
> it would would also be helpfull if someone could tell me, how to locate the > code, which causes this SEG fault I think you already found the code; gdb tells you the exact location of the crash. What are the values of pool and bp? Regards, Martin ___

Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Stefan Behnel
Hi, Christian Heimes wrote: > Stefan Behnel wrote: >> Even worse, it's gone in Py3: > > No, it has been replaced by a better system. > > Try "memoryview" I know. We are already discussing the buffer protocol on the Cython list. http://comments.gmane.org/gmane.comp.python.cython.devel/1763?set_

Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Christian Heimes
Stefan Behnel schrieb: > Even worse, it's gone in Py3: No, it has been replaced by a better system. Try "memoryview" Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://ma

Re: [Python-Dev] Committing bsddb 4.6.4, and where can I put testsuite temp files?

2008-05-22 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gregory P. Smith wrote: | btw, I fixed the Lib/test/test_bsddb3.py file for the updated | Lib/bsddb/test/ modules. Thats how the test suite gets run by the | buildbots (run the test suite from a python trunk sandbox using | "./python Lib/test/regrtes

Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Stefan Behnel
Isaac Morland wrote: > On Thu, 22 May 2008, Christian Heimes wrote: > >> The buffer interface was designed for the slice-as-copy use case: >> > a = "abcdefg" > b = buffer(a, 2, 3) > b >> > str(b) >> 'cde' > [] > > This answers my musing about shared slices. But it points me

Re: [Python-Dev] Importing bsddb 4.6.21; with or without AES encryption?

2008-05-22 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin v. Löwis wrote: |> In any case, what would be the procedure to update the buildbot |> infraestructure?. | | You need to import the sources into the Python subversion repository; | I understand Trent was about to do that. | | Then you need to ad

Re: [Python-Dev] Importing bsddb 4.6.21; with or without AES encryption?

2008-05-22 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gregory P. Smith wrote: | On Wed, May 21, 2008 at 5:12 PM, Trent Nelson <[EMAIL PROTECTED]> wrote: |>> Trent Nelson wrote: |>> | Gah. I just went and visited the Berkeley DB download site as |>> | I was preparing my commit message so I could refer to

Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Isaac Morland
On Thu, 22 May 2008, Christian Heimes wrote: The buffer interface was designed for the slice-as-copy use case: a = "abcdefg" b = buffer(a, 2, 3) b str(b) 'cde' [] This answers my musing about shared slices. But it points me at another question: why is buffer() listed in "Non-essent

Re: [Python-Dev] Importing bsddb 4.6.21; with or without AES encryption?

2008-05-22 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Trent Nelson wrote: |> It is not clear to me that python 2.6/3.0 will be published with BDB 4.6 |> or 4.7 support. 4.6 has several known issues, apparently solved in 4.7. | | I could have sworn I heard a few people mention that "4.5 has issues, |

Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Guido van Rossum
On Thu, May 22, 2008 at 10:01 AM, Aahz <[EMAIL PROTECTED]> wrote: > On Thu, May 22, 2008, Facundo Batista wrote: >> >> A thread in PyAr raised the question that, considering that strings >> are immutable, why a slice of a string is a copy and not a reference >> to a part of that string. > > Someone

Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Christian Heimes
Facundo Batista schrieb: > Hi! > > A thread in PyAr raised the question that, considering that strings > are immutable, why a slice of a string is a copy and not a reference > to a part of that string. Because the reference approach is more complicated, harder to implement and may lead to unexpec

Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Aahz
On Thu, May 22, 2008, Facundo Batista wrote: > > A thread in PyAr raised the question that, considering that strings > are immutable, why a slice of a string is a copy and not a reference > to a part of that string. Someone did a patch for this at one point, but I don't remember what happened. --

Re: [Python-Dev] Importing bsddb 4.6.21; with or without AES encryption?

2008-05-22 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Trent Nelson wrote: | Indeed. Where do we stand with regards to svn commit e-mails | being sent for 'external'? DB 4.6 is ~16MB... I just committed bsddb3 4.7.0. Please install Berkeley DB >=4.7.25. - -- Jesus Cea Avion _/_

Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Facundo Batista
2008/5/22 Isaac Morland <[EMAIL PROTECTED]>: > By contrast, the worst that can happen with no sharing is that performance > and memory use is what you expect - the only "bad" is the apparent missed > opportunity for optimization. Exactly, "apparent". Also, this could be handled like a "good writ

Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Facundo Batista
2008/5/22 Scott Dial <[EMAIL PROTECTED]>: > If we changed Python to slice-by-reference, then tomorrow someone would be > asking why it isn't slice-by-copy. There are pros and cons to both that are Which are the cons of slice-by-reference of an immutable string? > dependent on your application.

Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Isaac Morland
On Thu, 22 May 2008, Gary Herron wrote: In fact, a slice is *not* always a copy! In at least some (simple) cases, a slice references the original string: s = 'abc' t = s[:] s is t True id(s) 3081872000L id(t) 3081872000L I think the more interesting case is where the string objects ar

Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Facundo Batista
2008/5/22 Oleg Broytmann <[EMAIL PROTECTED]>: > I remember some discussions... let me see... google to help... aha: > > http://mail.python.org/pipermail/python-3000/2006-August/003224.html > http://mail.python.org/pipermail/python-3000/2006-August/003242.html These descussions are too general,

Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Scott Dial
Facundo Batista wrote: I couldn't answer why, so I'm asking here...Is it because the reference counting will be complicated? Is it because it'd be inefficient in other way? It's something else? Or is something that could be done... but is not done yet? If we changed Python to slice-by-referenc

Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Gary Herron
Facundo Batista wrote: Hi! A thread in PyAr raised the question that, considering that strings are immutable, why a slice of a string is a copy and not a reference to a part of that string. I couldn't answer why, so I'm asking here...Is it because the reference counting will be complicated? Is

Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Oleg Broytmann
On Thu, May 22, 2008 at 12:28:47PM -0300, Facundo Batista wrote: > considering that strings > are immutable, why a slice of a string is a copy and not a reference > to a part of that string. I remember some discussions... let me see... google to help... aha: http://mail.python.org/pipermail/py

[Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Facundo Batista
Hi! A thread in PyAr raised the question that, considering that strings are immutable, why a slice of a string is a copy and not a reference to a part of that string. I couldn't answer why, so I'm asking here...Is it because the reference counting will be complicated? Is it because it'd be ineffi

Re: [Python-Dev] Importing bsddb 4.6.21; with or without AES encryption?

2008-05-22 Thread Trent Nelson
> > In any case, what would be the procedure to update the buildbot > > infraestructure?. > You need to import the sources into the Python subversion repository; > I understand Trent was about to do that. Indeed. Where do we stand with regards to svn commit e-mails being sent for 'external'? D

Re: [Python-Dev] Issue 643841: Including a new-style proxy base class in 2.6/3.0

2008-05-22 Thread Nick Coghlan
Fred Drake wrote: On May 21, 2008, at 5:41 AM, Nick Coghlan wrote: While a proxy class written in C would no doubt be faster than one written in Python, one of the things I'm hoping to achieve is for the stdlib generic proxy to serve as an example for people writing their own new-style proxy c

[Python-Dev] vmgen based python interpretter

2008-05-22 Thread Michal Revucky
hello everyone, i'm working on the branch: http://svn.python.org/projects/python/branches/release25-maint/ i'm trying to build a vmgen based interpreter for python: http://www.complang.tuwien.ac.at/anton/vmgen from vmgen's input file, which specifies the python's opcodes a c source is generate

Re: [Python-Dev] Addition of "pyprocessing" module to standard lib.

2008-05-22 Thread Leif Walsh
On Thu, 22 May 2008, "Martin v. Löwis" wrote: > > I would say that writing portable C code is hard as well, aren't there > > just more tools that help? > > The C compiler in particular. It already gets symbolic constants and > struct layouts right, something that ctypes can't do (because it doesn't

Re: [Python-Dev] Addition of "pyprocessing" module to standard lib.

2008-05-22 Thread Martin v. Löwis
>> Writing portable ctypes modules is really hard - significantly harder >> than writing portable C code (although writing non-portable ctypes >> code is apparently easier than writing non-portable C code). > > I would say that writing portable C code is hard as well, aren't there > just more tool