[Zope3-dev] Re: System python for *development*? (Was: 3.3.0 tag broken by zc.catalog eggs?)

2007-05-22 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Marius Gedminas wrote:
 On Mon, May 21, 2007 at 12:21:42PM -0400, Tres Seaver wrote:
 Reinoud van Leeuwen wrote:
 On Mon, May 21, 2007 at 10:39:22AM -0400, Fred Drake wrote:
 As a developer it might be a good idea to have different installed pythons 
 in different environments to be sure that some modules (or python itself) 
 meet different requirements. 

 But as system maintainer I like to keep things simple. I do not want 
 similar trees of python installations all over the place if it can 
 be avoided. 
 Just as with Java-based applications:  if the server's job includes
 running Zope, then installing a separate Python interpreter is a pretty
 low cost, with the following benefits:

  - You don't risk breaking your production Zope application in a
distro-mandated upgrade to Python (e.g., Fedora 7 puts Python 2.5
into /usr/bin/python).
 
 That's probably the best reason.  I ran away from Debian's Zope 2.x
 packages because they made upgrades painful.
 
  - You may not want to pay the cost of a Python optimized for desktop
applications (UCS-4, anyone?)
 
 Do you have any numbers?  How much memory of a typical Zope 3 app is
 taken by Unicode strings?  (I'm not trying to invalidate your argument,
 I'm genuinely curious.)

No hard numbers, except a vague recollection of shock at the difference
in two appservers running the same application, where one was running
using a UCS-4 interpreter.  Given that pretty much *all* ZPT rendering
these days involves Unicode manipulation, lots of the transient memory
used while rendering a page (as opposed to the ZODB cache) is
potentially affected.

  - You may need to patch Python to work around a bug which is only
problemnatic for long-running Python instances (e.g., the
longstanding cgi.FieldStorage DoS problem).
 
 I don't think that's a good example.  I'd rather patch Zope in this
 particular case.

De gustibus, I guess.  Patching Python to work around issues which
affect your own application, but where the patch may languish in the SF
tracker for more than a year seems reasonable to me.   #112549 comes to
mind, for instance:  although reported against Python 2.3 while 2.3 was
still in maintenance, the fix never did make it into a 2.3 release, and
missed three third-dot revisions on the 2.4 side.

  - You can create a repeatable environment for testing each deployed
application, even where those applications are running on boxes
with different OS / distro-supplied Pythons.
 
 There's still a point where you stop, right?  You don't have a
 self-compiled libc and a self-compiled C compiler to make sure your
 self-compiled Pythons are really identical?

I don't go that far (yet ;), but I often do end up building other
non-Zope components:

  - libxml2/lxml, for instance, because the OS-provided one has
typically been too old, and because getting the Python wrappers
built any other way is a nightmare

  - postgres, because I want to use Python as a stored procedure
language.

  - Squid3 for ESI.

  - (hypothetically) Apache + mod_python, because it hard-wires the
location of the Python iterpreter / DLLs.

The end result is that we can develop on laptops (Linux or Mac) and
deploy to production boxes (various Linux flavors, FreeBSD) with a fair
amount of confidence that the pieces all work as expected;  the
platform-specific bits all get manaaged as part of the buildout libraries.



Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGUuOw+gerLs4ltQ4RAiHTAJwL8XV3wdDdzcyKP6/PDbboerU8oQCeLdIj
w3R+bkVczZtCvOZXl19/Qjc=
=hqDF
-END PGP SIGNATURE-
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re: Blob backward compatibility

2007-05-22 Thread Martijn Faassen

Hey,

Jim Fulton wrote:
  I'm finally looking closely at Blobs and making a few changes.  Some of
these are backward incompatible.  Most are inconsequential.  Since Blobs 
are still considered experimental, I feel fairly free to do this, but I 
don't want to create undue pain for people.


I will make sure that the Zope 3 tests pass after the changes.

Is anyone using Blobs in production?  Does anyone have precious blob 
pickles?


Not me. The reason for this note is that I do intend to start using them 
within the next few months. So I'm happy more work is happening on them 
before I run into them. :)


Regards,

Martijn

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re: System python for *development*? (Was: 3.3.0 tag broken by zc.catalog eggs?)

2007-05-22 Thread Martijn Faassen

Marius Gedminas wrote:
[snip the problems with system pythons]

seem to be minor inconveniences rather than show-stoppers to me.  I'd
love to hear real horror stories.


Not sure whether this counts as a horror story, but...

Recently I upgraded my desktop to Ubuntu Feisty.

So I was running this buildout generated Python script. It had an 
ImportError in it. I saw the traceback for the ImportError, but it was 
suspiciously long and contained a lot of code I didn't recognize. 
Something called Apport. It was intercepting my uncaught exceptions.


I looked at the traceback and saw it was trying some code, under Python 
2.4, that only worked on Python 2.5. The 'any' function, I believe.


The idea of Apport, as I understand, is to do a visual popup when an 
error occurs in an application, and give the option to send a mail to 
Ubuntu.


It turns out whenever you run a python script which has the executable 
flag set (starting it with python myscript.py or ./myscript.py 
doesn't matter), and an uncaught exception occurs, Apport kicks in. 
Buildout sets its 'bin' scripts to executable.


Apport is quite a bit of code, and it was also clear it had never been 
tested properly with Python 2.4. I found out in launchpad this was 
actually one of *two* 2.4 compatibility bugs in Apport.


I don't like a lot of code running whenever I get exception in a library 
I have nothing to do with. Additionally, my level of trust in this code 
isn't high after discovering it had such basic problems. I have put a 
bug report for Ubuntu suggesting the hook at least doesn't kick in (or 
only minimally kicks in) when the script in question isn't in some 
system directory, but I haven't received a response on this yet.


I was rather annoyed at the whole situation. I switched to a 
hand-compiled python right away.


Regards,

Martijn

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: System python for *development*? (Was: 3.3.0 tag broken by zc.catalog eggs?)

2007-05-22 Thread Jim Fulton


On May 22, 2007, at 9:20 AM, Martijn Faassen wrote:
...
I was rather annoyed at the whole situation. I switched to a hand- 
compiled python right away.


Better late than never. :)

Jim

--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] sqlscript/Connection Names

2007-05-22 Thread David Johnson
I noticed in the current build that zope.app.sqlscript or  
zope.sqlscript is missing from the distribution. Also the vocabulary  
name Connection Names is also missing.  I would include them in  
separate emails, but they seem related.


Any ideas on how to fix it?

--
David

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: Blob backward compatibility

2007-05-22 Thread Christophe Combelles
I'm also just starting working on a project (my first paid project on Zope3 \o/) 
that will probably include blobs, because it will store some videos (100Mo) for 
an extranet.

Should I expect incompatible changes to happen in the next few months?
Should I consider blobs now, or should I stick with some kind of extfile?

Christophe

btw, I'm unable to upload any file bigger than 40kB, so 100Mb looks like a dream 
for now...


Martijn Faassen a écrit :

Hey,

Jim Fulton wrote:
  I'm finally looking closely at Blobs and making a few changes.  Some of
these are backward incompatible.  Most are inconsequential.  Since 
Blobs are still considered experimental, I feel fairly free to do 
this, but I don't want to create undue pain for people.


I will make sure that the Zope 3 tests pass after the changes.

Is anyone using Blobs in production?  Does anyone have precious blob 
pickles?


Not me. The reason for this note is that I do intend to start using them 
within the next few months. So I'm happy more work is happening on them 
before I run into them. :)


Regards,

Martijn

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/ccomb%40free.fr





___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] System python for *development*? (Was: 3.3.0 tag broken by zc.catalog eggs?)

2007-05-22 Thread Dieter Maurer
Marius Gedminas wrote at 2007-5-22 14:18 +0300:
 ...
seem to be minor inconveniences rather than show-stoppers to me.  I'd
love to hear real horror stories.

I do not have horror stories but dislike system pythons because
they tend to have debugging symbols stripped.

Unfortunately, Zope applications sometimes crash or spin
and it is often very efficient to be able to use a C level
debugger to analyse such situations. However, this has only any
hope when Python still has its debugging information...



-- 
Dieter
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] System python for *development*? (Was: 3.3.0 tag broken by zc.catalog eggs?)

2007-05-22 Thread Christian Theune
Hi,

Am Dienstag, den 22.05.2007, 20:56 +0300 schrieb Marius Gedminas:
 Is there any documentation about how to extract the Python level stack
 trace when you've attached to a Python program at C level with gdb?
 (One of my fantasies (i.e. projects I'll never find the time to work on)
 is adding Python support to sysprof, the whole-system statistical
 profiler for Linux.)

I just contributed an updated version of the gdb macros that allow you to do 
this. 

Look here: 

http://svn.python.org/view/python/trunk/Misc/gdbinit?rev=39492view=auto

My patch isn't in there yet, see this posting too:

http://thread.gmane.org/gmane.comp.python.devel/88120


Christian

-- 
gocept gmbh  co. kg - forsterstraße 29 - 06112 halle/saale - germany
www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com