Re: [Zope-dev] Zope .NET
Hello, I found this in Dr. Dobb's Python-URL! - weekly Python news and links (Aug 7): There has been discussion on compiling Python with VC.NET. Anton Vredegoor argues that Windows (and .NET) is just a platform amongst many others. Also, Matt Gerrans provides answers to the question if Python on .NET (and Java, too: jython) is worthwile. http://groups.google.com/[EMAIL PROTECTED] http://groups.google.com/[EMAIL PROTECTED] t Here is the summary: Has anyone tried building Python with VC++.NET? Does it work or fail horribly like I think it will. Yes, several people have built it that way, and it works fine. The idea of integrating the Python language somehow into the .NET framework is independent of VS.NET-the-IDE, though I suppose one might like some level of connection between the two. Mark Hammond, before and while at ActiveState did do some exploratory work in this direction. But that is all it has come to so far: exploration. So your too good to be true does (currently) apply to a so called Python.NET. This code is currently in PyWin32's CVS tree one SourceForge: http://sf.net/projects/pywin32 There is also the independent Kobra project that I have not looked at. Regards, Martin ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] debugging memory leaks
I've got a fairly major memory leak in my application. I've followed the thread from August including Shane's suggestions about using a debug build of Python to inspect object references and the rest [1] I know from the refcounts in Zope that items of class Foo are definitely leaking, yet when I do a sys.getobjects(0, Foo) I get nothing back. Navigating all 10-ish references one by one seems a bit daunting. So I'm not sure where to go from here. Shane, you mentioned you had put together some useful functions for exploring this debug information - could you share them? Or were you just refering to the remote console you supplied earlier? Also, what kinds of Python code can cause memory leaks? I'm not really sure what I should be looking for. The only thing I can think of is hanging file descriptors, as circular references should be picked up by the gc anyway. Seb [1] http://mail.zope.org/pipermail/zope-dev/2003-August/020358.html ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Failure on make instance
Howdy, I just cvs'upped zope from the 2.7 branch, make clean; make; make instance; and it failed with: running install_data error: can't copy 'zdaemon/component.xml': no matching files make: *** [install] Error 1 Looks like a file is missing, or some script wasn't updated. []'s -- Sidnei da Silva [EMAIL PROTECTED] dreamcatching :: making your dreams come true http://dreamcatcher.homeunix.org Programming is an unnatural act. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Zope .NET
On Mon, Oct 27, 2003 at 09:48:46AM +0100, Martin Kretschmar wrote: | Hello, | | I found this in Dr. Dobb's Python-URL! - weekly Python | news and links (Aug 7): | | There has been discussion on compiling Python with VC.NET. | Anton Vredegoor argues that Windows (and .NET) is just a | platform amongst many others. Also, Matt Gerrans provides | answers to the question if Python on .NET (and Java, too: | jython) is worthwile. | | http://groups.google.com/[EMAIL PROTECTED] | | | http://groups.google.com/[EMAIL PROTECTED] | t | What about this one? http://cvs.zope.org/PythonNet/ []'s -- Sidnei da Silva [EMAIL PROTECTED] dreamcatching :: making your dreams come true http://dreamcatcher.homeunix.org A rolling disk gathers no MOS. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Failure on make instance
Sidnei da Silva writes: I just cvs'upped zope from the 2.7 branch, make clean; make; make instance; and it failed with: running install_data error: can't copy 'zdaemon/component.xml': no matching files make: *** [install] Error 1 Looks like a file is missing, or some script wasn't updated. Sigh. I was looking over this problem this morning when our automated tests screamed foul, and I couldn't reproduce it. ;-( Of course, once your mail arrived, it was a lot easier t fix for some reason(!). When I'd applied the patch from the trunk, I'd applied, tested, and committed; what I didn't do was cvs add the new files on the 2.7 branch! Sorry for the resulting autotest spewage. The files have now been added on the branch, so the testers should be happier. And it should actually work for you. -Fred -- Fred L. Drake, Jr. fred at zope.com PythonLabs at Zope Corporation ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Failure on make instance
| Of course, once your mail arrived, it was a lot easier t fix for some | reason(!). When I'd applied the patch from the trunk, I'd applied, | tested, and committed; what I didn't do was cvs add the new files on | the 2.7 branch! Maybe because the phrase 'file missing' triggered something :) | Sorry for the resulting autotest spewage. The files have now been | added on the branch, so the testers should be happier. And it should | actually work for you. Works now, thanks! -- Sidnei da Silva [EMAIL PROTECTED] dreamcatching :: making your dreams come true http://awkly.org But what can you do with it? -- ubiquitous cry from Linux-user partner ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Failure on make instance
Sidnei da Silva writes: Maybe because the phrase 'file missing' triggered something :) Something like that, perhaps! Jeremy's comment wasn't so different, but didn't clue me in the same way. I'm glad to have fixed it for you! -Fred -- Fred L. Drake, Jr. fred at zope.com PythonLabs at Zope Corporation ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] CVS Server unresponsive?
Howdy folks, Im trying to cvs up and get the latest changes on CMF 1.4, but it just does time out. Any clue? [EMAIL PROTECTED]:~/src/cmf/1_4$ cvs up ssh: connect to host cvs.zope.org port 22: Connection timed out cvs [update aborted]: end of file from server (consult above messages if any) []'s -- Sidnei da Silva [EMAIL PROTECTED] dreamcatching :: making your dreams come true http://awkly.org A LISP programmer knows the value of everything, but the cost of nothing. -- Alan Perlis ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] CVS Server unresponsive?
cvs.zope.org seems to have locked up, we're looking into it jens On Oct 27, 2003, at 12:39, Sidnei da Silva wrote: Howdy folks, Im trying to cvs up and get the latest changes on CMF 1.4, but it just does time out. Any clue? [EMAIL PROTECTED]:~/src/cmf/1_4$ cvs up ssh: connect to host cvs.zope.org port 22: Connection timed out cvs [update aborted]: end of file from server (consult above messages if any) []'s -- Sidnei da Silva [EMAIL PROTECTED] dreamcatching :: making your dreams come true http://awkly.org A LISP programmer knows the value of everything, but the cost of nothing. -- Alan Perlis ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] how can I prevent undo?
Actually, this should be doable by removing access to the ``Undo changes`` permission. -- Jeffrey P Shell [EMAIL PROTECTED] On Oct 26, 2003, at 1:49 PM, Andreas Jung wrote: By removing the Undo tab or by removing Un doSupport from the baseclasses of your objects? -aj --On Sonntag, 26. Oktober 2003 20:38 Uhr +0100 robert [EMAIL PROTECTED] wrote: Hi there, I have objects that are linked to an external database. When they are deleted, also the data in the external database is deleted. Now an undo is bad, because I then get an object with ab link to non existing data. I must therefore prevent undo. How can I do that? Thanks, Robert ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] debugging memory leaks
[Seb Bacon] ... I know from the refcounts in Zope that items of class Foo are definitely leaking, yet when I do a sys.getobjects(0, Foo) I get nothing back. If Foo is an old-style class, then every instance of Foo has type InstanceType (and so does every instance of every other old-style class): class Foo: pass type(Foo()) type 'instance' import types types.InstanceType type 'instance' types.InstanceType is type(Foo()) True getobjects() filters on type, so nothing will ever match Foo as a type. If you can change Foo to a new-style class (most easily by inheriting from object, in a recent-enough Python), life gets easier: class Foo(object): pass type(Foo()) class '__main__.Foo' Then getobjects() can filter on Foo as a type. Classes and types before Python 2.2 are distinct concepts (barring Zope ExtensionClass complications). Navigating all 10-ish references one by one seems a bit daunting. Na, with list comprehension syntax (for brevity -- you can do the same with a for-loop, of course), foos = [x for x in sys.getobjects(0) if isinstance(x, types.InstanceType) and x.__class__ is Foo] will extract just the Foo instances (if Foo is an old-style class). So I'm not sure where to go from here. Debugging memory leaks can be hard, in any language. Another place to look for ideas is in the top-level test.py from a current Zope HEAD checkout (or 2.7 branch, or Zope3). If you're able to run your code in a loop, the TrackRefs class in test.py automates some measure of identifying what (if anything) is leaking. We've changed many internal ZODB and ZEO classes to new-style classes primarily just so this test.py's -r option is more useful in identifying the source of leaks. Some yielded easily to analysis, others slobbered on for part-time weeks. There are two common culprits: 1. Some class keeps a list, or dict, of all instances ever created. These are obvious once found, but can be surprisingly hard to locate. Of course the instances never go away then until the class goes away. Sometimes it's due to leftover debugging code someone forgot to delete again. 2. Reference cycles. Big topic wink. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] cvs.zope.org outage and maintenance
cvs.zope.org had a problem with its hardware RAID controller today that required manual intervention. In order to solve what we think is the main cause we are going to have a downtime from 4PM EST until about 4:30 PM EST today to remove some dodgy hard drives. jens ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] debugging memory leaks
Tim Peters wrote: snip useful info about new-style classes Debugging memory leaks can be hard, in any language. No kidding. I thought when I identified the suspect class two days ago I was nearly there ;-) Another place to look for ideas is in the top-level test.py from a current Zope HEAD checkout (or 2.7 branch, or Zope3). OK, will do. 2. Reference cycles. Big topic wink. Seeing as the suspect leaker contains code like: other = Foo() other.reciprocal = self self.reciprocal = other I fear the worst ;-) ...but my (naive?) reading of the documentation was that reference cycles are cleaned out by the garbage collector, *unless* they define a __del__ (which is not the case here). How am I wrong? Thanks, seb ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] cvs.zope.org back up
... disk removal took a little longer than expected but we're back to normal now. jens ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] debugging memory leaks
[Seb Bacon] ... Seeing as the suspect leaker contains code like: other = Foo() other.reciprocal = self self.reciprocal = other I fear the worst ;-) ...but my (naive?) reading of the documentation was that reference cycles are cleaned out by the garbage collector, *unless* they define a __del__ (which is not the case here). How am I wrong? You're reading the docs correctly. It's not necessarily cycles directly involving Foo objects that causes Foo objects to leak, it can be instead that some other (non-Foo) objects in cycles can't be collected, from which the Foo objects are in turn reachable. When an object O can't be collected, then neither can any object reachable from O. gc.get_referrers() can be used to find objects that refer to a given Foo instance. It's also possible that a something S refers to a Foo instance where S doesn't participate in cyclic gc. Then any cycle containing S is immortal, regardless of whether __del__ methods are defined in the cycle, and also then gc.get_referrers() can't reveal S's existence. Sometimes such an S is in the Python core, or in Zope's C code, although the more recent the release the less likely that is (more more kinds of objects have been added to cyclic gc over time). Are you sure that *only* Foo objects are leaking? It's pretty rare, when there's a leak, to see only one kind of object leaking. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )