Re: [Python-Dev] Fast Implementation for ZIP decryption

2009-08-30 Thread Gregory P. Smith
On Sun, Aug 30, 2009 at 10:40 PM, Jeroen Ruigrok van der Werven < asmo...@in-nomine.org> wrote: > -On [20090831 06:29], Collin Winter (coll...@gmail.com) wrote: > >Are there any applications/frameworks which have zip files on their > >critical path, where this kind of (admittedly impressive) speed

Re: [Python-Dev] how important is setting co_filename for a module being imported to what __file__ is set to?

2009-08-30 Thread Brett Cannon
On Sun, Aug 30, 2009 at 19:51, Benjamin Peterson wrote: > 2009/8/30 Brett Cannon : >> On Sun, Aug 30, 2009 at 19:34, Guido van Rossum wrote: >>> On Sun, Aug 30, 2009 at 5:34 PM, Brett Cannon wrote: On Sun, Aug 30, 2009 at 17:24, Guido van Rossum wrote: > (I was going to comment on the exec

Re: [Python-Dev] Fast Implementation for ZIP decryption

2009-08-30 Thread Jeroen Ruigrok van der Werven
-On [20090831 06:29], Collin Winter (coll...@gmail.com) wrote: >Are there any applications/frameworks which have zip files on their >critical path, where this kind of (admittedly impressive) speedup >would be beneficial? What was the motivation for writing the C >version? Would zipped eggs count?

Re: [Python-Dev] Fast Implementation for ZIP decryption

2009-08-30 Thread Collin Winter
On Sun, Aug 30, 2009 at 7:34 AM, Shashank Singh wrote: > just to give you an idea of the speed up: > > a 3.3 mb zip file extracted using the current all-python implementation on > my machine (win xp 1.67Ghz 1.5GB) > takes approximately 38 seconds. > > the same file when extracted using c implementa

Re: [Python-Dev] how important is setting co_filename for a module being imported to what __file__ is set to?

2009-08-30 Thread Glyph Lefkowitz
On Sun, Aug 30, 2009 at 8:26 PM, Guido van Rossum wrote: > On Sun, Aug 30, 2009 at 5:23 PM, Brett Cannon wrote: > > Right; the code object would think it was loaded from the original > > location it was created at instead of where it actually is. Now why > > someone would want to move their .pyc

Re: [Python-Dev] how important is setting co_filename for a module being imported to what __file__ is set to?

2009-08-30 Thread Benjamin Peterson
2009/8/30 Brett Cannon : > On Sun, Aug 30, 2009 at 19:34, Guido van Rossum wrote: >> On Sun, Aug 30, 2009 at 5:34 PM, Brett Cannon wrote: >>> On Sun, Aug 30, 2009 at 17:24, Guido van Rossum wrote: (I was going to comment on the execution bit issue but I realized I'm not even sure if you'r

Re: [Python-Dev] how important is setting co_filename for a module being imported to what __file__ is set to?

2009-08-30 Thread Brett Cannon
On Sun, Aug 30, 2009 at 19:34, Guido van Rossum wrote: > On Sun, Aug 30, 2009 at 5:34 PM, Brett Cannon wrote: >> On Sun, Aug 30, 2009 at 17:24, Guido van Rossum wrote: >>> On Sun, Aug 30, 2009 at 4:28 PM, Brett Cannon wrote: I am going through and running the entire test suite using importlib

Re: [Python-Dev] how important is setting co_filename for a module being imported to what __file__ is set to?

2009-08-30 Thread Guido van Rossum
On Sun, Aug 30, 2009 at 5:34 PM, Brett Cannon wrote: > On Sun, Aug 30, 2009 at 17:24, Guido van Rossum wrote: >> On Sun, Aug 30, 2009 at 4:28 PM, Brett Cannon wrote: >>> I am going through and running the entire test suite using importlib >>> to ferret out incompatibilities. I have found a bunch, a

Re: [Python-Dev] how important is setting co_filename for a module being imported to what __file__ is set to?

2009-08-30 Thread Brett Cannon
On Sun, Aug 30, 2009 at 17:24, Guido van Rossum wrote: > On Sun, Aug 30, 2009 at 4:28 PM, Brett Cannon wrote: >> I am going through and running the entire test suite using importlib >> to ferret out incompatibilities. I have found a bunch, although all >> rather minor (raising a different exception

Re: [Python-Dev] how important is setting co_filename for a module being imported to what __file__ is set to?

2009-08-30 Thread Guido van Rossum
On Sun, Aug 30, 2009 at 5:23 PM, Brett Cannon wrote: > Right; the code object would think it was loaded from the original > location it was created at instead of where it actually is. Now why > someone would want to move their .pyc files around instead of > recompiling I don't know short of not wan

Re: [Python-Dev] how important is setting co_filename for a module being imported to what __file__ is set to?

2009-08-30 Thread Guido van Rossum
On Sun, Aug 30, 2009 at 4:28 PM, Brett Cannon wrote: > I am going through and running the entire test suite using importlib > to ferret out incompatibilities. I have found a bunch, although all > rather minor (raising a different exception typically; not even sure > they are worth backporting as an

Re: [Python-Dev] how important is setting co_filename for a module being imported to what __file__ is set to?

2009-08-30 Thread Brett Cannon
On Sun, Aug 30, 2009 at 17:13, Robert Collins wrote: > On Sun, 2009-08-30 at 16:28 -0700, Brett Cannon wrote: >> >> >> My question is how important is this functionality? Do I really need >> to go through and add an argument to marshal.loads or some new >> function just to set co_filename to someth

Re: [Python-Dev] how important is setting co_filename for a module being imported to what __file__ is set to?

2009-08-30 Thread Robert Collins
On Sun, 2009-08-30 at 16:28 -0700, Brett Cannon wrote: > > > My question is how important is this functionality? Do I really need > to go through and add an argument to marshal.loads or some new > function just to set co_filename to something that someone explicitly > set in a .pyc file? Or I can

[Python-Dev] how important is setting co_filename for a module being imported to what __file__ is set to?

2009-08-30 Thread Brett Cannon
I am going through and running the entire test suite using importlib to ferret out incompatibilities. I have found a bunch, although all rather minor (raising a different exception typically; not even sure they are worth backporting as anyone reliant on the old exceptions might get a nasty surprise

Re: [Python-Dev] Fast Implementation for ZIP decryption

2009-08-30 Thread Nick Coghlan
exar...@twistedmatrix.com wrote: > Given that the use case is "protect my biology homework from my little > brother", how fast does the implementation really need to be? Is > speeding it up from 0.1 seconds to 0.001 seconds worth the potential new > problems that come with more C code (more code t

Re: [Python-Dev] Mercurial migration: help needed

2009-08-30 Thread Martin Geisler
"Martin v. Löwis" writes: >> So the extension should do that: either abort commits with the wrong >> EOL markers or do as Subversion and automatically convert the file in >> the working copy. > > Maybe I misunderstand: when people use the extension, they cannot > possibly make mistakes, right? Be

Re: [Python-Dev] Mercurial migration: help needed

2009-08-30 Thread Martin v. Löwis
> I suggested a new extension for two reasons: > > * I'm using Linux, and I mentally skip over all extensions that mention > "win32"... I guess others do the same, and in this case it's really a > shame since converting EOL markers is a cross-platform problem: if > someone creates a reposito

Re: [Python-Dev] Fast Implementation for ZIP decryption

2009-08-30 Thread Ludvig Ericson
On 30 aug 2009, at 16:34, Shashank Singh wrote: just to give you an idea of the speed up: a 3.3 mb zip file extracted using the current all-python implementation on my machine (win xp 1.67Ghz 1.5GB) takes approximately 38 seconds. the same file when extracted using c implementation takes 0.4

Re: [Python-Dev] Fast Implementation for ZIP decryption

2009-08-30 Thread Shashank Singh
just to give you an idea of the speed up: a 3.3 mb zip file extracted using the current all-python implementation on my machine (win xp 1.67Ghz 1.5GB) takes approximately 38 seconds. the same file when extracted using c implementation takes 0.4 seconds. --shashank On Sun, Aug 30, 2009 at 6:35 P

Re: [Python-Dev] Fast Implementation for ZIP decryption

2009-08-30 Thread exarkun
On 12:59 pm, st...@pearwood.info wrote: On Sun, 30 Aug 2009 06:55:33 pm Martin v. L�wis wrote: > Does it sound worthy enough to create a patch for and integrate > into python itself? Probably not, given that people think that the algorithm itself is fairly useless. I would think that for most

Re: [Python-Dev] Mercurial migration: help needed

2009-08-30 Thread Martin Geisler
Mark Hammond writes: > 1) I've stalled on the 'none:' patch I promised to resurrect. While > doing this, I re-discovered that the tests for win32text appear to > check win32 line endings are used by win32text on *all* platforms, not > just Windows. I think it is only Patrick Mezard who knows ho

Re: [Python-Dev] Fast Implementation for ZIP decryption

2009-08-30 Thread Steven D'Aprano
On Sun, 30 Aug 2009 06:55:33 pm Martin v. Löwis wrote: > > Does it sound worthy enough to create a patch for and integrate > > into python itself? > > Probably not, given that people think that the algorithm itself is > fairly useless. I would think that for most people, the threat model isn't "th

Re: [Python-Dev] Fast Implementation for ZIP decryption

2009-08-30 Thread Martin v. Löwis
> Does it sound worthy enough to create a patch for and integrate into > python itself? Probably not, given that people think that the algorithm itself is fairly useless. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.pyth