Re: [Zope-dev] Zope and Python 2.4
However, RedHat have now released Python 2.4 in the Fedora development stream and it will ship with FC4. Does ZC have an official position upon this yet? Speaking as Zope release manager but not as official of ZC: Python 2.3.4 will likely be the recommended Python version for Zope 2.7. I am personally running Zope 2.7.3 with Plone since some weeks under Python 2.4b1 but I am doing this at my own risk. Python 2.4 might be of interest for Zope 2.8. Going for Python 2.4 just because Fedora ships with it is not really an argument. Add to that the fact that it is *not advisable* most of the time to use the Python interpreter that comes with the system. The reasons have been laid out before, like the fact that the interpreter is most likely compiled with strange flags, and that updating a system-level Python with vendor-supplied packages can have bad consequences for your Zope install. The vendor-supplied Python is (probably) tested with vendor-supplied packages that use it, but certainly not with third party software such as Zope is in this case. 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] Re: Zope and Python 2.4
However, having to fork off the main Fedora branch in regard to Python dependencies (which directly affect Anaconda, up2date, GTK, and most of the desktop applets) has major implications for how we maintain our distro. As Andreas said, there is no forking involved. You should have a separate Python that's used by Zope only, and not by the other Python-based tools. It's like the old Zope binary releases - they all came with their own Python. 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] Guidelines for using Speedpack with Zope products
Also if this is the wrong list for this topic please tell me which is the correct list. Since SpeedPack is a Plone-related add-on I would assume your question belongs on a Plone mailing list. See http://www.plone.org. 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] RFC: Proposed backward-compatibility policy
On Oct 27, 2004, at 15:49, Jim Fulton wrote: Below is a proposed policy on backward compatibility for Zope. Zope Policy on Backward Compatibility = snip +1, even regardless of its actual content. Having a policy at all is a lot better than the I gotta ask X people policy that seemed to be in use so far. 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] Referencing a python method from a product page template
On Oct 20, 2004, at 11:37, Coletti Massimo wrote: Solved ! There are some wrong info in Zope Developers Book. The solution is here: http://mail.zope.org/pipermail/zope/2004-May/thread.html#149569 I've corrected it in the 2.7 book: http://www.plope.com/Books/2_7Edition/AdvZPT.stx#3-95 jens --- Jens Vagelpohl [EMAIL PROTECTED] Software Engineer Zope - done medium rare Zetwork GmbHhttp://www.zetwork.com/ ___ 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] Python2.4 and Zope 2.7
On Oct 17, 2004, at 18:13, Matt Hamilton wrote: Hi All, I'm having some trouble getting python2.3.4 running on FreeBSD 5.3b7 on an AMD Opteron, so for kicks tried python2.4rc3. It managed to pass the recursion regex test in test_re.py that was causing python2.3.4 to barf, but in trying to start Zope with python2.4rc3 I get the error below. Does anyone here know if Zope 2.7.0 should work with python 2.4? AFAIK no one has tested it or made any claims it does. More interesting than testing 2.7.0 would be a *recent* 2.7 version (the latest 2.7.3 beta) and maybe 2.8 - unless you're looking for production-quality software. 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] 2.7 branch: attribute permission problems
Tres is in Austria at the Plone conference. Don't expect any quick turnaround... jens On Sep 21, 2004, at 3:04, Richard Jones wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 15/09/2004, at 1:00 PM, Chris McDonough wrote: I'd just stick the code back in there for now and we'll see what Tres says. No word from Tres, 2.7 branch release coming up... Richard -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (Darwin) iD8DBQFBT34orGisBEHG6TARAsnUAJ9AFw/zOZ5gpXJIKNR837OcGiv62ACfRzXU +4k+jkEV0WFzU7RuiMXnScE= =mH5+ -END PGP SIGNATURE- ___ 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 ) --- Jens Vagelpohl [EMAIL PROTECTED] Software Engineer Zope - done medium rare Zetwork GmbHhttp://www.zetwork.com/ ___ 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] Renabled ViewCVS at svn.zope.org
Loads nice and fast right now for me. But then again it's 2 AM EST... jens On Sep 9, 2004, at 23:59, Jim Fulton wrote: After updating all of the relevent libraries, I decided to try reenabling ViewCVS for a while to see if the behavior is any more stable. Jim ___ 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] New function for error log
That's an interesting question. What is the unit test policy if I change/improve a part of the Zope code that has no unit tests at all. Would I be expected to create unit tests for the whole thing all of a sudden? In another post Tres' likened doing so to supererogation (http://www.iep.utm.edu/s/superero.htm) which I think means to imply that doing so will get you points in programmer heaven (well, depending on your programmer dogma I suppose) but isn't strictly required. I try to create at least *one* unit test for something that isn't tested at all if I add a feature to it, testing my feature. ;-) At least then it gives people somewhere else to start. OK, I supererogated and checked in a few unit tests ;) 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] New function for error log
On Aug 29, 2004, at 16:03, Christian Theune wrote: Am So, den 29.08.2004 schrieb Christian Theune um 15:37: Ack. Stuff is on it's way. Done. The error log improvement is there. Thanks for the quick support. You published your nagios scripts somewhere, right? I'm interested. 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] New function for error log
Due to the fact that this is a feature and the code provides no unit test infrastructure (and I don't have the time to start doing that for the error log) I'd like to know what the general rule for Zope 2 is, If I want to make improvements to existing code that isn't covered by unit tests at all. That's an interesting question. What is the unit test policy if I change/improve a part of the Zope code that has no unit tests at all. Would I be expected to create unit tests for the whole thing all of a sudden? I'm interested in seeing this patch in the core myself. 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] Re: any limits on object number?
Even using BTreeFolder to store all objects I was getting 300s delay to show a single object (ok, it's an archetypes-based one, containing 50 fields, splitted into 7 schematas, with lots of fancy stuff...). So I made a directory hash structure based on UID from each object (an AT UID is md5, so we have a hex base). My own experience with BTreeFolder2 does not support your diagnosis. I do not believe BTreeFolder2 is the problem here. On a CMF-based CMS that I helped develop the largest BTreeFolder2-based containers held ca. 60,000 items at the top level, meaning we did not use a directory structure to restrict the number of items per folder. There was zero delay retrieving singe items and even stepping into the ZMI where it shows 1000 ids at a time was sub-2 second response time. 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] any limits on object number?
When we tried to upload objects from wikipedia's sqldump of after about 40,000 objects in a folder the script went for a toss. roughly each time we ran the script the same problem. even to visit the folder of even 1000 objects through ZMI is a pain. I think that is where BTreeFolder2 will be very useful. Your observations make sense in the context of the standard Zope folder. BTreeFolder2 will help. I am assuming whatever script you use to populate the folder(s) commits the transaction ever N objects, right? I am also thinking to use a squid cache style of storing objects in zodb, where the objects go into many subfolders (i dont know what is this method called technically) with several sub folders with names alphabetized/numbered. this way i can store large number within zodb though not in the same folder/BTreefolder2. Should I use both methods? I would definitely use the subfolder method. Not related to Zope, but what about filesystems? there must be a limit on the number of files within one folder depending on which filesystem one uses. The ZODB, in case you use the standard FileStorage, is one monolithic file. So there is no large number of files on the server file system regardless of how many objects you store. For files on the file systems your choice of file system depends not just on the number of objects but also its size. To re-use your earlier example of Squid cache files, which are numerous and mostly small, ReiserFS is normally recommended. It deals much better with large quantities of files in one folder. 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] Segfault and Deadlock
Am 2. Mai 2004 um 13:28 schrieb Dieter Maurer: Willi Langenberger wrote at 2004-5-2 17:10 +0200: ... The reason is the way python handles threads on some systems (RedHat-7.3, kernel 2.4.20, without NPTL). What is NPTL? The native posix thread library or something like that. It's a new threading implementation that was introduced with an update to RedHat9. Fedora Core hast it by default, as does RH Enterprise Server 3 I believe. jens smime.p7s Description: S/MIME cryptographic signature ___ 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] Site Error
On Apr 2, 2004, at 7:06, AP Meyer wrote: Is this a known bug? Working without automatic refresh is very unhandy ;-) thanks Andre Refresh is *not* a solution for everything because of the gyrations it has to go through to force the refreshing effect. Not everything will work with it, period. If you see weirdness then disable it and see if that helps. jens smime.p7s Description: S/MIME cryptographic signature ___ 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] Bug in ZTUtil.Batch solved
Please post this in the Collector at http://zope.org/Collectors/Zope jens On Mar 22, 2004, at 7:09, AP Meyer wrote: Hi Zopers It seems that there is a bug in ZTUtil.Batch: when the batch should be the length of the batch and there are exactly as many orphans as there would fit on one page the length of the batch becomes size instead of size+orphans. Here are the numbers: no of batchesstartendorphanlengthsequence_length 1 112 3 1212 1 110 3 1013 WRONG * 2 110 3 1014 * end and length should be 13 in this case, 3 items are omitted length=12 length=13 length=14 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 | second batch 12 12 | 13 | 14 | So, there is a jump on the edge where there should be one batch of the length sequence_length == length+orphans. At that point 3 (in the above case) items disappear. I have looked at the code in ZTUtils.Batch.py and found the following solution (line 109): 94 def opt(start,end,size,orphan,sequence): 95 if size 1: 96 if start 0 and end 0 and end = start: 97 size=end+1-start 98 else: size=7 99 100 if start 0: 101 102 try: sequence[start-1] 103 except IndexError: start=len(sequence) 104 105 if end 0: 106 if end start: end=start 107 else: 108 end=start+size-1 109 #try: sequence[end+orphan-1] 110 try: sequence[end+orphan] # replace above with this 111 except IndexError: end=len(sequence) 112 ... Can somebody confirm that this solution is correct and modify it in the CVS, please? NB This has been run in Zope 2.7 with Python 2.3.3. thanks Andre -- --- --- The disclaimer that applies to e-mail from TNO Physics and Electronics Laboratory can be found on: http://www.tno.nl/disclaimer/email.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 ) smime.p7s Description: S/MIME cryptographic signature ___ 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] server for new protocol?
write server itself not very hard, i simply don't want patch ZServer/components.xml is there any way don't touch Zserver? probably not. jens smime.p7s Description: S/MIME cryptographic signature ___ 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] ESI support
Zope does not need ESI support - You can write ESI statements in your templates without specific support from Zope. jens On Jan 12, 2004, at 8:57, Bjorn Stabell wrote: Any news on Zope support for ESI? http://mail.zope.org/pipermail/zope-dev/2003-January/018619.html http://www1.cn.squid-cache.org/mail-archive/squid-dev/200208/0047.html From what little I can gather from the Squid mailing lists, it looks like ESI support is materializing in Squid. Bye, -- smime.p7s Description: S/MIME cryptographic signature ___ 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] ESI support
Zope does not need ESI support - You can write ESI statements in your templates without specific support from Zope. jens Does ZC use ESI in production? Maybe some experiences regarding caching? Not yet, no. We are waiting for more stable Squid releases before using Squid3. We're also working with Robert Collins to hopefully jumpstart the release schedule. jens smime.p7s Description: S/MIME cryptographic signature ___ 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] ESI support
Dunno about any such plans right now, but that doesn't mean it won't happen, especially when it has become stable in Squid itself. jens On Jan 12, 2004, at 20:08, Bjorn Stabell wrote: Jens: Zope does not need ESI support - You can write ESI statements in your templates without specific support from Zope. Yes, but I think they were planning to make it easier from DTML/ZPT, a la JSP's ESI library. smime.p7s Description: S/MIME cryptographic signature ___ 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] SMPT Authorization support
But I realized that what you actually might want is to have different login and password for each user, that is a possibility to pass username + password to send(). And maybe you want a setting to allow this or not. Or is this overkill? What do you think? IMHO, YAGNI. Besides, a lot of userfolders have encrypted passwords, including Zope's default. Correct, complete overkill. jens smime.p7s Description: S/MIME cryptographic signature ___ 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 2.7.0 b3 regressions
If you need anything CMF specific use the portal_url tool. I do not see why a basic infrastructure method like absolute_url() should know anything about portals at all. I have to admit I did not look deeply, but Stefan's notion that absolute_url is a basic infrastructure method that should not have to know about portals is correct. The portal_url tool was specifically created to provide you with paths and URLs that are relevant to the CMF site - if there are any problems the URLTool needs to be extended or fixed to address that. jens smime.p7s Description: S/MIME cryptographic signature ___ 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 )
[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 )
[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 )
[Zope-dev] New location for Zope Collectors
Hi everyone, The issue collectors formerly hosted on collector.zope.org have been migrated to the main zope.org website and are now available at the following address:: http://www.zope.org/Collectors/ I have tried to find all links to these collectors, but there might be old links in various places that still point to collector.zope.org. The hostname collector.zope.org will, once the DNS change has propagated, point to www.zope.org. 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] New location for Zope Collectors
Already fixed. jens On Thursday, Oct 23, 2003, at 14:58 US/Eastern, Andreas Jung wrote: When I look at the default search results for the Zope collector then the latest pending issue has been filed in May which is nearly impossible. There must be something wrong. Andreas ___ 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 down
Just a quick heads-up: This morning we noticed some odd activity on cvs.zope.org that looked like someone had broken into the machine. We have shut the machine down completely and are in the process of installing new drives and doing a fresh install from the ground up. Then we will start restoring the data from the old drives. We're trying to get at least the basic services (ViewCVS site, CVS anonymous pserver access) up and running by tonight. Migrating the privileged user information to allow checkins will probably be done tomorrow. The collector.zope.org web site, which was served from the same machine, will probably end up being integrated into www.zope.org tomorrow and cease to exist as a separate Zope instance. 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] Etag support in page templates
In the case of empty Etags, I think that sending an empty header has been shown to be the wrong choice. I suggest it should be removed from the head and the 2_7 branch. For future reference to any committers: if you modify any HTTP headers sent by Zope, you very likely ought to discuss it before checking it in. Shane +1 Along with that the MS Author Via header garbage should at least be governed by some configuration flag. 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] Etag support in page templates
Jens Vagelpohl wrote: Along with that the MS Author Via header garbage should at least be governed by some configuration flag. No, no, no, you're not seeing the bigger picture... you don't need configuration flags for any of that stuff. It just shouldn't exist, period. If people need to clutter the protocol to make their clients work then they should do so with another filter program. In zserver's case thats going to be the proxy HTTP daemon that it talks to. I'm not looking at the big picture. I'm trying to avoid complaints from people that for one reason or another use those broken M$ clients. 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] AW: Caching prob with AHCM and headers
I know, I was just trying to figure out how this was supposed to work. Currently setting Last-Modified seems to be the only way to get something cached in Apache; Expires alone is no good, and adding an Etag header doesn't seem to have any effect either. Maybe this should be classified as an Apache problem? Shouldn't Apache cache pages that have Expires? Please keep in mind that **Apache is not a cache server**, it has caching attached more like an afterthought to the mod_proxy. If you want predictable caching you will need to use real caching software such as Squid. I personally have moved away from Apache even for small websites since there are some other issues with Apache caching, such as zero-length responses in some cases. 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] Very severe memory leak
Well, to at least reduce the immediate pressure, why don't you throw more RAM into that server? Memory is cheap. jens On Friday, Aug 22, 2003, at 17:38 US/Eastern, Leonardo Rochael Almeida wrote: Hi, For a long time now, one of our clients, running Zope 2.5.1, has been experiencing memory leaks. For a time this has been relieved by restarting Zope every day at 4am. Lately this was not enough, however, as Zope started taking more and more memory, to the point that it frequently required more than one restart during the day. The machine this is running on is a Xeon 500 MHz with 512 Mb of memory. Zope is a very memory intensive application, but 512Mb used to be enough for a medium sized portal. This Zope site makes very heavy use of both ZClasses and ZCatalog, and it appears to me that this worsening of perfomance and memory consumption was being caused by the increase in content, which caused an increase in the size of the ZCatalog and in the number of ZClass instances. A total of 6796 ZClass instances representing News Items are cataloged. There are other ZCatalogs and ZClass instances representing calendar events and other stuff (this is a very old Zope portal coded by hand in ZClasses, no CMF, no Plone, not even Pagina1, our ZClass based CMS) Fiddling with the cache parameters in the control panel showed that while we could keep the memory consumption to a point where the daily restart would be enough (say, with 10k objects per thread), we would get constant thrashing of cache objects, specially DateTime objects due to the ZCatalog queries, and the machine performance would be close to intolerable, whereas if the cache parameters where set to allow a fast performance (with 50k objects per thread) the machine would run out of memory in 3 to 4 hours. Needless to say this was with heavy use of RAMCacheManagers, not counting the accelerator proxy in front of it. Without the RAMCaches, the machine would go down in under 5 minutes of work hour load. Even with the caches on, the load would never go down from 2.0 during work hours. Last tuesday we decided no longer to wait for 2.6.2 and migrated the site to 2.6.1. We dealt with the ObjectManager-based-ZClass issue, reformed the ZCatalogs to replace the DateTime FieldIndexes with DateTimeIndexes and then had a working testing environment, which we stress tested lightly without detecting any problems and quickly moved to production. This was late at night The next morning we were surprised to notice the machine very quickly ran out of memory. The memory leak was *far more severe* than before. Zope needed a restart every 15m or so before it would send the machine into heavy swaping. In a very non-intuitive hunch I suggested we shut down all RAMCaches and, amazingly enough, this made the situation a bit more manageable. We're now restarting every 45 minutes. To our relief, disabling the RAMCaches had only a barely noticeable effect on performance. The site kept churning out pages really fast, a testatment to the optimization job done in the 2.6 series. The load on the machine is rarely above 0.8, except when it goes into swap :-) The number of DateTime refcounts in the Control_Panel, although much smaller than in Zope 2.5.1 is very high and, mostly importantly, constantly increasing, as far as I can tell. After 12 minutes of uptime, the top refcounts are: DateTime.DateTime.DateTime: 96168 BTrees._IOBTree.IOBucket: 43085 BTrees._IIBTree.IIBTree: 40400 BTrees._IIBTree.IIBucket: 23696 OFS.DTMLDocument.DTMLDocument: 23190 BTrees.OIBTree.OIBucket: 14582 BTrees._IIBTree.IISet: 12479 BTrees._IIBTree.IITreeSet: 10823 BTrees.OOBTree.OOBucket: 7088 OFS.Image.Image: 6860 OFS.DTMLMethod.DTMLMethod: 5894 DocumentTemplate.DT_Util.Eval: 3250 OFS.Image.File: 2796 BTrees._IOBTree.IOBTree: 2761 ZClasses.Method.MWp: 1592 In time, DateTime refcounts eventually dwarves the second place by an order of magnitude. I think this is related to the fact that DateTime instances are stored as metadata, even though the date indexes have been converted to DateTime indexes. The question is, why aren't those instances being released? What is holding on to them? I tried installing the LeakFinder product but discovered it didn't work before stumbling in a message in the archives that told me exactly that :-) The RefCounts view in the LeakFinder object fails with the following traceback: Traceback (innermost last): [...] Module DocumentTemplate.DT_Util, line 201, in eval - __traceback_info__: REQUEST Module string, line 0, in ? Module Products.LeakFinder.LeakFinder, line 240, in manage_getSample Module Products.LeakFinder.LeakFinder, line 163, in getControlledRefcounts Module Products.LeakFinder.LeakFinder, line 188, in resetCache TypeError: function takes at most 2 arguments (3 given) The code in question is: def resetCache(c, gc): cache = c._cache if gc: cache.minimize(3) # The minimum that actually performs gc.
Re: [Zope-dev] Authenticating with acl_users
what exactly is it you are trying to achieve? maybe someone can help if you let us know what the real motivation is. jens On Saturday, Mar 8, 2003, at 11:42 US/Eastern, Sondre Rønjom wrote: Ive been looking through AccessControl/User.py to understand the validate() methods paramteres. Im not sure what to put inside the request, and how to do it. I have been testing around, but I can only manage to do authenticate(), but this only tells if the user is valid and has the right password. The thing is, I also want to set AUTHENTICATED_USER, but not sure how to to this, but I have the idea validate() does all this for you, if you pass the right parameters. I have been searching at zope.org and google.com for a long time now, but cant find very much useful. The only parameters I have put in the REQUEST are __ac_user and __ac_password, but I know I also need object value and physical container of the object, but dont know how to find this. /Sondre ___ 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: Security internals, was Re: [Zope-dev] LOTS of roles?
hm... i could have told you that the LDAPUser class in the LDAPUserFolder product can do that but i had the whole thread mostly tuned out. initially it did not look like anything i could help with and the first posting was very long if i remember correctly. jens On Thursday, Mar 6, 2003, at 17:13 US/Eastern, Paul Winkler wrote: On Fri, Mar 07, 2003 at 08:56:59AM +1100, Adrian van den Dries wrote: (/me revisits LDAPUserFolder) Looks like the work is already done for you anyway: allowed() and friends check if the context has an attribute acl_satellite, and queries it for any additional roles, and it even keeps a cache. !! OMG !!! thank you - for some obscure reason it never would have occurred to me in a million years that LDAPUserFolder already does this. Well, duh. Huzzah open-source software! Amen! -- Paul Winkler ___ 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] ZLDAP and replication
the ZLDAPConnection product has not seen any active maintenance in more than 2 years now. i am sure it does not handle referrals. jens On Wednesday, Feb 26, 2003, at 02:51 US/Eastern, Jean Jordaan wrote: Hi Jeffrey all I'd just like to check something .. When running LDAP in a master/slave setup, if a client of the slave tries to update the directory, the slave returns a referral (pointing at the master) to the client, and the client has to retry the update at the master. That's steps 3 and 4 in this diagram: http://www.openldap.org/doc/admin20/ guide.html#Replicated%20Directory%20Service It doesn't look like ZLDAPConnection does this, or am I being obtuse? -- Jean Jordaan ___ 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] AIX
i think in general you will not get much support from anybody when it comes to exotic unices like AIX. there isn't many people who try to make it work. jens On Friday, Feb 21, 2003, at 21:12 US/Eastern, Jamie Heilman wrote: There never was an answer from anybody. Thats probably because nobody wants to admit to running AIX. ___ 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] consistent naming in ZEO releases
how about you change your code so it attempts to download both .tgz and .tar.gz? jens On Monday, Nov 25, 2002, at 09:03 US/Eastern, Andrew Sydelko wrote: On Mon, 25 Nov 2002 13:56:34 + Chris Withers [EMAIL PROTECTED] wrote: Andrew Sydelko wrote: Ok, whoever is in charge of zope.com releases of things like DCOracle2, Zope and ZEO need to decide if the release file names are going to end in .tar.gz or .tgz. Why does it matter? I have a script that builds zope. And part of that script is going to get the tarballs. When they change the name I have to go and change the URL (normally I just set the version number). Here's an example: version['ZEO']='1.0' [snipped lots of other installs] package = 'ZEO' if version.has_key(package): ver = version[package] install(package=package, dir='src', url='http://www.zope.org/Products/ZEO/ZEO-%s.tgz' % (ver), checkfile='src/ZEO-%s' % (ver)) install is a function that uses the parameters in it to decide what to do. You'll see that when I switched to ZEO 2.0 I had to change the URL. And I shouldn't have to go look up the URL every time to make sure it's the same... That's the whole point of my script. --andy. ___ 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] PathIndex unindex fix
+1 from me... most other PluginIndexes already fail gracefully when something to be unindexed has disappeared. IMHO all indexes should behave that way. jens On Thursday, Nov 21, 2002, at 08:24 US/Eastern, seb bacon wrote: Anyone object to me changing PathIndex so it swallows exceptions and logs them when unindexing content? On upgrading to Zope 2.6 some if the unindex paths seem to have got hosed, and I don't want this breaking my site. ___ 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] What catalog/index to use ...
Depends on your needs. ZCTextIndex is very easy to use and supports relevance ranking, TextIndexNG is supposed to be some kind of eier-legende-wollmilch-sau. Compare the features and make your choice. -aj isn't TextIndexNG much better with international character encodings and that stuff? and it has a lot more stemmers for various languages. jens ___ 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] Non Bloating Page Counter
I would like to create a Page Counter product that doesn't bloat. If a product is created that doesn't subclass History or UndoSupport does it still bloat? those have nothing to do with the fact that every time that hit counter fires some object will get updated and thus saved again. Zope is transactional, but products like ZLDAPConnection have the ability to be non-transactional what does this mean? Could I use this in my counter? the meaning of transactional as employed by the ZLDAPConnection has nothing to do with your concern about ZODB bloat. the ZLDAPConnection tried (it never got successfully finished) to hook into the ZODB transaction machinery to make sure writes to LDAP only happen if the whole transaction was indeed successful. i personally don't see a way to completely avoid ZODB bloat with a counter product stored in the ZODB itself. IMHO it is inherently bad to use ZODB-based hit counters in general for that very reason. jens ___ 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] LDAPRoleTwiddler / BasicUserFolder
why is that code no longer referring to the real userfolder anymore? it should not make calls to authorize/identify/authorize on self but on the LDAPUserFolder it is using as the user source. jens On Thursday, Oct 17, 2002, at 03:39 US/Eastern, Dirk Datzert wrote: Hi all, I try to solve some problems with LDAPRoleTwiddler an inherited version from BasicUserFolder I currently use a validate()-function which I saw similar in BasicUserFolder and in LDAPRoleExtender (modifications from Shane) My problem is that if self.authorize(user, a, c, n, v, roles): return user.__of__(self) in validate() does not work, but return user.__of__(self) work better, but does not the same as the API (which I don't know) expect. Can anybody give a hint ? Regards, Dirk used python code: # This must stay accessible to everyone def validate( self, request, auth='', roles=_noroles ): The main engine v = request['PUBLISHED'] # the published object a, c, n, v = self._getobcontext(v, request) name, password = self.identify(auth) user = self.authenticate(name, password, request) if user is not None: if user is not None: # On my Test-System it works with authorize() # On my Integration-System it works only without authorize() #if self.authorize(user, a, c, n, v, roles): return user.__of__(self) # Could not twiddle a user. Defer to other user folders. return None def authenticate(self, name, password, request): super = self._emergency_user if name is None: return None if super and name == super.getUserName(): user = super else: user = self.getUser(name, password) if user is not None and user.authenticate(password, request): return user else: return None Dirk Datzert.vcf ___ 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] LDAPRoleTwiddler / BasicUserFolder
being explicit is almost always better. you are relying on internal magic and it's not apparent from looking at the code you wrote. the validate implementation in the LDAPRoleExtender is the most correct one. shane worked on it for a while to make sure it does the most correct thing possible, and if anyone knows about the vagaries of acquisition/security and all its possible permutations it is him. jens On Thursday, Oct 17, 2002, at 08:37 US/Eastern, Dirk Datzert wrote: Hi Jens, why is that code no longer referring to the real userfolder anymore? it should not make calls to authorize/identify/authorize on self but on the LDAPUserFolder it is using as the user source. self.identify() should be the same as if getLUF().identify() since LDAPUserFolder and LDAPRoleTwiddler both inherited this from BasicUserFolder. self.authenticate() does a self.getUser() which refers to getLUF().getUser() and does twiddling in one step and return the right user-object which the API would expect. I think that self.authorize(user,...) is better than self.getLUF().authorize(user,...) because the authorize does the following in 1st line: def authorize(self, user,... ): (inherited from BasicUserFolder) user = getattr(user, 'aq_base', user).__of__(self) this would be different for self.authorize, where self would be the LRT and self.getLUF().authorize() where self would be the LUF. The user is seen in 2 different contexts by .__of__(self) . Maybe I'm think too complicated, Your opinion ? Regards, Dirk ___ 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] Debugging conflict errors? Hints please!
conflict errors do not imply conflicting writes by definition. there is a thing called read conflict, which is probably what happens to you. jens On Friday, Oct 11, 2002, at 07:47 US/Eastern, Stefan H. Holek wrote: Hi All! I am experiencing a lot of 'ZODB conflict error at ...' that I can reliably reproduce by hitting my browser's Refresh button at a high rate. The bad news is that the conflicts happen on pages that are not supposed to change anything in the ZODB but only display results of some SQL queries. My question is now how to find out what actually is causing the conflicts. The log entry refers to the page being served ('/very/long/path/detail_view'). As a matter of fact I am not even sure whether the log entry means that the 'detail_view' document has changed (which of course it hasn't), or something along the traversal path caused a ZODB write. Zope 2.5.1, ZEO 1.0 Any hints on how I could find the culprit appreciated. Thanks, Stefan ___ 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] find unused objects: hopefully the last misunderstanding...
extremely expensive. you would have to... - assemble a list of all objects IDs in the ZODB and then... - parse all contents of all objects and check against that ID list. you would probably need a little counter for every single ID that gets incremented upon finding its ID referenced, and all those that are left over with the counter at 0 in the end would probably be candidates for removal. this schema will fall down the moment your object IDs are not unique across the whole ZODB. besides, every object is potentially different in how you access and read its contents. if your whole intent is to have a cleaner ZODB and there is no pressing reason to do this cleanup, i would just forget about it. jens On Friday, Aug 30, 2002, at 07:48 US/Eastern, [EMAIL PROTECTED] wrote: * Starting at root, check all objects if they are referenced, * and produce a list of those which are not, for cleanup purposes. * Packing the database cleans up in this manner. Oh well. Third try: I know about the 'pack database' button. Garbage collection of this kind is not my problem. I have lots of scripts, dtml methods etc. everywhere which are perfectly well-known to the ZODB, nothing wrong with that, but which are simply not used by me anymore. No usage from other scripts nor methods nor documents. And these buggers I'd like to find. Finally unmistakeable? Tobias Herp ___ 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] Fix broken python on Mac OS X version 10.2
sorry for the crossposting, here's a little heads-up for the mac OS X crowd: upon upgrading to 10.2 (jaguar) you will most likely find that your python binary (along with most other self-compiled software) is broken. in the case of python a simple re-build (if you compiled from source, that is) fixes this. i added explicit instructions to the Zope and Python on Mac OS X HowTo at http://www.zope.org/Members/jens/docs/zope_osx i highly recommend re-building zope after that as well. jens ___ 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] Fix broken python on Mac OS X version 10.2
well, the basic cause is worse than that: they moved symbols around between system libraries. jens On Monday, Aug 26, 2002, at 12:11 US/Eastern, Barry A. Warsaw wrote: JV == Jens Vagelpohl [EMAIL PROTECTED] writes: JV sorry for the crossposting, here's a little heads-up for the JV mac OS X crowd: JV upon upgrading to 10.2 (jaguar) you will most likely find that JV your python binary (along with most other self-compiled JV software) is broken. I think the basic cause of this is that 10.2 upgraded gcc, and that's what breaks self-compiled binaries. -Barry ___ 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] Fix broken python on Mac OS X version 10.2
... which doesn't help people trying to run a current zope source release all that much... jens On Monday, Aug 26, 2002, at 17:13 US/Eastern, Jeffrey P Shell wrote: On 8/26/02 11:49 AM, Jens Vagelpohl [EMAIL PROTECTED] wrote: well, the basic cause is worse than that: they moved symbols around between system libraries. jens But nicely, they include Python (2.2, not even 2.2.1) on the Developer Tools CD. Finally. -- Jeffrey P Shell www.cuemedia.com ___ 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] limit to number of operations in a transaction?
in your script you must commit a transaction once in a while with get_transaction().commit(). when you use xml-rpc then every call to zope will end up being its own transaction and you will not have this problem. jens On Sunday, Aug 25, 2002, at 10:12 US/Eastern, Christopher N. Deckard wrote: Hello, So I've run into a problem. I had the need to migrate our a database of people from an old storage format to a new one. The old format uses Folders and Properties to store information about a person. Name, phone, email, address, etc. The new format uses a Product that I wrote which stores said data in a ParsedXML document. I have roughly 1,500 people in the database. I wrote a script to migrate the people. Basically it does getProperty for each property on each person folder, then creates the new person object which uses XML. Zope apparently cannot handle this number of operations in one transaction. Zope gets slower and slower and eventually becomes on responsive. It looks like the script has completed, but nothing is ever committed to the ZODB, and since Zope is unresponsive it must be restarted. This, as expected, kills that entire transaction which was never committed. Is it known that large numbers of operations, such as above, in a single transaction can cause problems? A transaction, of course, being a request, and an operation being something like manage_addProduct. I've solved the problem by using xmlrpc and for person in people calling my migrate_person script for only one person at a time. This is SO MUCH FASTER. I previously ran the script that migrates all of the people, and after 8 hours it still had not completed. Thoughts? -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] Re: Zope 2.4.3 patched Python 2.1.3 @ FreeBSD crashing
this will probably not help with zope 2.4.3 since that has other crash-bugs not covered by the python patch. upgrade to 2.4.4 or 2.5.1 instead. jens On Tuesday, July 16, 2002, at 02:11 , Myroslav Opyr wrote: Hi, In past times I was advised to apply a patch and increase stack size for pthreads of FreeBSD. I did and it helped for Zope 2.5.0 CMF 1.2 + PageTemplates. It was moderately stable situation but it appears to crash again. For other site (with other Zope version)... Zope Version(Zope 2.4.3 (source release, python 2.1, linux2),python 2.1.3, freebsd4) Python Version 2.1.3 (#4, May 15 2002, 17:31:48) [GCC 2.95.320010315 (release) [FreeBSD]] System Platform freebsd4 If portions (PT) of a web-page are rendered everything is ok. Management screens either has no problems. But rendering a compound PT-based page makes Zope crash with assertion STACK_LEVEL() = f-f_stacksize failed: file Python/ceval.c , line 695 on console. What is suggested solution? Increase pthreads stacksize? it was THREAD_STACK_SIZE=0x2 as advised... Thanks, m. -- Myroslav Opyr zope.net.ua http://zope.net.ua/ Ukrainian Zope Hosting e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] cell: +380 50.3174578 ___ 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] Restricted Compiler issues on FreeBSD? (Core Dumps...waaa!)
have you read about the python crash-bug stemming from tiny thread stack sizes on freebsd and applied the patch? the mailing list archives should tell you what to do. jens On Tuesday, July 16, 2002, at 09:43 , Jeffrey P Shell wrote: For a while now, Tracker has been core dumping on my with Zope 2.5.1 with both Python 2.1.2 and 2.1.3 on FreeBSD 4.5 (Intel). The culprit seems to be expressions that are heavy on parenthesis. For example, the following works: !--#let val=(init or (type == 'simple' and (_['sequence-key'] not in ['requester', 'supporter', 'priority', 'stage']) )) and _['sequence-item']-- But it core dumps when changed to: !--#let val=((init or (type == 'simple' and (_['sequence-key'] not in ['requester', 'supporter', 'priority', 'stage']) )) and _['sequence-item'])-- Don't ask me what this expression does - I just kept whittling at it until the crashes stopped. Then I went and found quite a few others. I made a lot of fixes by turning complex expressions into many smaller ones inside a single 'let' tag. Does anyone know other possible fixes for this issue? Is there some Python stack size setting I can set at compile time? I have some other code that has not survived the move to Zope 2.5.x/Python 2.1.x/FreeBSD. FWIW, the Python 2.1.2 used was from the BSD Ports, while the 2.1.3 was compiled by hand. -- Jeffrey P Shell www.cuemedia.com ___ 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] IIS / login bug
There is a bug in IIS[1] which causes cookies to be dropped during a redirect. a bug in IIS??? no way...:P Should my approach work? Are there better workarounds? i don't know your situation exactly, but if IIS is not a pressing requirement you can use apache for windows. jens ___ 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] re: First call to external method after restart fails
casey duncan put a fix into CVS for what you might be experiencing. it will probably show up with the first 2.6 betas. jens On Wednesday, June 5, 2002, at 11:11 , Emile van Sebille wrote: I found this post from Ted Skolnick but saw no follow-ups, and I am having the same problems. Ted, did you get this resolved? I have an external method that takes 3 params. After I restart Zope ( running on Linux ), I get the following error on my first call... Error Type: TypeError Error Value: rmlToPDF() takes at least 3 arguments (0 given) All subsequent calls work fine (i.e. a refresh in my browser, and no more error, my external method works ). I restart Zope as root. Anyone ever see this before? I just upgraded an account from 2.4.x to 2.5 binary on linux. -- Emile van Sebille [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 )
Re: [Zope-dev] Zope crash restart
I did. What is standard procedure if the situation like the one I've met appears? What is scenarion from bug report to product release without the bug found? i don't know. the people on the python-dev mailing list could help you with that question. jens ___ 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] Zope crash restart
add your comment, encouragement, flames et to the sourceforge bug tracker issue. i guess that would help most. jens On Wednesday, May 15, 2002, at 10:55 , Myroslav Opyr wrote: Hi, it look like it works! I have to give site some time to run to be sure. Where I can vote for a bug or to give comments? On SF.tracker issue? to make it go into release. As far as I understand the patch is quick-hack to make it work and do not solve the issue completely, just increase the stack size... There should be better solution, isn't it? Will it go into Python-2.1.4? m. -- Myroslav Opyr zope.net.ua * Ukrainian Zope Hosting e-mail: [EMAIL PROTECTED] cell: +380 50.3174578 On Wed, 15 May 2002, Behrens Matt - Grand Rapids wrote: Myroslav Opyr wrote: As far as I remember the issue was solved in Python 2.1.3, wasn't it? Or it was GC patch? No. Try my patch, that solves the problem Jens is talking about. ___ 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] Zope crash restart
this particular issue is *not* solved in 2.1.3 jens On Wednesday, May 15, 2002, at 10:00 , Myroslav Opyr wrote: As far as I remember the issue was solved in Python 2.1.3, wasn't it? Or it was GC patch? Ok, I'll try to patch sources... m. -- Myroslav Opyr zope.net.ua * Ukrainian Zope Hosting e-mail: [EMAIL PROTECTED] cell: +380 50.3174578 On Wed, 15 May 2002, Jens Vagelpohl wrote: python has a crashbug under FreeBSD due to FreeBSDs *tiny* thread stack size. search the mailing list, there were posts with workarounds. unfortunately, those workarounds involve patching python sources and recompiling. jens On Wednesday, May 15, 2002, at 09:50 , Myroslav Opyr wrote: Hi, There is installation: Zope Version (Zope 2.5.1 (source release, python 2.1, linux2), python 2.1.3, freebsd4) Python Version 2.1.3 (#1, May 5 2002, 06:29:09) [GCC 2.95.3 20010315 (release) [FreeBSD]] System Platform freebsd4 ZODB contains an instance of modified CMFSite (translated in Ukrainian, CMFSiteUA). System works perfectly well even on Zope 2.5.0 on Win32 platform but crashes on FreeBSD. Site was Exported (from Win32) and Imported (to FreeBSD). Local Filesystem View folders were deleted and recreated manually. As soon as somebody tries to touch that CMFSiteUA Zope crashes and restarts. Workaround found is: to enter management interface somwhere deeper, for example /Examples/manage or /Control_Panel/manage. Then Zope loads parts of the system into RAM and appears possibility to run the site. Sooner or later, when there is sufficient time-frame to unload all objects out of the RAM cache (no user activity), system turns back into unusable state and again there is need to bring it up with /Control_Panel/manage. . . Any hints? BTW, there is absolutely no output in debug mode. Just usual INFO(0) messages on startup. Crash and again usual messages. Watchdow process remains into memory but new child performing requests processinf are respawned. And again INFO(0) messages are flushed into stdout... Any help would be appreciated. Regards, Myroslav -- Myroslav Opyr zope.net.ua * Ukrainian Zope Hosting e-mail: [EMAIL PROTECTED] cell: +380 50.3174578 ___ 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] DB.py: pool_size
there is a common misconception that the number of threads and the pool_size defined in ZODB/DB.py are the same. they are not. number of threads is just that: the maximum number of threads the zope process will spawn (excluding extra threads, such as those used for zDaemon). the pool_size in ZODB/DB.py sets the number of ZODB database connections that are used by the application to interact with the ZODB. increasing the number of threads alone does not make much sense because no work can be done if a thread does not have a database connection out of the pool. you might try to carefully and slowly increase both numbers *in a sandbox, not on your live site* and test to see if it helps. jens On Saturday, May 4, 2002, at 01:00 , HoYin Au wrote: We've been experiencing some extreme lag on our Zope site lately, and have noticed that the bottleneck seems to be the 7 thread limit placed on ZODB. I was wondering if there are any remifications on increasing the pool_size variable in lib/python/ZODB/DB.py ? -Hoyin Au ___ 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] LDAPUserFolder
the LDAPUserFolder-tailored solution is already available: http://www.dataflake.org/software/ldaproletwiddler jens On Friday, May 3, 2002, at 05:00 , Stefan H. Holek wrote: On Wed, 1 May 2002, Dirk Datzert wrote: We decide to install only one LDAPUserFolder in the Root-Folder and configure him to do the authentications against LDAP. In the subfolders we want to install 'LDAPUserFolders' which should not be configured again, but use the top-level LDAPUserFolder. In this 'LDAPUserFolders' there would be done the Groups Management on an base of LDAP-Group to Zope-Role mapping. Might the Slave User Folder help you? http://www.zope.org/Members/srichter/Products/SlaveUserFolder Stefan ___ 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] LDAPUserFolder
well, if all the user folders are configured the same way *except* for the groups-to-role bit then you should get the functionality you need. it's not trivial to program something that would allow retrieval of a user object at the root and then somehow mangle the list of roles based on where you are in the site. you might be able to patch the folder class so that local roles are computed instead of just looked up, but that's hackish. jens On Wednesday, May 1, 2002, at 08:32 , Dirk Datzert wrote: Hi Jens, one question about possibilities of LDAPUserFolder: We decide to install only one LDAPUserFolder in the Root-Folder and configure him to do the authentications against LDAP. In the subfolders we want to install 'LDAPUserFolders' which should not be configured again, but use the top-level LDAPUserFolder. In this 'LDAPUserFolders' there would be done the Groups Management on an base of LDAP-Group to Zope-Role mapping. Do you think it is possible to split this feature from LDAPUserFolder (with a little programming) ? Where should I look on programming and what need I take care about ? Regards, Dirk ___ 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] LDAPUserFolder
i guess what you would need is an object that looks like a user folder but most calls are redirected to a second, real, user folder. this object would need to implement the typical user folder API and redirect most calls, but override those methods that retrieve/compute the roles for a given user. jens On Wednesday, May 1, 2002, at 08:59 , Dirk Datzert wrote: Jens Vagelpohl schrieb: well, if all the user folders are configured the same way *except* for the groups-to-role bit then you should get the functionality you need. Yes, I expect that. but what if you have 100 user-folders configured and need to change one option ? a lot or work. it's not trivial to program something that would allow retrieval of a user object at the root and then somehow mangle the list of roles based on where you are in the site. What is about the following: Have a central point of Configure, LDAP Schema, Custom Forms for all LDAPUserFolders and Caches, Users, Groups are local ? And do lookups again, not computed. you might be able to patch the folder class so that local roles are computed instead of just looked up, but that's hackish. jens On Wednesday, May 1, 2002, at 08:32 , Dirk Datzert wrote: Hi Jens, one question about possibilities of LDAPUserFolder: We decide to install only one LDAPUserFolder in the Root-Folder and configure him to do the authentications against LDAP. In the subfolders we want to install 'LDAPUserFolders' which should not be configured again, but use the top-level LDAPUserFolder. In this 'LDAPUserFolders' there would be done the Groups Management on an base of LDAP-Group to Zope-Role mapping. Do you think it is possible to split this feature from LDAPUserFolder (with a little programming) ? Where should I look on programming and what need I take care about ? Regards, Dirk ___ 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] LDAPUserFolder
log in with the superuser account (create one using the zpasswd utility if needed), then you can delete the root user folder and create a new one. user folders are one of the few things that can be owned by the superuser. jens On Tuesday, April 30, 2002, at 09:40 , Dirk Datzert wrote: Hi, how do I replace a acl_users folder in the Root by an working LDAPUserFolder ? Regards, Dirk ___ 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] _v_ and ZEO
Ive never looked at LDAPUserFolder so this may be irrelevant, but is it possible for LDAPUserFolder to validate that the cached _v_ information is still fresh? If that validation is quicker than fetching a new copy then this is still an overall win. yes it does have a very rough way of validating the cache. there's a timeout on the cached objects. and yes, it's a *big* performance win. jens ___ 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] Re: [Zope3-dev] Are there Graphic Designers?
as a data point, here is browser data for one of the sites i own. the data is produced by webalizer. NS4 is becoming negligible:: Top 25 of 73 Total User Agents # HitsUser Agent 1 47194 81.46% Micro$haft Internet Exploder 2 16780 28.96% MSIE 6.0 3 16273 28.09% MSIE 5.5 4 11863 20.48% MSIE 5.0 5 757913.08% Netscape 6 31335.41% Mozilla/5.0 7 26694.61% Mozilla/4.7 8 19263.32% WebCopier v2.5 9 18683.22% MSIE 4.0 10 753 1.30% Mozilla/3.01 (compatible;) 11 304 0.52% MSIE 5.1 12 280 0.48% Mozilla/4.6 13 279 0.48% Mozilla/4.0 14 233 0.40% Googlebot/2.1 (+http://www.googlebot.com/bot.html) 15 220 0.38% Mozilla/2.0 16 186 0.32% Mozilla/4.5 17 174 0.30% Opera/6.0 18 134 0.23% Ask Jeeves) 19 78 0.13% ia_archiver 20 53 0.09% Mozilla/3.0 21 47 0.08% MSIE 3.0 22 39 0.07% MSIE 4.5 23 37 0.06% eCatch/3.0 24 35 0.06% MSProxy/2.0 25 31 0.05% Szukacz/1.5 (robot; www.szukacz.pl/jakdzialarobot.html; szuka On Friday, April 5, 2002, at 12:47 , Fred L. Drake, Jr. wrote: Stephan Richter writes: I think we can safely rely on CSS. Common, Zope 3 is a new product, and if someone needs to make it backward Browser-compatible, he can always implement a less fancy CSS-free skin. Argh! I can hear Guido tell us about his Netscape 4 now... There are still a *lot* of people using that one and it's ilk. Browsers at that level know just enough CSS to make it painful. ;-( I've spent more time making the Python docs work in NS4 than making them look good in more modern browsers, and the more advanced efforts I've made can't go in because the older browsers just don't come close! -Fred -- Fred L. Drake, Jr. fdrake at acm.org PythonLabs at Zope Corporation ___ 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] Re: [Zope3-dev] Are there Graphic Designers?
mac OS X browsers: - IE 5.1 - mozilla 0.99 (=1.0) i won't include OmniWeb because its CSS support is still flaky. jens On Friday, April 5, 2002, at 04:04 , Dan Pierson wrote: On Fri, 2002-04-05 at 12:41, Paul Everitt wrote: However, it is important to note: Zope 3 is *not* a product. It is used to build products. The core ZMI is needed to the extent that it helps build or administer products. Thus, Zope 3 is not like YABB. [snip] With all this in mind, I think we can require developers to use standards-compliant browsers, and allow/facilitate them to build backwards-compatible interfaces. I agree. IMHO the browser compatibility requirements for the new ZMI should be summarized as: Current IE Mozilla 1.0 Konqueror (KDE 3.0 version) ...what's the current state of Mac browsers... No Flash Anyone building or maitaining a Zope site shouldn't have problems running one of these. On the other hand, relying on IE-only features would be bad for those of us building only on Unix/Linux. Ditto for folks in the Mac world. What other OS's are important for site builders? dan ___ 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] Error : exceptions.SystemExit
it says zope has exited normally. i think that's a pretty clear explanation of what happened (meaning this error is completely benign). jens On Friday, February 15, 2002, at 09:30 , Pascal Samuzeau wrote: Hi, I've got this error when I shutdown my Zope : PAn error was encountered while publishing this resource. /P PSTRONGexceptions.SystemExit/STRONG/P Zope has exited normally.p !-- Traceback (innermost last): File /src/Zope-2.4.1-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /src/Zope-2.4.1-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 187, in publish File /src/Zope-2.4.1-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 171, in publish File /src/Zope-2.4.1-solaris-2.6-sparc/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_shutdown) File /src/Zope-2.4.1-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: manage_shutdown) File /src/Zope-2.4.1-solaris-2.6-sparc/lib/python/App/ApplicationManager.py , line 411, in manage_shutdown (Object: LockableItem) SystemExit: 0 -- My Zope version is : Zope 2.4.1 (binary release, python 2.1, solaris-2.6-sparc), python 2.1.0, sunos5) My Python Version 2.1 (#2, Jun 22 2001, 11:02:37) [GCC 2.8.1] . Any idea ? Sincerily PS -- Oreka ! Nous sommes l'internet moins cher ! Surfez 25% moins cher avec http://www.oreka.com ___ 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] Newbie: manage_add DTML access to product variables
did you look at the LDAPUserFolder? jens On Tuesday, February 5, 2002, at 05:46 , John Hall wrote: I'm fairly new to Zope and Python, so please forgive me if this is a stupid question. I'm trying to add a new exUserFolder authentication plugin using LDAP. I've copied the Radius plugin for the most part and have almost everything working except I wanted to have a list of possible methods (ways of using the LDAP database to authenticate a user) that the Zope Admin chooses from on the manage_add DTML page. I can't figure out how to keep the list in the python code for the object where it would be easy to update when I add new methods, but still access the list in my manage_add DTML page in a dtml-in loop. When the manage_add DTML is rendered, my object does not yet exist (the admin's response to the manage_add page is passed to a python function that actually creates the object). I have two questions, then. 1. How do I format an object to use in a dtml-in loop? (I'm thinking it needs to be a list of dict's). 2. How do I access a function or variable in a Product's python code directly from DTML (or how do I add a callable method in Zope's DTML namespace from a Product's python code?) I think my major problem here is lack of understanding of how Products are accesible within the DTML namespace. Thanks in advance, JMH ___ 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] REQUEST.AUTHENTICATED_USER question
vio, for your situation the simplest thing would be to use the CookieUserFolder (see http://www.dataflake.org/software/cookieuserfolder) which is as simple as the standard user folder and adds cookie-capability and customizable login and logout forms. no need to get all tripped up in zpatterns or user auth sources or other confusing stuff. jens On Thursday, January 24, 2002, at 01:35 , vio wrote: * Leonardo Rochael Almeida [EMAIL PROTECTED] [020124 00:03]: Hi vio, Pardon our insistence in helping you out, but you asked to be told if something in your description smelt rotten and, besides the fact that yes, you are reinventing the wheel (and reinventing it square, by the way :-), there isn't a single thing in the scenario you described below that isn't possible with plain vanilla Zope (ok, plain vanilla Zope is an oxymoron. There is nothing 'plain' about an out-of-the-box Zope, but I digress :-), you don't even need CoreSessionTracking as far as I understand it! First, thanks again for 'insisting' in helping me out. Really appreciate it! Ok, you asked what I really want, and it's very 'plain vanilla' stuff. In a sentence: to log users from a custom dtml page. Period. In more than one sentence: I want to 'integrate' the login process and 'user management' into my own product, give it my own product's 'look and feel' , to create a consistent GUI and user experience. Idealy, I'd prefer just using plain Zope, no additional 3rd party products. But I really would prefer to present the user with a nicely customised login page instead of the standard Zope dialog. Well, that's about it. Looking for a solution here has been a great learning experience into Zope security, first of all. Now all your suggestions are pointing out towards using an existing product, 2 names flying around: LoginManager and exUserFolder. LoginManager would seem more appealing, as some comments I've read would suggest that it's very customizable. My problem with that is that Zope won't 'chew' it properly, spits it out with ImportError: can't import name 'expr_globals' in Products/ZPatterns/Expressions.py line 38. Indeed, after browsing the sources, no trace of 'expr_globals' anywhere. Deprecated? Any idea what this was replaced with (by the way, in case you' re wondering, I'm running on Zope 2.4.1 with python 2.1, while on the other hand LoginManager-0-8-8b1 with ZPatterns-0-4-3b1 and PlugIns-0-4-3b1 are trying to earn a living on my hard drive). exUserFolder installed ok, so I'll give it a test drive also. But some hints on debugging LoginMgr would be also appreciated. Cheers, Vio ___ 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] REQUEST.AUTHENTICATED_USER question
vio, make sure you read the README so you don't lock youself out if the login form does not have the correct input fields. jens On Thursday, January 24, 2002, at 10:55 , vio wrote: Excellent! Precisely what I'm looking for. Thanks! Vio * Jens Vagelpohl [EMAIL PROTECTED] [020124 10:46]: vio, for your situation the simplest thing would be to use the CookieUserFolder (see http://www.dataflake.org/software/cookieuserfolder) which is as simple as the standard user folder and adds cookie-capability and customizable login and logout forms. no need to get all tripped up in zpatterns or user auth sources or other confusing stuff. jens ___ 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] 2.5.0b4: how to deadlock/DoS your Data.fs
you're explaining the symptoms again, but i think the main issue here is about reading the documentation. take SiteRoot as an example. i type siteroot into the searchbox at zope. org and already the first two hits talk about the _SUPPRESS_SITEROOT thing, the second one with an example even and telling byou to do this if you lock yourself out. so the documentation is available. as far as the Virtual Host Monster goes, it only reacts when it sees specially rewritten URLs that ususally get set in your apache configuration. it does not do anything if your zope itself listens on a HTTP port and you enter the management interface that way. just like with anything else, a software author cannot prevent people from shooting themselves in the foot if they don't know what it is that they are installing or how it really works. jens On Tuesday, January 22, 2002, at 01:53 , Pierre Fortin wrote: Well... pointing my browser to http://localhost:8080/manage gives errors due to everything getting re-written to entities which don't exist yet; the frameset's three frames point to http://localhost:8080/fubar/manage* which are not setup. ^^^ ^ My point is that it is way too easy to (yes) toast your ZODB as a result. In other words, inability to access the manage page is equivalent to a toasted ZODB since there is no [visible] way back in... the manage page is no longer accessible if the first thing I do is add a VHM or SiteRoot... Injecting a rewrite rule between the browser and Zope's http://localhost:8080/manage won't help when going directly to http://localhost:8080/manage gives errors which prevent doing anything else to the ZODB; but hey... I'm re-learning Zope (which didn't have VHM back then, IIRC), and being unable to access the ZODB after adding a single item to a virgin copy is not a very friendly loophole, IMHO. Even following http://www.zope.org/Members/Jace/apache-vhm appears to assume that a Zope site already exists... am I wrong...? BTW, did you really mean suppress? If so, I haven't found that yet... (pointer?) If not, see above. http://www.zope.org/DocProjects/AdminGuide/Project/FrontPage states Complex software without documentation is hard to sell someone on, IMHO. --willdawg which kinda says it all... If the above results in unusable ZODB; why should I waste my time building content if my first experience is to lose access to the ZODB..? The way I see it right now is that my confidence in Zope has been shot down by a rather simple setup attempt locking me out... [It's late, I'm really tired; so hope this makes some sense...] Pierre On Tue, 22 Jan 2002 00:18:56 -0500 Jens Vagelpohl [EMAIL PROTECTED] wrote: did you read the documentation that explains how to suppress e.g. site roots by inserting certain names into the URL? installing site roots or virtual host monsters does not toast any ZODB. jens On Tuesday, January 22, 2002, at 12:10 , Pierre Fortin wrote: Hi, I've been away from Zope for nearly two years and thought I'd give 2.5.0b4 a whirl... instead, it's giving me a spinning head... I have multiple sites and would like to give Zope another try... When I first go into Zope at localhost:8080/manage, the first thing I tried was to add a VirtualHostMonster (specifying all the fields)... Big mistake #1... the Data.fs is toast -- no way to access it... Re-install and try again... This time, I try SiteRoot, specifying the fields: pfortin.com http://pfortin.com/ /Z Big mistake #2! Re-install and try again... This time, I do the same thing; but without specifying a Base... Big mistake #3! In every case, I was left with an unusable Data.fs because the http://localhost:8080/manage page was now pointing to non-existent data.. . I'm off to do some more reading; but the intent was to try to setup 2 virtual hosts on localhost:8080 without disturbing the running hosts on port 80... but I ended up with deadlocked files since main screen points to http://localhost:8080/fubar/manage* which are not setup. Pierre ___ 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
Re: [Zope-dev] REQUEST.AUTHENTICATED_USER question
the user gets modified automatically, provided you use common login-methodology and a user folder that supports it. you don't set the user manually. jens On Monday, January 21, 2002, at 12:35 , vio wrote: Hi, Does anybody know what is the method call to modify the AUTHENTICATED_USER attribute? I am unable to trace where REQUEST feeds data for its AUTHENTICATED_USER attribute. Some context to my question: I am using a custom method to authenticate users coming to my site. So when the user logs in, he is 'Anonymous User' (from call: AUTHENTICATED_USER.getUserName()). But after his login name and password checked ok, how do I switch his identity in Zope from 'Anonymous User' to his/her new identity? What I am looking for is that next time I call 'REQUEST.AUTHENTICATED_USER.getUserName()' to get the new UserName he just logged in as, not 'Anonymous User' again. Examining CookieCrumbler.py source, this authentication product uses the 'before_publishing_traverse hook' mechanism. But isn't there a simpler way to do this than modifying REQUEST.RESPONSE at each traversal? Sounds like a lot of overhead. Vio ___ 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] REQUEST.AUTHENTICATED_USER question
the user folder does this switch. it's not something you should do manually. by the way, since replying to your previous email to me bounced back ([EMAIL PROTECTED] is unknown) i'm uncluding that here: ** vio, i'm not sure what user folder products you were looking at, the CookieCrumbler is *not* a user folder. normal user folders do not use BeforeTraverse. look at the source for the stock user folder (lib/python/AccessControl.User.py), it is pretty much the simplest implementation around. jens On Monday, January 21, 2002, at 09:23 , [EMAIL PROTECTED] wrote: But setting the user 'programmatically' is precisely the point of a custom login method. If I can't set the user programatically inside my code, what' s the point in a 'custom' login method then? Anyway, I know it' s feasable, because all the other 'customised' login products are doing precisely that (after each authenticating the user in their own specific way). And Zope does it in module HTTPResponse.HTTPResponse.unauthorised() (called with REQUEST['RESPONSE'].unauthorised()). But I haven't totally figured it out how that works (how Zope switches user identities ?). And the two 'custom UserFolder' products I've examined both seem to use ZPublisher.BeforeTraverse to 'make' this switch happen, somehow. Hence my question to this list: not 'if' the user can be switched (not 'manually' but 'programmatically'), but 'HOW'! Cheers, Vio *** jens On Monday, January 21, 2002, at 10:32 , vio wrote: The point in a customised login method is precisely to do just that: validate user credentials with some custom scheme. If interested, this is trivial to do with a valid UserFolder instance around: 'if my_custon_loginForm_password == Users_folder.getUser(my_custon_loginForm_loginName)._getPassword(): and here SWITCH to the authenticated new user identity'.And Voila! No sweat. But I just don't know nor understand how to do that switch yet, 'programmatically'. * Jens Vagelpohl [EMAIL PROTECTED] [020121 09:02]: the user gets modified automatically, provided you use common login-methodology and a user folder that supports it. You must be referring to the routine HTTPResponse.HTTPResponse.unauthorised(), called with REQUEST.RESPONSE.unauthorised(). It just happens that I really don't like that 'Basic Authentication' dialog, that's why I want to use mine. So I've done half of the job to that end, only remaining problem is to switch 'programmatically' to the new authenticated user id. Doing something like 'REQUEST['AUTHENTICATED_USER'] = my_custon_loginForm_loginName' seems to have no effect, because the user is still 'Anonymous User' (found with 'AUTHENTICATED_USER.getUserName()'). If only I could understand where REQUEST gets its data for its 'AUTHENTICATED_USER' attribute, I could simply change that data source, and I'd be done. But I don't still understand how REQUEST gets all the data to its attributes. you don't set the user manually. Of course you do ('programmatically' not 'manually'), as proven by all the customised 'login' products out there, who are doing just that. Only the one I studied so far (CookieCrumbler) seems to re-write the REQUEST.RESPONSE at each traversal. Which to me seems like a lot of overhead. If someone could point me to where Zope keeps user state (I believe with a cookie on the user's browser, but where in the source does Zope set this cookie up?), I could simply re-write that cookie with the new User ID ... Just a thought of a simple and elegant solution (aka 'magic bullet') for my problem. Vio jens On Monday, January 21, 2002, at 12:35 , vio wrote: Hi, Does anybody know what is the method call to modify the AUTHENTICATED_USER attribute? I am unable to trace where REQUEST feeds data for its AUTHENTICATED_USER attribute. Some context to my question: I am using a custom method to authenticate users coming to my site. So when the user logs in, he is 'Anonymous User' (from call: AUTHENTICATED_USER.getUserName()). But after his login name and password checked ok, how do I switch his identity in Zope from 'Anonymous User' to his/her new identity? What I am looking for is that next time I call 'REQUEST.AUTHENTICATED_USER.getUserName()' to get the new UserName he just logged in as, not 'Anonymous User' again. Examining CookieCrumbler.py source, this authentication product uses the 'before_publishing_traverse hook' mechanism. But isn't there a simpler way to do this than modifying REQUEST.RESPONSE at each traversal? Sounds like a lot of overhead. Vio ___ 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] 2.5.0b4: how to deadlock/DoS your Data.fs
did you read the documentation that explains how to suppress e.g. site roots by inserting certain names into the URL? installing site roots or virtual host monsters does not toast any ZODB. jens On Tuesday, January 22, 2002, at 12:10 , Pierre Fortin wrote: Hi, I've been away from Zope for nearly two years and thought I'd give 2.5.0b4 a whirl... instead, it's giving me a spinning head... I have multiple sites and would like to give Zope another try... When I first go into Zope at localhost:8080/manage, the first thing I tried was to add a VirtualHostMonster (specifying all the fields)... Big mistake #1... the Data.fs is toast -- no way to access it... Re-install and try again... This time, I try SiteRoot, specifying the fields: pfortin.com http://pfortin.com/ /Z Big mistake #2! Re-install and try again... This time, I do the same thing; but without specifying a Base... Big mistake #3! In every case, I was left with an unusable Data.fs because the http://localhost:8080/manage page was now pointing to non-existent data.. . I'm off to do some more reading; but the intent was to try to setup 2 virtual hosts on localhost:8080 without disturbing the running hosts on port 80... but I ended up with deadlocked files since main screen points to http://localhost:8080/fubar/manage* which are not setup. Pierre ___ 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] Cache detail error
ok, i reproduced it. looks like having *any* ZClass among the products in your products folder will cause this symptom. i told brian about it and i assume he will fix it for CVS. jens On Wednesday, January 9, 2002, at 11:55 , Brian Lloyd wrote: Clicking on Cache detail in the Debug Information Control Panel, I get the following traceback: Zope Error! Zope has encountered an error while publishing this resource. Error Type: AttributeError Error Value: __module__ Hi Andrew - I'm not able to reproduce this with a stock 2.5b3 install :( What products do you have installed? From looking at the code, it looks like you somehow have an object in your ZODB cache whose class has no __module__ attribute. I'm not sure how that would happen, unless the __class__ of the object is not really a class :( Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.361.1716 Zope Corporation http://www.zope.com ___ 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] Cache detail error
my own quick test works now. :) jens On Wednesday, January 9, 2002, at 02:01 , Brian Lloyd wrote: ok, i reproduced it. looks like having *any* ZClass among the products in your products folder will cause this symptom. i told brian about it and i assume he will fix it for CVS. jens I just checked in a fix to the head and 2.5 branch. Jens, could you do a quick update and check that it works for the sandbox where you reproduced this? Thanks! Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.361.1716 Zope Corporation http://www.zope.com ___ 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] LDAP on Zope 2.5.0b2
i have it running on 2.5beta3 without a problem. try upgrading your zope. jens On Friday, January 4, 2002, at 02:29 , Peeyush Garg wrote: Hi, Has anybody successfully installed LDAPUserFolder on Zope2.5.0b2 (on Linux). When I compile python-ldap module and install it alongwith LDAPUserFolder, it shows as a installed product in the Zope management screen, but when I try to connect to the LDAP server (openldap 2.0.18) also running on the same machine, it says 'connection settings not ok...'. Interestingly, when I install LDAPUserFolder on Zope 2.4.3 running on a WinNT 4.1 workstation and use the same connection settings, it connects successfully and I'm able to query the LDAP database. Any ideas why..?? ~Peeyush. ___ 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] LDAP on Zope 2.5.0b2
i only ever use python-ldap 1.10alpha3, that's all i test against because it's a known quantity. anything else is way too much in flux. jens On Friday, January 4, 2002, at 05:25 , Peeyush Garg wrote: Hi Jens, I get the same error message with installation of 2.5.0b3. Do you have the latest files checked out for python-ldap module? Any other clues? I've tried several combinations and not any luck yet. ~Peeyush. - Original Message - From: Jens Vagelpohl [EMAIL PROTECTED] To: Peeyush Garg [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, January 04, 2002 12:30 PM Subject: Re: [Zope-dev] LDAP on Zope 2.5.0b2 i have it running on 2.5beta3 without a problem. try upgrading your zope. jens On Friday, January 4, 2002, at 02:29 , Peeyush Garg wrote: Hi, Has anybody successfully installed LDAPUserFolder on Zope2.5.0b2 (on Linux). When I compile python-ldap module and install it alongwith LDAPUserFolder, it shows as a installed product in the Zope management screen, but when I try to connect to the LDAP server (openldap 2.0.18) also running on the same machine, it says 'connection settings not ok...'. Interestingly, when I install LDAPUserFolder on Zope 2.4.3 running on a WinNT 4.1 workstation and use the same connection settings, it connects successfully and I'm able to query the LDAP database. Any ideas why..?? ~Peeyush. ___ 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] Zope server speed
what i have done before to get around the speed penalty is to create an external method. the external method calls the ZSQL method directly and iterates over the result objects to pull out all interesting attributes and stick them into simple python objects, in this case i returned a list of dictionaries from the external method. in DTML the iteration over it still looks the same but it was much faster because there is no security enforced on the simple python objects returned from the external method. jens On Thursday, December 6, 2001, at 09:33 , MANOTTI Alessandro wrote: Thank you for your suggestions (thanks to Matt). I will try to make smaller but more requests (1000 requests of 1000 records). I will even try to bypass Zope and write an external method in Python (I know Pytho very well). About this solution: can you tell me what I have to do to use ZOracle directly in Python (import ... ? ) ? Thanks to everybody! -Original Message- From: Matthew T. Kromer [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 06, 2001 15:27 To: MANOTTI Alessandro; [EMAIL PROTECTED] Subject: Re: [Zope-dev] Zope server speed Hi Alessandro, Zope and Python combined aren't too bad if you write some wrappers that help you manipulate data; the problem comes about when you try to do large naive queries -- there is a LOT of overhead in taking Oracle data, encapsulating it in Python objects, and then wrapping that in the Zope machinery. I have a sample database in Oracle of US Zip codes -- it has about 45,000 records in it. I can pull this into DCOracle2 on the C adapter side (dco2.so) in less than a second. However, wrapping each result cell in a python object blows that up into about 9 seconds. If I were to iterate over the whole thing in Zope (which I haven't timed) it would get a LOT longer, because Zope is enforcing policy on every object accessed. So, one of the ways to make that go faster is to use python modules 'outside' of Zope (ie external methods) to perform large calculations which takes a ZOracleDA connection object to get a cursor object on the database, does the query directly, and formats and returns the results. I realize this isn't ideal, but Zope is not optimized for the case of extract thousands of records from the database and format them in a huge table. Zope likes extract hundreds of records from the database and format them in a big table instead. With each release, Zope has more features that enable you to program through the web, but when you're doing performance intensive calculations, it's usually time to write a python module and plug it in to zope (via an external method, or by writing a product). If you have the time to learn, I suggest the product route as being more satisfying, but it can be more frustrating as well. - Original Message - From: MANOTTI Alessandro [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 06, 2001 8:52 AM Subject: [Zope-dev] Zope server speed HI all, I have a problem: my company is looking for an application server. I know Zope (I presented it), and a friend of mine presented Macromedia ColdFusion. We made some tests about the speed of the systems, arghh!!! Zope is VERY slow compared to ColdFusion! Some examples: I used Zope with DCOracle2 drivers to connect and extract 257000 (yes! it is a test... two hundred fiftyseven thousand records!) and Zope took more than 10 minutes, since I stopped it after that time (call SQL and print data via dtml-var ... TAG). The same PC, the same server, ColdFusion took about 2 minutes to complete the operation!!! Coldfusion is more than 5 times faster than Zope!!! PHASE 2: I said: ok, maybe Zope is slower that Coldfusion in TAG formatting... and I tried to get the records and perform a calculation, without no output... Sigh! the results are the same! I am depressed, since I talk about Zope very well in my company, but now... Coldfusion and Zope are similar, so we shall select ColdFusion to develop web applications. SIGH !!! Can I try something to increase Zope power?! Alessandro Manotti Presidente dell'Associazione RIUSA Sito web: http://riusa.apritisesamo.net email:[EMAIL PROTECTED] mailing-list: [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
Re: [Zope-dev] LDAP
magnus, the LDAPUserFolder has SHA password handling hardcoded into it. in order for it to produce crypy passwords you'd have to look up the few places where it creates a password and change it to use crypt. i chose SHA because to the LDAP server itself it does not make any difference whether it's SHA or CRYPT and SHA is marginally more secure. as far as your login problems go, look up a user record on the Users tab and see if that record has any roles associated with it. you must also ensure that the user record you are trying to retrieve has permissions inside LDAP to look up itself and permission to look up the groups associated with it. the ACLs in slapd.conf govern that piece. you could use ldapsearch to emulate these searches by binding with the respective user's DN and passowrd and looking up its own details as well as its own groups. jens P.S.: LDAP and trying to use it for zope authentication can be very painful to set up if you're not experienced with LDAP first. there are a *lot* of factors and pitfalls involved. you must have a good understanding about how LDAP works, knowledge about LDAP schemas and LDAP ACLs. On Thursday, November 22, 2001, at 05:33 , Magnus Heino wrote: Hi. I'm struggeling with zope, cmf and ldap. I started of with a fresh RH7.2 installation. I ran the openldap migration scripts. Then created users using the posixAccout and posixGroup class. These classes seem to be different from what is recommended in the LDAPUserFolder product. Anyway, I have added an LDAPUserFolder, and I am able to add new new users, browse users, add groups (LDAPUserFolder cannot handle posixGroups). What I can't do though, is login using this info. If I from the management page in LDAPUserolder changes password, the encryption will change from the current Crypt, to SHA. When it is SHA, I cannot login on using pam. But even if I have sha, logging in via LDAPUserFolder still doesn't work. So, does anyone have a clue of whats going on? :) I haven't used ldap before, so it might just be me doing something stupid... all I want is an ldap database, using classes that work both in zope and with pam. /Magnus ___ 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] compiling Zope 2.4.1 on Mac OS 10.1
if you have no compelling reason for running Zope 2.3.2 and Python 2.0 i highly suggest moving up to a combination of Python 2.1 (which is much more OSX-friendly) and Zope 2.4.1. jens On Sunday, October 7, 2001, at 09:04 , Itai Tavor wrote: Has anyone managed to do this procedure with Python 2.0? The -flat_namespace flag does not help and I'm still getting twolevel_namespace errors. I'm running Zope 2.3.2 and I'd like to avoid the startup warnings, as well as any possible incompatibilities with Python 2.1/2.2. Itai Jens Vagelpohl wrote: i think i found a working solution. since my knowledge of compilers and linkers isn't the greatest i'll just explain what i did. trying to compile python2.1.1 on OS X 10.1 failed for me displaying the very same error. searching through apple's discussion i found the following link: http://fink.sourceforge.net/doc/porting/shared.php it explains that some linker/compiler default options have changed. in order to get python compiled and running i edited the toplevel Makefile after running ./configure and edited the lines starting with LDSHARED and BLDSHARED, this is what they look like now in my setup: LDSHARED= $(CC) $(LDFLAGS) -bundle -flat_namespace -undefined suppress BLDSHARED= $(CC) $(LDFLAGS) -bundle -flat_namespace -undefined suppress notice the -flat_namespace switch, this gets rid of the new default twolevel_namespace that complains about undefined warning. running make was now successful and i was able to compile and run Zope 2.4.1. you will probably have to recompile your python to set that switch under 10.1. i only did some light testing, no guarantees and before using this in production you might want to read up on those compiler/linker options... jens -- -- Itai Tavor -- Je sautille, donc je suis.-- [EMAIL PROTECTED]-- - Kermit the Frog -- -- -- -- If you haven't got your health, you haven't got anything -- ___ 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] compiling Zope 2.4.1 on Mac OS 10.1
well, the actual extension does not matter. you could as well specify something like --with-suffix=.mary_had_a_little_lamb if you wanted... for a more technological explanation, when the compile is done the executable is copied into the root of the python source tree. by default the name of the executable is python. this would not be a problem if it was not for the case insensitivity of the HFS file system used by most OS X users. there is a folder named Python in the root of the tree as well. trying to copy python into the root will fail because it collides with Python. the --with-suffix will produce a binary with that suffix and that will avoid this collision. jens On Wednesday, October 3, 2001, at 11:03 , Leonardo Rochael Almeida wrote: Mitchell L Model wrote: [...] With the updates for OS 10.1 in Python 2.2a4, all I had to do to make both Python and Zope was: cd Python2.2a4 configure --with-suffix=.exe make sudo make install cd Zope python wo_pcgi.py I don't know if it's just me, but this --with-suffix=.exe, on an Mac OS (the OS where you weren't suppose to need extensions) is extremely disturbing. :-) Cheers, Leo PS: and I'm not a Mac user, just a Linux user who would like more metadata in his operating system. Maybe I've been in Zope land for too long :-) ___ 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] compiling Zope 2.4.1 on Mac OS 10.1
mitchell, since python 2.2 is not yet officially supported i stuck with 2.1. we haven't done any extensive testing using 2.2 yet and there might still be some side effects. jens On Monday, October 1, 2001, at 10:43 , Mitchell L Model wrote: ... Wonderful! Thanks!! Great information. Having said that, and having spent a couple of hours experimenting, let me try to clarify things a bit: 1. Python 2.2a4 defaults to --with-dylib, so you don't need that when making Python 2.2a4 as you did for 2.1. 2. Likewise, you don't need to set OPT the way the 2.1 README says for Mac OS 10. 3. Similarly, the Python2.2a4 configure.in knows to add -flat_namespace to Makefile.pre and therefore Makefile. 4. Both 2.1 and 2.2a4 correctly specify -undefined suppress. So, whereas I did need to fix the Python 2.1 Makefile to build it, I didn' t need to fix the Python 2.2a4 Makefile to build it. (I guess I didn't try building Python 2.1 yesterday, or I would have realized the problem wasn't in Zope, but in Python, as you discovered.) From my experience this evening, I'm surprised that fixing the Python Makefile would allow you to compile Zope. It turns out that the zope configuration process uses the Makefile.pre.in installed in (typically) /usr/local/lib/python2.{1,2}/config. It also turns out that although Python 2.2a4 correctly adds -flat_namespace to Makefile.pre and Makefile, it doesn't add it to Makefile.pre.in! So for both 2.1 and 2.2 I had to add: LDSHARED= $(CC) $(LDFLAGS) -flat_namespace -undefined suppress to Makefile.pre.in, either in the Python src directory before doing 'make install' or in the /usr/local/lib/python2.{1,2}/config after doing the install. I'll report this problem to the Python developers. Thanks for you hints and your careful reading of the fink documentation on shared libraries. (fink is a fabulous resource!) -- --- Mitchell ___ 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] compiling Zope 2.4.1 on Mac OS 10.1
i think i found a working solution. since my knowledge of compilers and linkers isn't the greatest i'll just explain what i did. trying to compile python2.1.1 on OS X 10.1 failed for me displaying the very same error. searching through apple's discussion i found the following link: http://fink.sourceforge.net/doc/porting/shared.php it explains that some linker/compiler default options have changed. in order to get python compiled and running i edited the toplevel Makefile after running ./configure and edited the lines starting with LDSHARED and BLDSHARED, this is what they look like now in my setup: LDSHARED= $(CC) $(LDFLAGS) -bundle -flat_namespace -undefined suppress BLDSHARED= $(CC) $(LDFLAGS) -bundle -flat_namespace -undefined suppress notice the -flat_namespace switch, this gets rid of the new default twolevel_namespace that complains about undefined warning. running make was now successful and i was able to compile and run Zope 2. 4.1. you will probably have to recompile your python to set that switch under 10.1. i only did some light testing, no guarantees and before using this in production you might want to read up on those compiler/linker options... jens On Sunday, September 30, 2001, at 07:19 , Mitchell L Model wrote: Trouble compiling Zope 2.4.1 on Mac OS 10.1: installed a fresh 10.1 that I just got from Apple downloaded the Zope 2.4.1 src tried 'python wo_pcgi' with both a Python 2.2a4 I just made and with my previous Python 2.1, both with and without sudo Whatever I do, it breaks in the same place. Here's the end of the output: sed -f sedscript ./Makefile.pre.in Makefile.pre /usr/local/lib/python2.1/config/makesetup \ -m Makefile.pre -c /usr/local/lib/python2.1/config/config.c.in Setup -n /usr/local/lib/py\ thon2.1/config/Setup.config /usr/local/lib/python2.1/config/Setup.local /usr/local/lib/python2.1/co\ nfig/Setup make -f Makefile do-it-again /usr/local/lib/python2.1/config/makesetup \ -m Makefile.pre -c /usr/local/lib/python2.1/config/config.c.in Setup -n /usr/local/lib/py\ thon2.1/config/Setup.config /usr/local/lib/python2.1/config/Setup.local /usr/local/lib/python2.1/co\ nfig/Setup make cc -g -O2 -Wall -Wstrict-prototypes -I/usr/local/include/python2.1 -I/usr/local/include/python2.1 \ -DHAVE_CONFIG_H -I../Components/ExtensionClass/src -c ././../Components/ ExtensionClass/src/Extensi\ onClass.c -o ./ExtensionClass.o In file included from /usr/local/include/python2.1/pyport.h:84, from /usr/local/include/python2.1/Python.h:54, from ././../Components/ExtensionClass/src/ExtensionClass. h:114, from ././../Components/ExtensionClass/src/ExtensionClass. c:61: /usr/include/math.h:191: warning: function declaration isn't a prototype cc -bundle -undefined suppress ./ExtensionClass.o -o ./ExtensionClass. so /usr/bin/ld: -undefined error must be used when -twolevel_namespace is in effect make: *** [ExtensionClass.so] Error 1 Traceback (most recent call last): File wo_pcgi.py, line 117, in ? File wo_pcgi.py, line 105, in main File /usr/local/src/Zope-2.4.1-src/inst/build_extensions.py, line 102, in ? make('lib','python') File /usr/local/src/Zope-2.4.1-src/inst/do.py, line 135, in make do('make') File /usr/local/src/Zope-2.4.1-src/inst/do.py, line 104, in do if i and picky: raise SystemError, i SystemError: 512 The 'two-level namespace' business is a change from the OX X developer tools version 10.0 to 10.1. Anyone know what's going on here and how to fix it? -- --- Mitchell ___ 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] ImportError
nils, this is actually a bug in 2.4.1. a file was omitted that makes changes to the Splitter modules backwards-compatible for content and catalogs that have been created under an earlier version of Zope. AFAIK this will be fixed in the next release, what you can do right now is to make a file Splitter.py on the file system under zope/lib/python/Products/PluginIndexes/TextIndex/Splitter/ZopeSplitter with the content:: from ZopeSplitter import * Splitter = ZopeSplitter that fixed it for me. jens On Thursday, September 27, 2001, at 06:50 , Nils Wiegandt wrote: Hello to all of you, I want to import a website written on a Windows NT machine with Zope 2.4.0 to a Solarisserver with Zope 2.4.1, but it doesn' t work!? following error ocurred: Zope Error Zope has encountered an error while publishing this resource. Error Type: ImportError Error Value: No module named Splitter Troubleshooting Suggestions The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. Traceback (innermost last): File /www/server/Zope-2.4.1-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /www/server/Zope-2.4.1-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 187, in publish File /www/server/Zope-2.4.1-solaris-2.6-sparc/lib/python/Zope/__init__.py, line 226, in zpublisher_exception_hook (Object: ApplicationDefaultPermissions) File /www/server/Zope-2.4.1-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 171, in publish File /www/server/Zope-2.4.1-solaris-2.6-sparc/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_importObject) File /www/server/Zope-2.4.1-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: manage_importObject) File /www/server/Zope-2.4.1-solaris-2.6-sparc/lib/python/OFS/ObjectManager.py, line 584, in manage_importObject (Object: ApplicationDefaultPermissions) File /www/server/Zope-2.4.1-solaris-2.6-sparc/lib/python/ZODB/ExportImport.py, line 150, in importFile File /www/server/Zope-2.4.1-solaris-2.6-sparc/lib/python/ZODB/Transaction.py, line 302, in commit File /www/server/Zope-2.4.1-solaris-2.6-sparc/lib/python/ZODB/Connection.py, line 307, in commit File /www/server/Zope-2.4.1-solaris-2.6-sparc/lib/python/ZODB/ExportImport.py, line 219, in _importDuringCommit ImportError: (see above) Thanks for help Nils ___ 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] Structure-text : html
AFAIK this is the right behavior and not a bug. you ask for the StructureText document to be rendered and you inform the rendering machinery that the document is in structured text. the rendering process will output HTML. i think what you want is to simply say dtml-var StructureTextDoc without the fmt flag. that should get you the raw structured text. the rendering process then assumes the document is already in some kind of HTML format and does not try to generate HTML tags. jens On Thursday, September 20, 2001, at 07:14 , Sin Hang Kin wrote: When I use dtml-var StructureTextDoc fmt=structured-text I got html /html in the result. Are there any reason that it should be there? I wounder how can structured text generate valid html or be used in wap applications. If structured text is hard coded to output unnecessary html then I consider it a serious bug. And there should be coding rules that ensure in future no such bugs exist in Zope. Rgs, Kent Sin - kentsin.weblogs.com kentsin.imeme.net ___ 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] LDAPLoginAdapter
i already answered this question responding to the tracker issue you filed. see this URL for the complete answer: http://www.dataflake.org/software/tracker/56/2 jens On Monday, July 9, 2001, at 04:07 , Nicolas Vincent wrote: I use Zope 2.3.2, python 1.5.2 and python_LDAP 1.1 . I want to use loginadapter 1.5 to authenticate the users who try to connect to the portal I build and during all his session I need to know a lot of things about this user. The loginadapter connects itself to the localhost:390 wich is linked by a secure stunnel to the port 389 of another machine which is a OpenLDAP 2.* server. I use the Loginscreen cookie option of the configure tab and the RDN of the LDAP database is uid. The authentication is made by uid and work perfectly. My first problem is that : Where I can get the LDAP attributs (such mail or another descriptive field of the LDAP database) after the authentication? AUTHENTICATED_USER contains only the uid (AUTHENTICATED_USER.mail for example is not define, even if I specify it in the loginadapter schema). My second problem is that when I do a research with the search tab of the Loginadapter, it doesn't find anything, as if the database would be empty. On the contrary, the research with the search tab of the LDAPUserManager work perfectly. Thanks for your futur response Le Lapinlove _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. ___ 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] zope t-shirts available!
for those who haven't noticed the little link on zope.org... digital creations is now selling a very stylish zope t-shirt! details and a picture are at: http://www.zope.org/Resources/Store melissa light ([EMAIL PROTECTED]) is available to answer any questions and take shirt orders. jens ___ 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] ZPivotTable doesnt save its data dictionary
florian, without even looking at the code, when you use simple data types (lists, dictionaries, etc) to store your data you have to make sure that the persistence machinery gets tickled the right way whenever you update values. with those simple storage datatypes it won't know things have changed unless you specifically tell it. you would need to do either something like this:: self.my_storage_dictionary['newvalue'] = x self._p_changed = 1 or you could do it like this: dictionary = self.my_storage_dictionary dictionary['newvalue'] = x self.my_storage_dictionary = dictionary or you could simply use one of the helper classes that come with zope, like PersistentMapping. it emulates a dictionary and makes sure the persistence machinery gets told about changes. jens On 5/12/01 10:27, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi folks, I've started to program a pivot table. Therefore I've created three classes: ZPivotTable, Row and Cell. The ZPivotTable class contains a set of Row classes, stored in a dictionary, as well as the Row classes contain a set of Cell classes stored in a dictionary. Now I am debugging the product and can't find the reason why the table doesn't store the rows in its dictionary. Could you please help me finding this bug. The source is stored under the following address: http://www.zope.org/Members/freiser/ZPivotTable/ZPivotTable-0.0.tar.gz Thanks Florian Reiser ___ 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] ZPivotTable doesnt save its data dictionary
florian, as far as i know you can call superValues from DTML. it returns a list of objects. you could do something like this: dtml-in expr=folder_name.superValues(['Meta Type 1', 'Meta Type 2']) dtml-if name=sequence-start select name=my_select_list /dtml-if dtml-with sequence-item only option value=dtml-getId;dtml-title;/option /dtml-with dtml-if name=sequence-end /select /dtml-if dtml-else pbCannot find anything!/b/p /dtml-in jens On 5/13/01 10:43, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: jens, thanks for your reply. It helped me a lot. Do you have me a tip how I can get all Z SQL Methods in an selection field. I've found the superValues('Z SQL Method') function, but I'm having problems using it, because it can only be used in python. So how can I get the result returned from this function in my dtml form? thanx in advance florian ___ 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] Help !
the zcatalog is built to search items in the ZODB, it cannot search unrelated data storages, like databases, out of the box. jens on 4/4/01 22:22, Honey George at [EMAIL PROTECTED] wrote: Hello, I am not able to search a postgres database using Z Catalog. I am not clear of the procedure basically. If you could help me in this regard please reply. I am a programmer from India.If I get an example it will be great. Regards, Honey __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ ___ 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] filter metatypes in objectmanager
define a method with the name "all_meta_types" inside your class and have it return the correct information, like this: import Products def all_meta_types(self): """ What can you put inside me? """ f = lambda x: x['name'] in ('DTML Method', 'DTML Document') return filter(f, Products.meta_types) Products.meta_types contains information about all available meta types and you need to filter out what you need. jens on 3/27/01 7:44, Magnus Heino at [EMAIL PROTECTED] wrote: How can I control what meta_type's that can be added to an ObjectManager? If you create a ZClass that inherits from ObjectManager, you can specify this, but how is it done from a python product? /Magnus ___ 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] [ ANN ] LDAPLoginAdapter 1.1 released
LDAPLoginAdapter 1.1, a user folder replacement that authenticates against an LDAP server, has been released. You can view some of the documentation and download the software at http://www.dataflake.org/software/ldaploginadapter/ A Tracker at that same address allows you to easily file bug reports or feature requests for this product. Improvements and bugfixes since the last announcement include: **LDAPLoginAdapter 1.1** Features Added: * Instead of hardcoding fixed publicly available attributes onto the LDAPUser object you can now take full control of the mapping from LDAP attribute to public user object attribute. A public user object attribute is an attribute that is directly accessible on the user object. DTML code like "AUTHENTICATED_USER.email" is an example of accessing a directly accessible attribute on the user object. A lot of legacy DTML code relies on such attributes. Bugs fixed: * finduser() now lowercases all DN records from valid groups and compares it to a lowercased DN from any search results among user records. This fixes records not showing up if the capitalization in the group and on the user record is different. * When a user object was created the code expected a "mail" attribute on the LDAP record to set the email attribute used for compatibility with the Tracker. This has been repaired and will just default to an empty string. * Users who use tools like PADL's migration script end up with records that do not have the expected "sn" attribute. This is not set to a default value in finduser() to avoid errors in case it is not there. This will make the LDAPLoginAdapter compatible with user records of type posixAccount. **LDAPLoginAdapter 1.0** Bugs fixed: * Due to a bug in checking the return values from an LDAP search the cache can be polluted by invalid records for failed logins. This did not constitue a security breach, just more processing than necessary. **LDAPLoginAdapter 1.0beta3** Bugs Fixed: * Moved the LDAP search scope translation list from a volatile attribute on the LDAPLoginAdapter to a module-level attribute. This avoids any re-initialization calls. * Eliminated the extra attribute _v_loglines that counted the length of the log. A simple call to len(self._v_log) replaces it where log length info is needed. * Created one centralized method that handles connecting to and searching the LDAP server. This allows centralized error handling and makes for less and cleaner code. So far finduser, getUserDetails, getGroups, getUserNames and _lookupuser have been converted to use it instead of having their own connection code. * Rooted out error that would put a known user into the cache even though the password was not matched. This was not a security error since the broken user had the wrong password and failed any tests in validate() * Rigorous pruning of overly long lines of code to pare everything down to 80 chars width max * Avoiding unnecessary calls to the logging routine by checking for the correct log level *before* the call and not in the logging method. * Added a file, SAMPLE_RECORDS.txt, that shows a sample group- and user record. This will hopefully make it easier to understand the types of LDAP records needed. Features added: * Nicer Search screen adopted from the LDAPUserManager ___ 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] [ANN] LDAPUserManager Released
The LDAPUserManager is a LDAP user record administration tool to be used in conjunction with the LDAPLoginAdapter. It allows the site manager to search, create, edit and delete user records that are stored on an LDAP server, thereby completing the Zope user management functionality already offered by the LDAPLoginAdapter. You can view some of the documentation and download the software at http://www.dataflake.org/software/ldapusermanager/. The LDAPLoginAdapter, now at 1.0beta3, can be found at http://www.dataflake.org/software/ldaploginadapter/. A Tracker at that same address allows you to easily file bug reports or feature requests for this product. jens ___ 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] ZSQL using LIKE operator
just write it out like: SELECT * FROM table WHERE keywords LIKE '%dtml-var name="my_var"%' jens on 2/8/01 7:17, Schmidt, Allen J. at [EMAIL PROTECTED] wrote: I have been through the docs, searched a variety of locations, and cannot find anything on how to resolve a query which I need to read: SELECT * FROM table WHERE keywords LIKE '%keywords_variable%' dtml-sqltest has 'op=like' and when set to 'type=string' produces the LIKE operation in the query, with single quotes, but I cannot get it to 'wrap' the keywords with the percent characters and THEN the single quotes to produce that which I have in the query above. Ideally what I need to produce would be the query to search through some text in several fields by the keyword_variable (IF any keywords are provided) AND/OR within a specific category of information. If I can get the syntax to solve the above situation I think I can get dtml-sqlgroup to sort out what information is provided and construct the query accordingly. Sorry for the length of this newbie question but I am stumped on this one. And, so ends my lurking status. Thanks! Allen ___ 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] basic dtml syntax question
jason, this is called 'entity notation'. the semicolon is a standard part of it. another example of an item in entity notation would be to replace "" with lt; or the often abused blank space nbsp; this entity notation is a general HTML thing, it's not zope-specific. jens on 1/30/01 17:49, Jason Cunliffe at [EMAIL PROTECTED] wrote: example: img src="dtml-absolute_url;" ^ ^ ^ ? Please can anyone explain why dtml... syntax has a semi-colon ; at the end? What is for? Why is necessary? etc How to use/abuse it? thanks Jason ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ANNOUNCE: please have a look at ZDatabaseTool
here's a result from the "other side of the fence": it works just fine using IE5 on macOS 9.1 :) jens ---- Jens Vagelpohl[EMAIL PROTECTED] Software Engineer www.digicool.com Digital Creations (888) 344-4332 Got Zope? on 1/29/01 12:24, Andreas Heckel at [EMAIL PROTECTED] wrote: Perhaps we can get more feedback from WinXX users on this list ?! ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope 2.3.0 beta 1 comments
i had the intermittent "browser displays the CSS text and not the real page" in another situation go away by expressly setting the content type in the linked CSS file. the first line would become... dtml-call "RESPONSE.setHeader('Content-Type','text/css')" jens on 1/17/01 8:20, Martijn Pieters at [EMAIL PROTECTED] wrote: On Wed, Jan 17, 2001 at 10:07:30AM +, Chris Withers wrote: - When you resize the top frame, you get back a load of CSS (but as text and without a content type) This didn't happen in a2. If you switch to inline CSS (instead of linked CSS) this problem will go away. In a2 the inline/linked descision was made for you by using browser sniffing (which isn't very reliable as many people use filtering proxies these days). Netscape 4 is just way broken. I suspect that is also why Netscape sometimes doesn't render a page. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Design Q: Product vs. External Methods
if you run zope in debug mode (./start -D) you won't have to hit 'edit" - all external methods are re-read every time you access them. jens on 1/15/01 6:04, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: I also would like to know, if it is possible to update a bunch of external method zope objects simultaneously, or do I have to click 'edit' on every single external method object after editing the corresponding python method? ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] REQUEST object - obtaining variables from
here's how you could display the form variables on the receiving object: tested dtml-in expr="REQUEST.form.items()" dtml-var name="sequence-key": dtml-var name="sequence-item"br /dtml-in /tested REQUEST.form will contain all the fields from the form and REQUEST.form.items() will give you access to all key-value pairs that you can then access with sequence-key and sequence-item in the loop. jens on 1/13/01 13:11, Lee at [EMAIL PROTECTED] wrote: Hi, I am having some problems with the REQUEST namespace/object. I understand that if I submit form data then it can be retrieved using the REQUEST object. I have looked at Chapter 7 (Advanced DTML) for support but I'm still no closer to success. I have a DTML method, which passes an unknown number of arguments with unknown names to another method. For example, form action="display" Name input type="text" name="name1"br Age input type="text" name="age1"br Name input type="text" name="name2"br Age input type="text" name="age2"br input type="submit" /form I would like the display method to simply show each of the variable's names and values i.e. iterate through each variable in the REQUEST object. Maybe I've overlooked something in the Zope documentation but could someone supply a useful snippet of code to get me started? Thanks very much, Lee ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] multiple unknown parameters - ZSQL
this could be done in python in either an external method or python script/method. you can execute arbitrary SQL (which you would dynamically generate in python) on a database connection using the "query" method that is part of every database adapter. you need to - get a handle to your database connection by *calling* the database connection you have in your ZODB, like "db_conn = self.mydbconnection()" - once you have constructed the string carrying the SQL for one update statement you can pass it as argumant to the query method on the database connection, like "result = db_conn.query(sql_string)" looking at that page you put up you will have to create a SQL string for every student shown on the page and pick the correct variables from REQUEST for the SQL update statement. jens on 1/9/01 17:10, Lee at [EMAIL PROTECTED] wrote: Hi, As usual, I'm finding this one hard to explain... so I've described it with the aid of a diagram @ http://homepages.strath.ac.uk/~aeu97172/h.htm I realise that this may be more of a burden on your time than a normal request... but I'm hoping that some of you have met similar problems before and can suggest the best way round the problem. Any comments would be greatly appreciated. Thanks very much, Lee -- Lee Reilly mailto:[EMAIL PROTECTED] ?`??`??`??`? HAVE SKILLS; WILL TRAVEL. I'm currently looking for an internship in the USA in the field of web development. Ideally, I'm looking for a placement for 3 to 18 months. Can you help? More details, my resume, etc. @ http://homepages.strath.ac.uk/~aeu97172/ /shameless plug ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] [python] converting int to string?
in python you can do: str(int) and in zope you do it like _.str(int) "Learning Python" by o'reilly is a pretty good beginner's book for python. i suggest you read it. it's well written and gives you the basics. jens on 1/7/01 11:12, Lee at [EMAIL PROTECTED] wrote: Hi, I wonder if anyone could help me here... Is there any way to convert an integer to a string data type in Python? I see there is a facility for accomplishing the reverse conversion (string - int)? I have 4 integers, which are primarily used to handled the logic in the program below (in the while loops). The value of this integer must also be added to a string (as a table column name), which will be used to create a SQL query. Here's a rough sketch of the program: p = 2 # no.of practicals t = 2 # no.of tutorials a = 2 # no.of assignments b = 3 # no.of bomus marks c = "52225" SQL = "CREATE TABLE CLASS" + c + "\n" SQL = SQL + "( \n" SQL = SQL + "matric float, \n" SQL = SQL + "fname varchar, \n" SQL = SQL + "lname varchar, \n" SQL = SQL + "uname varchar, \n" while p 0 : SQL = SQL + "p" + p + " integer, \n" # cannot add type "int" to string p = p - 1 while t 0 : SQL = SQL + "t" + t + " char(1), \n" t = t - 1 while a 0 : SQL = SQL + "a" + a + " integer, \n" a = a - 1 while b 1 : SQL = SQL + "b" + b + " integer, \n" b = b - 1 while b 0 : SQL = SQL + "b" + b + " integer \n" # ',' taken out from last query b = b - 1 SQL = SQL + ")" Of course, I could have a load of statements in the while loops like: if p = 1: pString="1" ... etc. But that would look hella ugly! Another alternative would be to send both the integer value and a string parameter (converted by Zope) in the calling DTML method. This is okay - but is there a better way to do it? As usual, thankyou very much in advance. Is this off-topic BTW? Should I address any future questions regarding Python to a Python newsgroup/list? -- Lee Reilly mailto:[EMAIL PROTECTED] http://www.footkick.co.uk/lee ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] passing parameters in a call/in/with
try... dtml-in expr="get_names_for_id(chosen_id=123)" jens on 12/26/00 17:32, Lloyd Kvam at [EMAIL PROTECTED] wrote: This is also a problem for me. From using ZNOLK I have a DTML document that uses dtml-in to execute a query. The query is get_names_for_id and is: select name from name_table where id = dtml-sqlvar chosen_id type=int I can now call the form using: http://localhost:8080/form?chosen_id=123 My dtml form would be simpler if there was a way to code: dtml-in get_names_for_id(123) I was unable to make that work. Olaf Zanger wrote: hi there, with the znolk product i get data by "select * ..." out of my database. some fields are id's and i would like to get data out of an other table basing on this id. how can i pass the id through a dtml-call/in/with method? olaf ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )