Re: [Zope-dev] ZClasses - Two glaring omissions
There was lots of talk a while back about redoing ZClasses. I wonder what ever happened to that? cheers, Chris Andy McKay wrote: Of course all those points can be done in python, im assuming you are talking about ZClasses. -- Andy McKay, Developer. ActiveState. - Original Message - From: "Alexander Limi" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 14, 2000 11:35 AM Subject: [Zope-dev] Two glaring omissions Hi, I've been working with Zope for almost two years now, and there are two things that I feel is missing in the interface: 1. The ability to add a Base class after the class is created 2. The ability to rename properties after instances of the classes have been created (and have the data in those fields preserved) Are there any technical reasons why these are not present? I know it is possible to add base classes in retrospect via the hack described in http://www.zope.org/Members/AlexR/ChangingBaseClasses but are there plans for making this easier? As for #2, it is quite annoying and counter-productive not being able to change a variable name that was decided a long time ago, or maybe by others simply because there exist instantiated objects of that type. Both of the above are pretty essential OO techniques (for me, at least), and hinder my work quite a lot by not being there. Any chance of these being fixed at all? Or are there reasons that I do not know about that makes this impossible? Regards, -- Alexander Limi [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] large PersistentMapping
Talk to Tres Seaver about the observer interface and the event channel stuff. He has lots of ideas about this and I think it does pretty much what you want... cheers, Chris Robin Becker wrote: I'm trying to build a Reverse Cross Referencing Product. The idea is to enable documents to know which other documents in the Zope data base are pointing at them. I would like to use a persistent mapping to store the link information, but since eventually the object might be quite large will I get a performance hit when accessing only a small part of the object. It certainly seems to work for small instances, but I'm worried about what happens as my structure gets larger. Is there an alternate way to do this? The heart of the object are the methods def __init__(self, id, title): '''Initialise a new instance of RXRef''' self.id=str(id) self.title = str(title) self.title = title self._N = PersistentMapping() def addNode(self,n): '''Add a new node if not known''' N = self._N if not N.has_key(n): N[n]=[] def addLinks(self,src,DST): '''We have a single src and multiple destinations''' if type(DST) not in SEQTYPES: DST = [DST] N = self._N for dst in DST: self.addNode(dst) if src not in N[dst]: N[dst].append(src) def delLinks(self,src,DST): '''We have a single src and multiple destinations''' if type(DST) not in SEQTYPES: DST = [DST] N = self._N for dst in DST: if N.has_key(dst): if src in N[dst]: N[dst].remove(src) if N[dst]==[]: del N[dst] def getRLinks(self,dst): '''get links pointing to dst''' N = self._N return N.has_key(dst) and N[dst][:] or [] -- Robin Becker ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] TTW Product distribution
jimbo wrote: Hi, If I try to distribute it and leave it set for "Allow redistribution". Its not showing up in the Zope products directory tree after I untar the 3 files into the file system products directory and restarting Zope. I have a Dataskin based ZClass, 2 Specialist, the default constructor forms. I'm using Zope 2.2.2 on win98 ZPatterns 4.3b2. Is this expected behaviour for a ttw product? It works if I export/import it. This used to be really buggy and maybe it still is. The DC guys working on the PTK found and fixed some of the bugs but I don't know if they've landed in a Zope release yet. Maybe 2.2.3? Anyone got any definite knowledge? Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] License issues
Some quick points on this. First, feel free to talk on this list about ways that Zope developers can license their stuff. It's a constructive discussion, and since I'm not a Zope developer, I can ignore it. :^) Second, regarding the licensing of Zope itself, ChrisP is right that I'm the guy on that. Or more specifically, Hadar Pedhazur (our board chairman) and I run the zope-license email alias. He and I had previously decided that, after the round closed, we'd take a fresh look at our licensing strategy. Basically, we'd like to get out of the business of having our own license, and we're open to the idea of a license that is more GPL-friendly, in the spirit of Apache, Python, etc. Thus, continue discussing what you need to do your jobs and give us some time to hash out a proposal. Thanks! --Paul On 14 Nov 2000 09:29:11 -0800 Simon Michael [EMAIL PROTECTED] wrote: Juan, thanks for shining some light towards this murky area. Maybe ZWiki and other zope products need to be LGPL or dual-licensed, maybe the zope license can use some refinement. I for one won't know without seeing some enlightened discussion of the issue. This stuff is unsexy but important. Best regards, -Simon ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] __replaceable__ or whatever it is ;-)
Shane Hathaway wrote: FYI I actually added the docs in two places, but they were promptly removed from the place they did not belong: the help system. Unfortunately the InterfacesWiki is currently the only good place. Guess we'll have to wait for 2.3 :-) Could whoever did the coding please put something in the Interfaces Wiki or point us to where the official documentation lives? http://www.zope.org/Members/michel/Projects/Interfaces/ObjectManagerItem (See the bottom.) Thanks... I guess the behavior that was associated with ObjectManager.NOT_REPLACEABLE is obtained by just not havign a __replaceable__ attribute? ...or does ObjectManager.NOT_REPLACEABLE exist, just in an undocumented fashion ;-) Also, when is it going to land in a erleased Zoep version? 2.3 I guess... That's the plan. Bad question, I know, but any idea when that'll be? cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Automatic conversion to pdf format
Newbie Alert I am currently setting up a support website using Knowledge Kit. I would like to integrate it with ZpdfDocument, so that some documents could be automatically converted to pdf, without the need to cut and paste from Knowledge Kit to ZpdfDocument. Since I am a Zope newbie I did not find a way to make it work. I would really appreciate your help, Stefano Ciccarelli ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Local Factories in Products
Zopers, In ZClasses it is possible to control where a ZClass instance should be permitted to be added, in other words show up in the factory listing in a ObjectManagers manage_main view. (I this correct by the way?) What I need to do is someway restrict in what Containers (myContainer subclass od ObjectManage ) my Zope Product Instances (myClass) should be abled to be added (show up in the factory list). When registerClass "myClass" in the initialize method of __init__.py it seems that the "myClass" gets addable everywhere. I have temporary solved this by removing the objects registration from the initialize method and adding manual add factories in the myContainer. This is bad though because the meta_types doesn't get registered and maybe some other problems as well. So how could I control dependencies for adding Zope Classes in other Zope Classes? Regards, Johan Carlsson ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] is _getCopy slow?
My product is performing incredibly badly. I profiled it and got the following results: ncalls tottime percall cumtime percall filename:lineno(function) ...snip... 4/10.0100.0036.3606.360 WebFactory.py:92(change_theme) 37/60.4400.0126.3301.055 CopySupport.py:426(_getCopy) 37/60.7100.0196.2701.045 ExportImport.py:126(importFile) 380.0200.0011.9300.051 BaseStorage.py:200(tpc_finish) 381.9100.0501.9100.050 FileStorage.py:768(_finish) For each folder in the instance, a method change_theme() is called recursively on each of its subfolders. The culprit appears to be the _getCopy call, which in turn calls importFile, and takes a whole second to call each time. The object being copied is in each case typically a folder containing 3 - 5 documents. Is _getCopy inherently slow, or am I misreading the profiler output, or is it more likely there's something wrong with my code? Cheers, seb ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] __replaceable__ or whatever it is ;-)
At 11:14 AM 11/15/00 +, Chris Withers wrote: Thanks... I guess the behavior that was associated with ObjectManager.NOT_REPLACEABLE is obtained by just not havign a __replaceable__ attribute? ..or does ObjectManager.NOT_REPLACEABLE exist, just in an undocumented fashion ;-) Also, when is it going to land in a erleased Zoep version? 2.3 I guess... That's the plan. Bad question, I know, but any idea when that'll be? FYI, if you want to play with this before then, the current release of the PlugIns package has support for the proposed behavior in the PlugInContainer class, using a code snippet cribbed from Zope CVS. So you should be able to make PIC subclasses with overrideable methods. I put in that support because I wanted Specialists and such to be able to use overrideable methods. I haven't gotten around to actually putting any in, though. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] ZopeBug: No Last-Modified for misc_/.../*.gif objects!!!!
I was looking at the cacheability of my website in zope, and saw that the misc_/OFSP/*.gif images (as in the icon objects) are NOT cacheable because they don't return *any* date info. If they *at least* returned a Last Modified, they'd be cacheable. I looked at the Zope Source and it looks like misc_.py just calls ImageFile objects. Why aren't the ImageFile objects setting these header info bits correctly? I'm not very knowledgable about Zope inside, but this seems like it should be happening. A side effect of fixing this problem would be that the manage screens would suddenly work much faster since the icons would not need to be reloaded EVERY time!! Here is the HEAD info from two ImageFile objects. The first is in the folder images which has a SiteAccess object that forces the Cache-Control object, a normal Image would not have the Cache-Control line. The second is a misc_.py object: checkhead http://docwhat.gerf.org:9673/images/thedoctorwhat HTTP/1.0 200 OK Server: Zope/Zope 2.2.2 (source release, python 1.5.2, linux2) ZServer/1.1b1 Date: Wed, 15 Nov 2000 19:06:23 GMT Cache-Control: public, max-age=86400 Connection: close Content-Type: image/png Content-Length: 21717 Last-Modified: Wed, 15 Nov 2000 03:14:17 GMT checkhead http://docwhat.gerf.org:9673/misc_/OFSP/Folder_icon.gif HTTP/1.0 200 OK Server: Zope/Zope 2.2.2 (source release, python 1.5.2, linux2) ZServer/1.1b1 Date: Wed, 15 Nov 2000 19:06:37 GMT Connection: close Content-Type: image/gif Content-Length: 903 I have attached by stupid checkhead program. Ciao! -- I'd horsewhip you if I had a horse. -- Groucho Marx The Doctor What: Second Baseman http://docwhat.gerf.org/ [EMAIL PROTECTED] KF6VNC #!/usr/bin/perl -w $| = 1; use strict; delete $ENV{'http_proxy'}; my $wget = "wget -q -s -O - " . join( ' ', @ARGV ) . "|"; open( FOO, $wget ) or die "Unable to run ``$wget'': $!"; while( FOO ) { if( /^\s*$/ ) { last; } print $_; } close( FOO );
[Zope-dev] TTW Product not showing up.
In my ZClass I selected CatalogAware and dataskin as base. I'm not sure what else I'm suppose to do. SystemError: Failed to import class _ZClass_for_CatalogAware from module Product s.ZCatalog -Jimbo ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Simulate DTML-Method Proxy-Roles for python-product-methods ?
Hello. I've started to implement a small Product in Python. One method should be able to access an object in a folder which isn't accessible by anonymous but only by a special role. Is it possible to give a proxy-role to the python-method to access this object ? cheers Martin i.A. Martin Grönemeyer Technik || | || c o m.u n i t G m b H ||| | | || | | | | | | | | http://www.comunit.de/ mailto:[EMAIL PROTECTED] Eiffestr. 598 20537 Hamburg | Germany Fon +49 +40 | 21 11 05 25 Fax +49 +40 | 21 11 05 26 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] License issues
I personally do not have a problem with the Zope license. However, I do use a lot of GPLed software and appreciate it. I also am appreciative of the ability to use Zope and to take advantage of the wonderful work that DC has produced. When the original debate occurred I was in support of DC maintaining some type of button crediting DC. DC has provided us with an incredible tool and has provided the community with tools in which to have a community and contribute toward Zope. Whatever license is chosen I would like to see it be one which protects everybody, especially DC. About a year or two ago Lutris, the people who do Enhydra, were debating about how to license their product XMLC. After researching the idea they decided, with the communities support, to adopt the GPL. Their primary reason was to prevent a bigger fish (with $$$) from capitalizing on their work and possibly inhibiting their ability to compete. The GPL would protect DC from predatory competitors. It would also allow for Zope's adoption in certain environments. I also believe some people would relicense their products to the GPL if it were Zope's native license. The source code maintains DC's intellectual credit and investment in Zope. Zope.org could also possibly provide a higher profile for DC without necessarily being "obnoxious" or being overtly/overly possessive. I've made some statements about how the GPL can help DC and the community. What I don't see is if or what negatives would come into play with such a change. Does anybody see any problems? Does anyone at DC including Hadar and their new VC friends? Jimmie Houchin Paul Everitt wrote: Some quick points on this. First, feel free to talk on this list about ways that Zope developers can license their stuff. It's a constructive discussion, and since I'm not a Zope developer, I can ignore it. :^) Second, regarding the licensing of Zope itself, ChrisP is right that I'm the guy on that. Or more specifically, Hadar Pedhazur (our board chairman) and I run the zope-license email alias. He and I had previously decided that, after the round closed, we'd take a fresh look at our licensing strategy. Basically, we'd like to get out of the business of having our own license, and we're open to the idea of a license that is more GPL-friendly, in the spirit of Apache, Python, etc. Thus, continue discussing what you need to do your jobs and give us some time to hash out a proposal. Thanks! --Paul On 14 Nov 2000 09:29:11 -0800 Simon Michael [EMAIL PROTECTED] wrote: Juan, thanks for shining some light towards this murky area. Maybe ZWiki and other zope products need to be LGPL or dual-licensed, maybe the zope license can use some refinement. I for one won't know without seeing some enlightened discussion of the issue. This stuff is unsexy but important. Best regards, -Simon ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] License issues
In article [EMAIL PROTECTED], Jimmie Houchin [EMAIL PROTECTED] wrote: The GPL would protect DC from predatory competitors. It would also allow for Zope's adoption in certain environments. I also believe some people And prevent it in others. would relicense their products to the GPL if it were Zope's native license. While other products would suddently become license-incompatible. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )