Re: [Python-Dev] Issue #11051: system calls per import

2011-02-03 Thread Rian Hunter
Hello Speaking from experience from my observations on millions of machines the stat() call is *very slow* when compared to readdir(), FindNextFile(), getdirentriesattr(), etc. When we switched from a file system indexer that stat()ed every file to one that read directories we noticed an averag

Re: [Python-Dev] [Python-checkins] r88331 - in python/branches/py3k/Doc/howto: index.rst pyporting.rst

2011-02-03 Thread Brett Cannon
On Thu, Feb 3, 2011 at 15:10, Nick Coghlan wrote: > On Fri, Feb 4, 2011 at 8:01 AM, brett.cannon > wrote: >> +Stop Using :mod:`doctest` >> +' >> +While 2to3 tries to port doctests properly, it's a rather tough thing to >> do. It >> +is probably best to simply convert you

Re: [Python-Dev] [Python-checkins] r88331 - in python/branches/py3k/Doc/howto: index.rst pyporting.rst

2011-02-03 Thread Steven D'Aprano
Nick Coghlan wrote: On Fri, Feb 4, 2011 at 8:01 AM, brett.cannon wrote: +Capturing the Currently Raised Exception + +One change between Python 2 and 3 that will require changing how you code is +accessing the currently raised exception. In Python 2 the s

Re: [Python-Dev] [Python-checkins] r88331 - in python/branches/py3k/Doc/howto: index.rst pyporting.rst

2011-02-03 Thread Nick Coghlan
On Fri, Feb 4, 2011 at 8:01 AM, brett.cannon wrote: > +Stop Using :mod:`doctest` > +' > +While 2to3 tries to port doctests properly, it's a rather tough thing to do. > It > +is probably best to simply convert your critical doctests to :mod:`unittest`. This advice strikes

Re: [Python-Dev] [Python-checkins] r88331 - in python/branches/py3k/Doc/howto: index.rst pyporting.rst

2011-02-03 Thread Nick Coghlan
On Fri, Feb 4, 2011 at 8:01 AM, brett.cannon wrote: > +Capturing the Currently Raised Exception > + > +One change between Python 2 and 3 that will require changing how you code is > +accessing the currently raised exception.  In Python 2 the syntax to access

Re: [Python-Dev] Py_tp_getset in ABI?

2011-02-03 Thread Georg Brandl
Am 03.02.2011 22:46, schrieb "Martin v. Löwis": > Am 03.02.2011 16:43, schrieb Egon Smiwa: >> Hi all, >> I'm trying to convert my embedding code to your new ABI, >> but I cannot find the ABI slot for tp_getset in typeslots.h >> (while tp_methods are supported). Is the support of tp_getset >> not ye

Re: [Python-Dev] Python merge module

2011-02-03 Thread Hoyt, David
> Can you please cite a source for that recommendation? Preferably > some MSDN documentation. http://msdn.microsoft.com/en-us/library/aa368269(v=vs.85).aspx http://wix.sourceforge.net/manual-wix3/add_a_file.htm Specifically, starting in bold, where it says "In general, you should restrict yours

Re: [Python-Dev] Py_tp_getset in ABI?

2011-02-03 Thread Martin v. Löwis
Am 03.02.2011 16:43, schrieb Egon Smiwa: > Hi all, > I'm trying to convert my embedding code to your new ABI, > but I cannot find the ABI slot for tp_getset in typeslots.h > (while tp_methods are supported). Is the support of tp_getset > not yet determined? Not sure what I thought - it seems that

Re: [Python-Dev] Python merge module

2011-02-03 Thread Martin v. Löwis
> The general recommendation regarding msi packages is that you always, > always do single-file components (one of the major reasons being for > patching purposes). Can you please cite a source for that recommendation? Preferably some MSDN documentation. Regards, Martin __

Re: [Python-Dev] News of the faulthandler project

2011-02-03 Thread Antoine Pitrou
On Thu, 03 Feb 2011 21:52:40 +0100 Victor Stinner wrote: > Le jeudi 03 février 2011 à 12:22 -0500, Reid Kleckner a écrit : > > On Thu, Feb 3, 2011 at 8:05 AM, Victor Stinner > > wrote: > > > - SIGABRT is not handled > > > > Why not? > > Just because I forgot to handle it. But I don't know if i

Re: [Python-Dev] Python merge module

2011-02-03 Thread Martin v. Löwis
Am 03.02.2011 18:58, schrieb Floris Bruynooghe: > On 3 February 2011 15:38, Michael Urman wrote: >> Technically this is a problem with the component generation in Python, >> and for that in particular, a move to WiX could be very helpful. They >> have stable component code generation which keys of

Re: [Python-Dev] Python merge module

2011-02-03 Thread Martin v. Löwis
> Technically this is a problem with the component generation in Python, > and for that in particular, a move to WiX could be very helpful. They > have stable component code generation which keys off of location, > name, platform, etc., but only works for single-file components. That would be no r

Re: [Python-Dev] Python merge module

2011-02-03 Thread Hoyt, David
> At work we keep the required stable UUIDs in an ConfigParser-format > file checked in to the VCS for that purpose. > > FWIW our build system uses WiX (v2) currently and if I where to redo > it, I'd change to msilib and not WiX v3. But never change working > systems. No need to do that if you're

Re: [Python-Dev] Python merge module

2011-02-03 Thread Hoyt, David
> I hadn't thought it through fully, but the preceding paragraph really > gets to the core of the problem. The maintenance nightmare is security > updates for private location installations by third parties. The only > MSI-friendly way to update that code is through releasing an updated > merge mod

Re: [Python-Dev] News of the faulthandler project

2011-02-03 Thread Victor Stinner
Le jeudi 03 février 2011 à 12:22 -0500, Reid Kleckner a écrit : > On Thu, Feb 3, 2011 at 8:05 AM, Victor Stinner > wrote: > > - SIGABRT is not handled > > Why not? Just because I forgot to handle it. But I don't know if it is a good thing to display the Python backtrace on abort() or not. Pytho

Re: [Python-Dev] Python merge module

2011-02-03 Thread Floris Bruynooghe
On 3 February 2011 15:38, Michael Urman wrote: > Technically this is a problem with the component generation in Python, > and for that in particular, a move to WiX could be very helpful. They > have stable component code generation which keys off of location, > name, platform, etc., but only works

Re: [Python-Dev] News of the faulthandler project

2011-02-03 Thread Reid Kleckner
On Thu, Feb 3, 2011 at 8:05 AM, Victor Stinner wrote: >  - SIGABRT is not handled Why not? That seems useful for debugging assertion failures, although most C code in Python raises exceptions rather than asserting. I'm guessing it's because it aborts the process after printing the backtrace. Y

[Python-Dev] Py_tp_getset in ABI?

2011-02-03 Thread Egon Smiwa
Hi all, I'm trying to convert my embedding code to your new ABI, but I cannot find the ABI slot for tp_getset in typeslots.h (while tp_methods are supported). Is the support of tp_getset not yet determined? (Because I cannot find this in the PEP 384) Thank you! ___

Re: [Python-Dev] Python merge module

2011-02-03 Thread Michael Urman
On Thu, Feb 3, 2011 at 00:30, "Martin v. Löwis" wrote: > Another challenge with shared location merge modules is upgrades: > the Python installer currently doesn't use stable component IDs; > I think this would cause problems for users of the merge module. > Providing stable component IDs is a cha

Re: [Python-Dev] News of the faulthandler project

2011-02-03 Thread Nick Coghlan
On Thu, Feb 3, 2011 at 11:05 PM, Victor Stinner wrote: >  - I have to write something to be able to enable the faulthandler > before starting your program (write a program for that?) I don't know enough about signal handling to help with your other remaining concerns, but an appropriate "-X" comm

[Python-Dev] News of the faulthandler project

2011-02-03 Thread Victor Stinner
Hi, Since the end of last december, I'm still working on my fault handler project: https://github.com/haypo/faulthandler You can use it to get more information after a crash or if you program hangs somewhere. It helps if you don't have access to other debugging tool (eg. install gdb7+python-gdb.p

Re: [Python-Dev] xmlrpclib and communication verbosity

2011-02-03 Thread Erez Sh
Oleg wrote: > Why not logging? > It seems to me that most of python's library modules don't use the logging module, and I didn't want to make style judgments. I actually prefer logging. ___ Python-Dev mailing list Python-Dev@python.org http://mail.py