[Zope-dev] Re: Clarification re: Zope X3.1, 2.8 - svn usage
Hello, Tres Seaver wrote: When you use 'svn:externals', the referenced package itself is *not* part of the containing checkout; it is managed separately by the svn client (sort of like ESI and page fragments). Yes this is true. But the differences between svn:externals and a copy are not so big. (the user nearly gets the same) With both you can get enough trouble. Even with svn:externals it's possible that someone checks something in to a tagged version. Subversion misses the feature to make tags read only and thats what you need in both cases. Tim points out that there are a number of these external dependencies, including ZConfig and zdaemon, which are not directly part of ZODB either: it depends on them in the same way that Zope depends on ZODB. My company uses subversion extensively, we have one rule: If we are in the same repository, we try to make a copy. If we have to different repositories and there are dependencies, we use svn:externals. Because there is one big Problem with svn:externals: If the repository is closed source and not available over Internet it is not possible to work at home with ssh checkouts. Hope this helps a little bit. bye by Wolfgang ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Adding Plone Content
--On Donnerstag, 31. März 2005 15:28 Uhr +0530 JV Singh [EMAIL PROTECTED] wrote: Hello. I need some help with this. I installed zope using 'apt-get install zope2.7' and then 'apt-get install plone'... But in the zope 'Add' list, I can't see any of the additionally installed components, including 'Plone Site'... I tried restarting zope, my browser and also the system.. You're on the wrong list. This list is for Zope-related development only. Try the plone-users list. -aj pgpa5hqwZhacB.pgp Description: PGP signature ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Test failures with five-integration branch merged to head...
Brian Lloyd wrote: I did a merge from the five-integration branch to the head in a local sandbox, and got the following test failures - anyone know anything about them? Odd, I don't get any failures, and Stefan Holek cannot report them either. Did these get resolved since then? It looks like the merge got checked in, right? Ran 5466 tests in 492.265s Regards, Martijn ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Disabling FTP by default
Florent Guillaume wrote: I'd like to disable FTP by default, by commenting it out in skel/etc/zope.conf. The reason is that it's better to open as few ports as possible by default. Opinions ? +1, but only for 2.8 Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Clarification re: Zope X3.1, 2.8
In this case, the answer is clear to me. :) We should fix the offending Z3 code to match the interface. Similarly, we should fix the uses of get_transaction. Jim Tim Peters wrote: I'm merging ZODB 3.4 into Zope on a branch. As Tres noted earlier in a checkin comment, a test failure results, because at the ZODB sprint we fleshed out IDataManager and an older Zope3 class claiming to implement IDataManager no longer does. Since Zope trunk doesn't own either the IDataManager definition nor the old Zope3 code, it's unclear how best to proceed: ERROR: testInterface (zope.app.mail.tests.test_delivery.TestMailDataManager) -- Traceback (most recent call last): File C:\Code\Zope\lib\python\zope\app\mail\tests\test_delivery.py, line 46, in testInterface verifyObject(IDataManager, manager) File C:\Code\Zope\lib\python\zope\interface\verify.py, line 93, in verifyObject return _verify(iface, candidate, tentative, vtype='o') File C:\Code\Zope\lib\python\zope\interface\verify.py, line 60, in _verify raise BrokenImplementation(iface, n) BrokenImplementation: An object has failed to implement interface InterfaceClass transaction.interfaces.IDataManager The abort_sub attribute was not provided. An expedient hack would be to castrate ZODB 3.4's IDataManager definition, back to what it was before the ZODB sprint. That's unattractive for obvious reasons (like, e.g., that the old definition lied about what the interface actually is). Current Zope3 trunk will have the same problem with ZODB 3.4 in its MailDataManager class, so that's the right place to fix it. But then the repaired version also needs to be merged into the old Zope3 code Zope trunk is trying to use. The old zope/app/mail/delivery.py also uses the deprecated get_transaction(). Perhaps current Zope3 trunk's delivery.py could just be slammed into the tag used by (or a new tag created for) Zope trunk? get_transaction() is more troublesome than _just_ that, alas: there are about 160 instances of it across the stitched-in lib/python/zope, and Products/Five, code. This causes lots of new deprecation warnings when running the tests. These are easy to repair with 1-2 hours easy editing work, but again Zope trunk doesn't own the lib/python/zope code (where almost all of these appear). -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Clarification re: Zope X3.1, 2.8
Martijn Faassen wrote: Tim Peters wrote: [snip] get_transaction() is more troublesome than _just_ that, alas: there are about 160 instances of it across the stitched-in lib/python/zope, and Products/Five, code. This causes lots of new deprecation warnings when running the tests. These are easy to repair with 1-2 hours easy editing work, but again Zope trunk doesn't own the lib/python/zope code (where almost all of these appear). Right, lib/python/zope is actually Zope X3.0.0, and we didn't expect we'd need to *update* Zope X3.0 in order for it to work with Zope 2.8. The new ZODB version is having some repercussions there. Zope X3.0 was released against an older version of ZODB. I'm really at a loss at what to do there. Perhaps we should make a X3.0.1. This is fairly long overdue anyway. Alternatively, we could make a branch for use in 2.8. I don't think this would really be a problem. I can spend time trying to shut up Zope X3 I guess, if that is the only option... I think this is the best option. What is the recipe of changing get_transaction(), is this documented somewhere? It should be documented in the deprecation warning. Basically, rather than: get_transaction().commit() you should: import transaction ... transaction.commit() or from transaction import commit ... commit() Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Re: brain.getObject and traversal
Chris Withers wrote: Well, in 2.8, new behaviour is expected, right? I really passionately believe that we should not be returnining None in Zope 2.8, and since 2.8 hasn't quite hit beta yet I'm very keen to see it fixed asap. Any objections? Most of my queries, where I need to wake up objects, has the form:: brains = catalog(portal_type='Document') objects = [] for brain in brains: try: obj = brain.getObject() if not obj is None: objects.append(obj) except: pass So it will not break any of my code, and I guess that most do something similar. Another thing is that I think that this pattern is so common that the catalog should have a query method where brains are automatically converted to objects. Like: objects = catalog.getObjects(portal_type='Document') That would be a handy time saver. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science ___ Zope-Dev maillist - Zope-Dev@zope.org 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] brain.getObject and traversal
On Thu, 2005-03-31 at 13:02 +0100, Chris Withers wrote: Would anyone object if I wrote tests and changed the implementation to raise exceptions, including Unauthorized, instead of returning None? Unauthorized in getObject is out of the question, that would be new behaviour. Well, in 2.8, new behaviour is expected, right? I really passionately believe that we should not be returnining None in Zope 2.8, and since 2.8 hasn't quite hit beta yet I'm very keen to see it fixed asap. Any objections? No, I agree that it should raise Unauthorized. Just make sure that this is communicated properly at release time. -- Roché Compaan Upfront Systems http://www.upfrontsystems.co.za ___ Zope-Dev maillist - Zope-Dev@zope.org 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] brain.getObject and traversal
Chris Withers wrote: You're mistaken. The old code did: def getObject(self, REQUEST=None): Try to return the object for this record try: obj = self.aq_parent.unrestrictedTraverse(self.getPath()) if not obj: if REQUEST is None: REQUEST = self.REQUEST obj = self.aq_parent.resolve_url(self.getPath(), REQUEST) return obj except: zLOG.LOG('CatalogBrains', zLOG.INFO, 'getObject raised an error', error=sys.exc_info()) pass Which effectively returns None. Interesting. Where did that code come from? It's been there for longer than I've being doing Zope. http://cvs.zope.org/Zope/lib/python/Products/ZCatalog/Attic/CatalogBrains.py?hideattic=1content-type=text/vnd.viewcvs-markuprev=1.1.4.4 All robust old code had to be able to test for None, because it was returned in many cases (when indexes got desynchronised, due to transaction bugs for instance, or manage_beforeDelete swallowing stuff, or conflict errors happening...). I know I had to add lots in my code. Just because you had to do it in old code doesn't make it not evil. Returning a meaningless value that masks a whole array of possible distinct errors that should all be handled in different ways is mind numbingly stupid IMNSHO. Why you feel so passionately that this should be the case is beyond me. Do you like using bare try: except:s throughout your code too?! Well of course no, but I never had to check a getObject() against Unauthorized. Maybe it's because I only use it in a CMF setting where unaccessible objects are filtered anyway. OTOH you're a bit excessive in your Whole array of possible distinct errors. Unauthorized in getObject is out of the question, that would be new behaviour. Well, in 2.8, new behaviour is expected, right? I really passionately believe that we should not be returnining None in Zope 2.8, and since 2.8 hasn't quite hit beta yet I'm very keen to see it fixed asap. Any objections? I'm ok for 2.8. I'll look at it. Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of RD +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Clarification re: Zope X3.1, 2.8
[Tim Peters] ... get_transaction() is more troublesome than _just_ that, alas: there are about 160 instances of it across the stitched-in lib/python/zope, and Products/Five, code. This causes lots of new deprecation warnings when running the tests. These are easy to repair with 1-2 hours easy editing work, but again Zope trunk doesn't own the lib/python/zope code (where almost all of these appear). [Martijn Faassen] Right, lib/python/zope is actually Zope X3.0.0, and we didn't expect we'd need to *update* Zope X3.0 in order for it to work with Zope 2.8. I know. That's why I pushed and pushed to get the branch merged early -- I knew _something_ would go wrong, I just didn't know what wink. Jim and I knew about the ZODB-3.4-in-Zope-2.8 plans for quite a while, but I doubt that even Brian was aware of them. There's no way you could have known -- not your fault. The new ZODB version is having some repercussions there. Zope X3.0 was released against an older version of ZODB. I'm really at a loss at what to do there. I can spend time trying to shut up Zope X3 I guess, if that is the only option... What is the recipe of changing get_transaction(), is this documented somewhere? It is, but it would go faster if I did it. I rewrote all uses of get_transaction() in the Zope and Zope3 trunks on Monday, so I'm in practice. For the most part they amount to no more than what Jim said, but there are trickier cases than commit(). Suggestion: I make a new copy of Zope3/tags/ZopeX3-3.0.0-Zope-2.8-pr1/src/zope stitch that into Zope trunk (change the lib/python svn:externals to point to the new copy), do all the get_transaction() edits there, and repair the IDataManager glitch there too. This could easily be done before lunch today (my time wink). If people are agreeable, help me pick a name for the new copy; I have no idea what the pr1 is supposed to mean in the current name, but would like to stick to whatever naming convention is in use there. I don't think Five has much in the way of fundamental get_transaction(); ... That's right -- it's almost all under lib/python/zope/. [Jim Fulton[ Perhaps we should make a X3.0.1. This is fairly long overdue anyway. Alternatively, we could make a branch for use in 2.8. I don't think this would really be a problem. Above, I'm volunteering to do the latter. Somehow I get the impression that sticking an unplanned X3.0.1 release on the critical path for Zope 2.8 wouldn't go over well here wink. ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Test failures with five-integration branch merged to head...
[Brian Lloyd] I did a merge from the five-integration branch to the head in a local sandbox, and got the following test failures - anyone know anything about them? [Martijn Faassen] Odd, I don't get any failures, and Stefan Holek cannot report them either. Did these get resolved since then? It looks like the merge got checked in, right? The merge was checked in. I'm doing the ZODB 3.4 integration on a new branch. We suspect Brian's failures (seemingly Unicode-related) were due to a rogue site.py that mucked with the default sys.encoding. All but two tests pass on the trunk on Windows too. ___ Zope-Dev maillist - Zope-Dev@zope.org 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 /tmp file usage
Pavel Zaitsev [EMAIL PROTECTED] wrote: I am wondering what code in Zope 2.7.5-final potentially may use /tmp directory for temprorary files. Lots. There are many uses of the tempfile python module, which uses the TMPDIR, TEMP or TMP environment variables to decide where to stick its temporary file. /tmp, /var/tmp then /usr/tmp are used as fallbacks. You can just define TMPDIR in you startup script and that'll do. Florent I am using zope over webdav and sometimes webdav tries to create a tmp file, of some sort and some parts of the system lock up. There are xml parsers,mime decoders all of which do have binary code bits, so I asking for expert advice, if someone knows of what circuimstances zope would use /tmp directory to create a file... your help will be greatly appreciated. Pavel -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of RD +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Test failures with five-integration branch merged to head...
[Martijn Faassen] Odd, I don't get any failures, and Stefan Holek cannot report them either. Did these get resolved since then? It looks like the merge got checked in, right? The merge was checked in. I'm doing the ZODB 3.4 integration on a new branch. We suspect Brian's failures (seemingly Unicode-related) were due to a rogue site.py that mucked with the default sys.encoding. All but two tests pass on the trunk on Windows too. Sorry - I got sidetracked and didn't followup. Yes, the Python I happened to be using to run the tests had a wacky default encoding set - after I fixed that the tests all passed so I commited the merge. Brian Lloyd[EMAIL PROTECTED] V.P. Engineering 540.361.1716 Zope Corporation http://www.zope.com ___ Zope-Dev maillist - Zope-Dev@zope.org 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 /tmp file usage
On Thu, Mar 31, 2005 at 01:52:11AM -0500, Pavel Zaitsev wrote: | snip if someone knows of what circuimstances zope would use /tmp | directory to create a file... Anytime the request coming in is bigger than the config variable 'large-file-threshold' (see INSTANCE_HOME/etc/zope.conf), the request body is streamed to a temp file. That's because otherwise the whole file gets loaded as a string in the memory, and can possibly take your server down by memory exaustion. Disk exaustion is less likely to occur given hard drives are cheaper than RAM *wink*. -- Sidnei da Silva [EMAIL PROTECTED] http://awkly.org - dreamcatching :: making your dreams come true http://www.enfoldsystems.com http://plone.org/about/team#dreamcatcher What this country needs is a good five cent microcomputer. ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
Fwd: [Zope-dev] zope /tmp file usage
I did not understand why people why replying the same answer as I did: that simple I did not reply to the mailing list ;) -- Forwarded message -- From: Patrick DECAT [EMAIL PROTECTED] Date: Thu, 31 Mar 2005 11:50:56 +0200 Subject: Re: [Zope-dev] zope /tmp file usage To: Pavel Zaitsev [EMAIL PROTECTED] Hi Pavel, when files are uploaded with WebDAV, they are part of an HTTP PUT request. If the file is larger than LARGE_FILE_THRESHOLD, a temporary file is created by the zhttp_collector in HTTPServer.py class zhttp_collector: def __init__(self, handler, request, size): from ZServer import LARGE_FILE_THRESHOLD self.handler = handler self.request = request if size LARGE_FILE_THRESHOLD: # write large upload data to a file from tempfile import TemporaryFile self.data = TemporaryFile('w+b') else: self.data = StringIO() request.channel.set_terminator(size) request.collector=self Regards, Patrick. On Thu, 31 Mar 2005 01:52:11 -0500, Pavel Zaitsev [EMAIL PROTECTED] wrote: Hi, I am wondering what code in Zope 2.7.5-final potentially may use /tmp directory for temprorary files. I am using zope over webdav and sometimes webdav tries to create a tmp file, of some sort and some parts of the system lock up. There are xml parsers,mime decoders all of which do have binary code bits, so I asking for expert advice, if someone knows of what circuimstances zope would use /tmp directory to create a file... your help will be greatly appreciated. Pavel ___ Zope-Dev maillist - Zope-Dev@zope.org 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 - Zope-Dev@zope.org 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] Clarification re: Zope X3.1, 2.8
[Tim Peters] ... Suggestion: I make a new copy of Zope3/tags/ZopeX3-3.0.0-Zope-2.8-pr1/src/zope stitch that into Zope trunk (change the lib/python svn:externals to point to the new copy), do all the get_transaction() edits there, and repair the IDataManager glitch there too. This could easily be done before lunch today (my time wink). I assume nobody objects, since nobody objected ahem. I see that Zope3/branches/ZopeX3-3.0.0-Zope-2.8 already exists, has already made changes to Zope3 code, and that the Zope3/tags/ZopeX3-3.0.0-Zope-2.8-pr1 tag Zope trunk is currently using appears to be a tag made off of that branch. So I'll continue on that line: make edits in Zope3/branches/ZopeX3-3.0.0-Zope-2.8 and, when they're done, make a new tag from that branch and stitch the new tag into Zope trunk. If anyone objects, please do so ASAP. ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Re: Clarification re: Zope X3.1, 2.8 - svn usage
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wolfgang Langner wrote: Hello, Tres Seaver wrote: When you use 'svn:externals', the referenced package itself is *not* part of the containing checkout; it is managed separately by the svn client (sort of like ESI and page fragments). Yes this is true. But the differences between svn:externals and a copy are not so big. (the user nearly gets the same) Copies are forks. We have a lot of experience over the past year with the pain those forks cause. With both you can get enough trouble. Even with svn:externals it's possible that someone checks something in to a tagged version. Subversion misses the feature to make tags read only and thats what you need in both cases. Note that the Zope SVN repository does not allow write access via 'svn:' URLs, so we can get the read-only effect by exploiting that. We should proabably also see what can be done to make commits into the 'tags' tree disallowed; I'm not sure if that is possible in a 'svn+ssh:' setup. Tim points out that there are a number of these external dependencies, including ZConfig and zdaemon, which are not directly part of ZODB either: it depends on them in the same way that Zope depends on ZODB. My company uses subversion extensively, we have one rule: If we are in the same repository, we try to make a copy. If we have to different repositories and there are dependencies, we use svn:externals. Because there is one big Problem with svn:externals: If the repository is closed source and not available over Internet it is not possible to work at home with ssh checkouts. Doesn't obtain here. Hope this helps a little bit. Tres. - -- === Tres Seaver[EMAIL PROTECTED] Zope Corporation Zope Dealers http://www.zope.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCTBKVGqWXf00rNCgRAioQAJ9gVzrxEkcqx8CsyOgN7+A21f/cfwCgouY4 hH3OLrh5fpQFCXq217DCWA0= =WekI -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Clarification re: Zope X3.1, 2.8
Jim Fulton wrote: Martijn Faassen wrote: Tim Peters wrote: [snip] get_transaction() is more troublesome than _just_ that, alas: there are about 160 instances of it across the stitched-in lib/python/zope, and Products/Five, code. This causes lots of new deprecation warnings when running the tests. These are easy to repair with 1-2 hours easy editing work, but again Zope trunk doesn't own the lib/python/zope code (where almost all of these appear). Right, lib/python/zope is actually Zope X3.0.0, and we didn't expect we'd need to *update* Zope X3.0 in order for it to work with Zope 2.8. The new ZODB version is having some repercussions there. Zope X3.0 was released against an older version of ZODB. I'm really at a loss at what to do there. Perhaps we should make a X3.0.1. This is fairly long overdue anyway. I'll see whether I can make some time to go through X3.0. in that case, to prepare for a X3.0.1. To do this work, I need ZODB 3.4 to be stitched into here, right: http://svn.zope.org/Zope3/branches/ZopeX3-3.0/ is there a resolution on how to do this yet? Alternatively, we could make a branch for use in 2.8. I don't think this would really be a problem. It's probably better to do it on X3.0 branch proper, and then extract a new 'more minimal' branch for Zope 2.8 (which we already have). It would be best if Tres did the latter, as he did it last time. :) We need to carefully check whether there aren't changes in ZopeX3.0 for Zope 2.8 that we need to port to the new branch. Perhaps Tres has an idea on how to approach all of this. I can spend time trying to shut up Zope X3 I guess, if that is the only option... I think this is the best option. What is the recipe of changing get_transaction(), is this documented somewhere? It should be documented in the deprecation warning. Thanks; I haven't seen those warnings yet as I don't think ZODB 3.4 quite got merged into Zope 2.8 trunk yet. Regards, Martijn ___ Zope-Dev maillist - Zope-Dev@zope.org 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: Clarification re: Zope X3.1, 2.8
Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jim Fulton wrote: Martijn Faassen wrote: [snip] Right, lib/python/zope is actually Zope X3.0.0, and we didn't expect we'd need to *update* Zope X3.0 in order for it to work with Zope 2.8. The new ZODB version is having some repercussions there. Zope X3.0 was released against an older version of ZODB. I'm really at a loss at what to do there. Perhaps we should make a X3.0.1. This is fairly long overdue anyway. Alternatively, we could make a branch for use in 2.8. I don't think this would really be a problem. We already have one: it was needed in order to remove the excess packages (the ones tagged as being in X3.0, without actually being installed by the zpkg stuff). You want to do the get_transaction() changes on that then, and not on the ZopeX3.0 branch proper? I can spend time trying to shut up Zope X3 I guess, if that is the only option... Adding the required methods to the zope.app.mail.delivery thingy should take less than an hour, I think. I'm not following this. What required methods with what zope.app.mail.delivery? I thought we were talking about ZODB 3.4 related changes here. Regards, Martijn ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Clarification re: Zope X3.1, 2.8
Tim Peters wrote: [Tim Peters] ... get_transaction() is more troublesome than _just_ that, alas: there are about 160 instances of it across the stitched-in lib/python/zope, and Products/Five, code. This causes lots of new deprecation warnings when running the tests. These are easy to repair with 1-2 hours easy editing work, but again Zope trunk doesn't own the lib/python/zope code (where almost all of these appear). [Martijn Faassen] Right, lib/python/zope is actually Zope X3.0.0, and we didn't expect we'd need to *update* Zope X3.0 in order for it to work with Zope 2.8. I know. That's why I pushed and pushed to get the branch merged early -- I knew _something_ would go wrong, I just didn't know what wink. But it isn't going wrong, as ZODB 3.4 is there yet, right? :) We only find out because you tried it on some other branch? I'm not clear on where this went on... [snip] Suggestion: I make a new copy of Zope3/tags/ZopeX3-3.0.0-Zope-2.8-pr1/src/zope If we're going to go that route, no need to make a copy, just use the branch that's already there for exactly this purpose: http://svn.zope.org/Zope3/branches/ZopeX3-3.0.0-Zope-2.8/ and make a new -pr2 or -integration2 or whatever you like tag out of it when you're done. stitch that into Zope trunk (change the lib/python svn:externals to point to the new copy), do all the get_transaction() edits there, and repair the IDataManager glitch there too. This could easily be done before lunch today (my time wink). Just stitch back in the /branches/ZopeX3-3.0.0-Zope-2.8, and fix that, and then, when you're done, copy it to a new tag and update the external to that. If people are agreeable, help me pick a name for the new copy; I have no idea what the pr1 is supposed to mean in the current name, but would like to stick to whatever naming convention is in use there. Right, pr1 is out of date. What about? Zope3/tags/ZopeX3-3.0.0-Zope-2.8-i2 for 'integration 2'? :) [snip] Alternatively, we could make a branch for use in 2.8. I don't think this would really be a problem. Above, I'm volunteering to do the latter. Somehow I get the impression that sticking an unplanned X3.0.1 release on the critical path for Zope 2.8 wouldn't go over well here wink. Geez, that's true, thanks. :) I'm too addled today to even yammer about it a lot. Regards, Martijn ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Clarification re: Zope X3.1, 2.8
Tim Peters wrote: [Tim Peters] ... Suggestion: I make a new copy of Zope3/tags/ZopeX3-3.0.0-Zope-2.8-pr1/src/zope stitch that into Zope trunk (change the lib/python svn:externals to point to the new copy), do all the get_transaction() edits there, and repair the IDataManager glitch there too. This could easily be done before lunch today (my time wink). I assume nobody objects, since nobody objected ahem. I see that Zope3/branches/ZopeX3-3.0.0-Zope-2.8 already exists, has already made changes to Zope3 code, and that the Zope3/tags/ZopeX3-3.0.0-Zope-2.8-pr1 tag Zope trunk is currently using appears to be a tag made off of that branch. So I'll continue on that line: make edits in Zope3/branches/ZopeX3-3.0.0-Zope-2.8 and, when they're done, make a new tag from that branch and stitch the new tag into Zope trunk. If anyone objects, please do so ASAP. This is exactly right! I should read all your mail, I'm typing at cross-purposes. :) Regards, Martijn ___ Zope-Dev maillist - Zope-Dev@zope.org 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] zope /tmp file usage
I did not understand why people was replying the same answer as I did. That's simple: I did not reply to the mailing list ;) -- Forwarded message -- From: Patrick DECAT [EMAIL PROTECTED] Date: Thu, 31 Mar 2005 11:50:56 +0200 Subject: Re: [Zope-dev] zope /tmp file usage To: Pavel Zaitsev [EMAIL PROTECTED] Hi Pavel, when files are uploaded with WebDAV, they are part of an HTTP PUT request. If the file is larger than LARGE_FILE_THRESHOLD, a temporary file is created by the zhttp_collector in HTTPServer.py class zhttp_collector: def __init__(self, handler, request, size): from ZServer import LARGE_FILE_THRESHOLD self.handler = handler self.request = request if size LARGE_FILE_THRESHOLD: # write large upload data to a file from tempfile import TemporaryFile self.data = TemporaryFile('w+b') else: self.data = StringIO() request.channel.set_terminator(size) request.collector=self Regards, Patrick. On Thu, 31 Mar 2005 01:52:11 -0500, Pavel Zaitsev [EMAIL PROTECTED] wrote: Hi, I am wondering what code in Zope 2.7.5-final potentially may use /tmp directory for temprorary files. I am using zope over webdav and sometimes webdav tries to create a tmp file, of some sort and some parts of the system lock up. There are xml parsers,mime decoders all of which do have binary code bits, so I asking for expert advice, if someone knows of what circuimstances zope would use /tmp directory to create a file... your help will be greatly appreciated. Pavel ___ Zope-Dev maillist - Zope-Dev@zope.org 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 - Zope-Dev@zope.org 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] Clarification re: Zope X3.1, 2.8
[Martijn Faassen, on deprecation warnings] Thanks; I haven't seen those warnings yet as I don't think ZODB 3.4 quite got merged into Zope 2.8 trunk yet. Not even close yet. I'm doing the 3,4 integration work on Zope/branches/tim-merge-zodb34 and I'm not merging anything into the trunk until all the ZODB 3.4 integration issues are settled on that branch. Jim also wants to make changes to ZODB 3.4. And I need to make more changes to ZODB 3.4 too. In an ideal world, the five-integration branch would have been merged to the trunk during the PyCon week, and then all this later work could have started on Monday. As is, it didn't really start until last night. But from my POV, it's under control wink. I expect that the alpha2 release needs to slip until early next week, though. ___ Zope-Dev maillist - Zope-Dev@zope.org 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: Clarification re: Zope X3.1, 2.8
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martijn Faassen wrote: Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jim Fulton wrote: Martijn Faassen wrote: [snip] Right, lib/python/zope is actually Zope X3.0.0, and we didn't expect we'd need to *update* Zope X3.0 in order for it to work with Zope 2.8. The new ZODB version is having some repercussions there. Zope X3.0 was released against an older version of ZODB. I'm really at a loss at what to do there. Perhaps we should make a X3.0.1. This is fairly long overdue anyway. Alternatively, we could make a branch for use in 2.8. I don't think this would really be a problem. We already have one: it was needed in order to remove the excess packages (the ones tagged as being in X3.0, without actually being installed by the zpkg stuff). You want to do the get_transaction() changes on that then, and not on the ZopeX3.0 branch proper? Depends. If somebody has an appetite for making a 3.0.1 release (not me!) then make the branch compatible with ZODB 3.4. We can then re-branch to create the 2.8 extract (probably by merging the changes from our current branch). I can spend time trying to shut up Zope X3 I guess, if that is the only option... Adding the required methods to the zope.app.mail.delivery thingy should take less than an hour, I think. I'm not following this. What required methods with what zope.app.mail.delivery? I thought we were talking about ZODB 3.4 related changes here. ZODB 3.4 updates the transaction.IDataManager contract (documents what was always the real contract), which causes a test in that package to fail. Again, we can fix it on the 3.0 branch, if a release is planned there, or else just fix it on our own branch. Tres. - -- === Tres Seaver[EMAIL PROTECTED] Zope Corporation Zope Dealers http://www.zope.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCTB4iGqWXf00rNCgRAlSCAJ9DpgI3a0xMUR9XJK+dWmQb7eb2xQCfVDmY mIH6sohjv/H5c+j1hlD+fpg= =YZSP -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Clarification re: Zope X3.1, 2.8
Zope trunk is using ZODB 3.4 now. It's been switched to use svn:externals to stitch in the 9 ZODB directories. For now they're pointing at ZODB trunk. A release tag will be made later (this is _not_ ready for release yet; now I can start doing the work I wanted to start doing on Monday 0.5 wink). The Zope3 code is now gotten from new tag Zope3/tags/ZopeX3-3.0.0-Zope-2.8-a2. That code was purged of get_transaction() calls, and the IDataManager glitch got repaired there. If that code needs more changes, they should be made on Zope3/branches/ZopeX3-3.0.0-Zope-2.8, another tag made from the result, and the lib/python properties changed to point to that tag. Really helpful: you can do svn propedit followed by svn up to _temporarily_ redirect your local copy to a different source for svn:externals. If you svn revert the propedit changes before a commit, nobody else will be affected. A handful of get_transaction() calls were also removed from the Five code. Zope's setup.py got taught how to build ZODB 3.4's new IFBTrees. All tests should pass on Linux (the same two still fail on Windows). There should be no DeprecationWarnings related to transactions. I'm not sure svn will do a decent job of updating. We're simultaneously trying to delete Zope trunk's *copies* of ZODB code, and stitch the same things (well, directories of the same names) back in via svn:externals. At one point during the Zope/branches/tim-merge-zodb34 merge on my local box, svn got itself terminally confused, starting to create directories like lib/lib/python/ZODB (there are two lib/s in that -- not a typo), and griping endlessly about locks and non-existent files. No amount of svn cleanup could repair it, and I ended up checking out Zope trunk from scratch again. Then all the problems went away. If people have trouble updating on Linux, say so here, and we can share solutions. I hope that I hit problems just because I was doing the merge. ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Clarification re: Zope X3.1, 2.8
| At one point during the Zope/branches/tim-merge-zodb34 merge on my | local box, svn got itself terminally confused, starting to create | directories like lib/lib/python/ZODB (there are two lib/s in that -- | not a typo), and griping endlessly about locks and non-existent files. | No amount of svn cleanup could repair it, and I ended up checking | out Zope trunk from scratch again. Then all the problems went away. | | If people have trouble updating on Linux, say so here, and we can | share solutions. I hope that I hit problems just because I was doing | the merge. Got one problem so far: svn: Failed to add directory 'lib/python/BTrees/tests': object of the same name already exists Everything else seems to have updated with no problems to that point. -- Sidnei da Silva [EMAIL PROTECTED] http://awkly.org - dreamcatching :: making your dreams come true http://www.enfoldsystems.com http://plone.org/about/team#dreamcatcher I have not yet begun to byte! ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Clarification re: Zope X3.1, 2.8
[Sidnei da Silva] Got one problem so far: svn: Failed to add directory 'lib/python/BTrees/tests': object of the same name already exists Everything else seems to have updated with no problems to that point. Ugh -- I'm afraid that's the very first of the 9 ZODB directories it tried to update, and svn just isn't smart enough to delete the existing directories before trying to fetch the new ones. Did you find a way to work around that (short of checking out Zope from scratch? the latter works fine, but is irritating)? ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Clarification re: Zope X3.1, 2.8
On Thu, Mar 31, 2005 at 03:33:11PM -0500, Tim Peters wrote: | Ugh -- I'm afraid that's the very first of the 9 ZODB directories it | tried to update, and svn just isn't smart enough to delete the | existing directories before trying to fetch the new ones. Indeed it was. I think its a Good Thing. Explicitness. | Did you find a way to work around that (short of checking out Zope | from scratch? the latter works fine, but is irritating)? Removing the only the complainers and svn up after that. -- Sidnei da Silva [EMAIL PROTECTED] http://awkly.org - dreamcatching :: making your dreams come true http://www.enfoldsystems.com http://plone.org/about/team#dreamcatcher You can tune a piano, but you can't tuna fish. You can tune a filesystem, but you can't tuna fish. -- from the tunefs(8) man page ___ Zope-Dev maillist - Zope-Dev@zope.org 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] editing zope files
I try to edit zope file in zope istalled directory, HTTPServer in particular, i want to debug some things, but I get syntax errors on any code i try insert like a=1 , or 'print'. like: # /opt/web/bin/runzope /opt/zope_core/lib/python/Zope/Startup neo[5135] Traceback (most recent call last): File /opt/zope_core/lib/python/Zope/Startup/run.py, line 50, in ? run() File /opt/zope_core/lib/python/Zope/Startup/run.py, line 18, in run opts = _setconfig() File /opt/zope_core/lib/python/Zope/Startup/run.py, line 42, in _setconfig opts.realize(doc=Sorry, no option docs yet.) File /opt/zope_core/lib/python/zdaemon/zdoptions.py, line 271, in realize self.load_schema() File /opt/zope_core/lib/python/zdaemon/zdoptions.py, line 312, in load_schema self.schema = ZConfig.loadSchema(self.schemafile) File /opt/zope_core/lib/python/ZConfig/loader.py, line 37, in loadSchema return SchemaLoader().loadURL(url) File /opt/zope_core/lib/python/ZConfig/loader.py, line 71, in loadURL return self.loadResource(r) File /opt/zope_core/lib/python/ZConfig/loader.py, line 137, in loadResource schema = ZConfig.schema.parseResource(resource, self) File /opt/zope_core/lib/python/ZConfig/schema.py, line 43, in parseResource xml.sax.parse(resource.file, parser) File /usr/lib/python2.3/site-packages/_xmlplus/sax/__init__.py, line 31, in parse parser.parse(filename_or_stream) File /usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py, line 109, in parse xmlreader.IncrementalParser.parse(self, source) File /usr/lib/python2.3/site-packages/_xmlplus/sax/xmlreader.py, line 123, in parse self.feed(buffer) File /usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py, line 216, in feed self._parser.Parse(data, isFinal) File /usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py, line 312, in start_element self._cont_handler.startElement(name, AttributesImpl(attrs)) File /opt/zope_core/lib/python/ZConfig/schema.py, line 119, in startElement getattr(self, start_ + name)(attrs) File /opt/zope_core/lib/python/ZConfig/schema.py, line 306, in start_import src = self._loader.schemaComponentSource(pkg, file) File /opt/zope_core/lib/python/ZConfig/loader.py, line 154, in schemaComponentSource __import__(package) File /opt/zope_core/lib/python/ZServer/__init__.py, line 36, in ? from HTTPServer import zhttp_server, zhttp_handler File /opt/zope_core/lib/python/ZServer/HTTPServer.py, line 79 print ^ How can I rectify this? pavel ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
FIXED: Re: [Zope-dev] editing zope files
Was a spacing issue thanks to #zope on freenode, pavel ___ Zope-Dev maillist - Zope-Dev@zope.org 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] [Zope2.8a2] ...to be released by tomorrow....
Hi, I am planning to make the release tomorrow (Saturday afternoon (German time :-)). So please make your final fixes very soon or cry out loud STOP if there are any show stoppers. Andreas pgp17zL6Dn1uH.pgp Description: PGP signature ___ Zope-Dev maillist - Zope-Dev@zope.org 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] [Zope2.8a2] ...to be released by tomorrow....
Hi Andreas - please don't cut the release until we get the OK from Tim Peters - he's still working on merging recent ZODB changes, I believe. Brian Lloyd[EMAIL PROTECTED] V.P. Engineering 540.361.1716 Zope Corporation http://www.zope.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Andreas Jung Sent: Friday, April 01, 2005 12:03 AM To: zope-dev@zope.org Cc: [EMAIL PROTECTED] Subject: [Zope-dev] [Zope2.8a2] ...to be released by tomorrow Hi, I am planning to make the release tomorrow (Saturday afternoon (German time :-)). So please make your final fixes very soon or cry out loud STOP if there are any show stoppers. Andreas ___ Zope-Dev maillist - Zope-Dev@zope.org 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] [Zope2.8a2] ...to be released by tomorrow....
Ok, I am waiting for go ahead sign (I haven't followed the recent discussion because I am currently on a business trip) -aj --On Freitag, 1. April 2005 0:13 Uhr -0500 Brian Lloyd [EMAIL PROTECTED] wrote: Hi Andreas - please don't cut the release until we get the OK from Tim Peters - he's still working on merging recent ZODB changes, I believe. Brian Lloyd[EMAIL PROTECTED] V.P. Engineering 540.361.1716 Zope Corporation http://www.zope.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Andreas Jung Sent: Friday, April 01, 2005 12:03 AM To: zope-dev@zope.org Cc: [EMAIL PROTECTED] Subject: [Zope-dev] [Zope2.8a2] ...to be released by tomorrow Hi, I am planning to make the release tomorrow (Saturday afternoon (German time :-)). So please make your final fixes very soon or cry out loud STOP if there are any show stoppers. Andreas pgpJHWVieXlPo.pgp Description: PGP signature ___ Zope-Dev maillist - Zope-Dev@zope.org 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] question about manipulating zcatalog query results
Hello all, I've moved a zope 2.5.1 (python 2.1.3) installation to two newer locations (zope 2.7.4/python 2.3.4 and zope 2.7.5/python 2.3.5) and scripts I have that iterate over zcatalog results using 'for' loops now fail with global name '_getiter_' is not defined. I'm also unable to take the zcatalog result and manipulate it (split or concatenate instances sent to a list) without getting a Record objects do not support [whatever action]--even if I've asigned the result to another list and am operating on that list. ie--I used to be able to say: for row in result: res.append(row.id.split().pop(), row) but now can't, and can't even iterate over the list using a while loop, as the split will fail. I've found some reference to the _getiter_ problem on the forum, but the queries date from nearly a year ago, and there were no fixes at the time (save to wait for 7.4 to come out of beta). Is anyone else experiencing this? Is there a workaround? What am I missing? thanks for any help/advice ira ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: next part of tal:atrributes problem
for lennart n anrdeas, sir, i had built this page in asp earlier n now need to create a zpt ver. d javascript function used for submit is below: function sub_click(){ document.nlogin.login.value='y' // 'login' is flag for valid login n not bein used in zpt till now. document.nlogin.action='c_nlogged' // 'c_nlooged' the python script meant to handle the pwd validation n redirection to next page or bact to the current page. document.nlogin.method='post' document.nlogin.submit() } input title=Click to Go name=subm type=submit value=Go style=color:blue onsubmit=sub_click() below is python script c_nlogged: request = container.REQUEST RESP = request.RESPONSE passwd = request.password1 user = request.username, if container.chkpwd(uname=user,pwd=passwd): //getting sysntax error here. RESP.redirect(/store_nic/consumables/c_menu) else: RESP.redirect(/store_nic/consumables/index_html) below is zsql method chkpwd : select distinct(password) from c_userdet where username=dtml-sqlvar uname type=string and password=dtml-sqlvar pwd type=string i wanted to avoid d middle python script n handle the pwd validation in the same zpt . is it possible. i have carry req vars eg. username pwd ,districtname in session for future use. plz giv soln . On Tue, 29 Mar 2005 19:07:00 +0200, Andreas Pakulat [EMAIL PROTECTED] wrote: On 29.Mär 2005 - 05:39:42, prabuddha ray wrote: Danke Jürgen, one tip i'm lookin for is how to cal pyhton scripts on any form event, ie. like we call javascripts on the onclick or onsubmit or onchange events? thanks again. You can't. Python and JavaScript are completely different things. JavaScript runs on the client side, whereas Python runs on the server. However, you probably can use your JavaScript to call a python Script, but I wouldn't suspect that it works the same as with JavaScript alone. Python Scripts are executed when you send them a Request or by calling them from within another python script (or TAL or DTML statement) Andreas -- You have an ambitious nature and may make a name for yourself. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Share the vision of difference with ME ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Adding ZPyGreSQLDA Database Adaptor in Windows
Hi , I have a problem in adding the PostgreSQL Databse adaptor in windows, I have added the ZPyGreSQLDA folder, in the Zope-2.7 / import folder tried importing it, it says permission denied. I have directly added the ZPyGreSQLDA folder in Zope-2.7 / lib / python / Products folder,, the Zope crashes !!! someone please guide me thru in establishing a connection to PostgreSQL Database .. Thanks , Niru ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: next part of tal:atrributes problem
for lennart n anrdeas, sir, i had built this page in asp earlier n now need to create a zpt ver. d javascript function used for submit is below: function sub_click(){ document.nlogin.login.value='y' // 'login' is flag for valid login n not bein used in zpt till now. document.nlogin.action='c_nlogged' // 'c_nlooged' the python script meant to handle the pwd validation n redirection to next page or bact to the current page. document.nlogin.method='post' document.nlogin.submit() } input title=Click to Go name=subm type=submit value=Go style=color:blue onsubmit=sub_click() below is python script c_nlogged: request = container.REQUEST RESP = request.RESPONSE passwd = request.password1 user = request.username, if container.chkpwd(uname=user,pwd=passwd): //getting sysntax error here. RESP.redirect(/store_nic/consumables/c_menu) else: RESP.redirect(/store_nic/consumables/index_html) below is zsql method chkpwd : select distinct(password) from c_userdet where username=dtml-sqlvar uname type=string and password=dtml-sqlvar pwd type=string i wanted to avoid d middle python script n handle the pwd validation in the same zpt . is it possible. i have carry req vars eg. username pwd ,districtname in session for future use. plz giv soln . On Tue, 29 Mar 2005 19:07:00 +0200, Andreas Pakulat [EMAIL PROTECTED] wrote: On 29.Mär 2005 - 05:39:42, prabuddha ray wrote: Danke Jürgen, one tip i'm lookin for is how to cal pyhton scripts on any form event, ie. like we call javascripts on the onclick or onsubmit or onchange events? thanks again. You can't. Python and JavaScript are completely different things. JavaScript runs on the client side, whereas Python runs on the server. However, you probably can use your JavaScript to call a python Script, but I wouldn't suspect that it works the same as with JavaScript alone. Python Scripts are executed when you send them a Request or by calling them from within another python script (or TAL or DTML statement) Andreas -- You have an ambitious nature and may make a name for yourself. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Share the vision of difference with ME ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Newbie Zope Howto
I'm trying to do a micro-Zope that basically store documents (PDFs scanned files) with some custom-made attributes (¿Who stores the document?, ¿where is the original -physical paper- stored?, ¿who is in charge of maintenance?, ¿token words?, ...) so that final users are able to search for stored docs based on those properties (ideally using regex approach, not exact matches). The idea is that users insert the scanned pdfs through a normal html form that forces them to input the additional data -properties- and reject the input if required fields are empty. Since I'm complety new to Zope and I see there are too many ways to approach the problem I wonder what's the easiest way to make it. Note: I'm used to Python development so that's not a BUT for me. Thanks in advance for any help, hint or link!! ENRIQUE ARIZON SOFTWARE DEVELOPER AND SYSTEM/NETWORK ADMINISTRATOR. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Newbie Zope Howto
Enrique Arizón wrote: I'm trying to do a micro-Zope that basically store documents (PDFs scanned files) with some custom-made attributes (¿Who stores the document?, ¿where is the original -physical paper- stored?, ¿who is in charge of maintenance?, ¿token words?, ...) so that final users are able to search for stored docs based on those properties (ideally using regex approach, not exact matches). The idea is that users insert the scanned pdfs through a normal html form that forces them to input the additional data -properties- and reject the input if required fields are empty. Since I'm complety new to Zope and I see there are too many ways to approach the problem I wonder what's the easiest way to make it. I don't know if it's the easiest way, but this needs a specific Product developpement IMHO. Subclassing (or wrapping + delegating to) OFS.File shoud do it. As for searches, I'd first try to use Catalogs before trying ti reinvent the wheel. Also prefer ZPT for your form and delegate validation to a Python script (DTML is kind of messy IMHO) If you have no experience with Products developpement, I found these pages to be quite helpful : http://www.zope.org/Members/maxm/HowTo/minimal_01 http://www.zope.org/Members/maxm/HowTo/minimal_02 caution : there are a few small errors in the code - I promised the author to send him a correction, but did not found time to do so :( Thanks in advance for any help, hint or link!! HTH -- Bruno Desthuilliers Développeur [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: thanks for tal:atrributes problem
wats wrong with the given puthon script request = container.REQUEST RESP = request.RESPONSE passwd = context.request.password1 user = context.request.username, if(container.chkpwd(uname=user,pwd=passwd)): RESP.redirect(/store_nic/consumables/test) // syntax errror. else: RESP.redirect(/store_nic/consumables/index_html) On Tue, 29 Mar 2005 19:07:00 +0200, Andreas Pakulat [EMAIL PROTECTED] wrote: On 29.Mär 2005 - 05:39:42, prabuddha ray wrote: Danke Jürgen, one tip i'm lookin for is how to cal pyhton scripts on any form event, ie. like we call javascripts on the onclick or onsubmit or onchange events? thanks again. You can't. Python and JavaScript are completely different things. JavaScript runs on the client side, whereas Python runs on the server. However, you probably can use your JavaScript to call a python Script, but I wouldn't suspect that it works the same as with JavaScript alone. Python Scripts are executed when you send them a Request or by calling them from within another python script (or TAL or DTML statement) Andreas -- You have an ambitious nature and may make a name for yourself. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Share the vision of difference with ME ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] script python error
wats wrong with the given puthon script request = container.REQUEST RESP = request.RESPONSE passwd = context.request.password1 user = context.request.username, if(container.chkpwd(uname=user,pwd=passwd)): RESP.redirect(/store_nic/consumables/test) // syntax errror. else: RESP.redirect(/store_nic/consumables/index_html) On Tue, 29 Mar 2005 19:07:00 +0200, Andreas Pakulat [EMAIL PROTECTED] wrote: On 29.Mär 2005 - 05:39:42, prabuddha ray wrote: Danke Jürgen, one tip i'm lookin for is how to cal pyhton scripts on any form event, ie. like we call javascripts on the onclick or onsubmit or onchange events? thanks again. You can't. Python and JavaScript are completely different things. JavaScript runs on the client side, whereas Python runs on the server. However, you probably can use your JavaScript to call a python Script, but I wouldn't suspect that it works the same as with JavaScript alone. Python Scripts are executed when you send them a Request or by calling them from within another python script (or TAL or DTML statement) Andreas -- You have an ambitious nature and may make a name for yourself. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Share the vision of difference with ME -- Share the vision of difference with ME ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] HTTPSConnection Python 2.3.4
On the same machine, my script works in python 2.3.4 outside of zope, but it doesn't work in python 2.3.4 within zope as an external script. There I get"sslerror: The read operation has timed out." Here's the script: import httplib, urllibAction = ''CreateFunction = 'Create using Function'WLP = '123'WLPPW = '456'params = urllib.urlencode({'CreateFunction':CreateFunction, 'Action':Action, 'WLP':WLP, 'WLPPW':WLPPW, 'ClientLoginId':ClientLoginID, 'ClientPassword':'ClientPassword'})headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"}conn = httplib.HTTPSConnection("x..com")conn.request("POST", "/ClientReg.asp", params, headers)response = conn.getresponse()data = ""> print dataconn.close() Why I am I getting different response from within Zope versus without? Thanks, Joshua ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] role, user defined roles, and inclusion
Dieter Maurer wrote: A user will have the Anonymous role iff they have not supplied any authentication credentials. Any user has the Anonymous role whether or not it is authenticated. Really? Then how come the following script: from AccessControl import getSecurityManager user = getSecurityManager().getUser() print user.getRoles() return printed returns ('Manager', 'Authenticated') when logged in as a manager and ('Anonymous',) when anonymous? A user will never have Authenticated and Anonymous roles at the same time. This is wrong. See above. Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: login page problem
prabuddha ray wrote: now my problem how n where do i check d pwd n redirect to the next zpt or the previous one if its wrong. i've a zsql method giving me the pwd for the user param passed. i wanted to kno if i can call this method on d onsubmit event? kindly gimme solns u've in mind. Use SimpleUserFolder and CookieCrumbler, and cut out the cute abbreviations like n and d while you're at it. Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] User changing their own password via External Method with Cookie Crumbler
Dave Cinege wrote: From what I was able to dissect from CMF changing the password is down to a hack. : P userFolderEditUser() doesn't work. You must instead change the '__' attribute of a user object. Why am I not suprised? ;-) : O My code below works, except that credentialsChanged() ends up redirecting to the login page vs, resetting the cookie and allowing the user to continue. Is that expected? No, don't think so. def UserEditFunc (self): reqd = dict(self.REQUEST) user = self.acl_users.getUser(reqd['username']) user.__ = reqd['password'] This makes assumptions about the user folder implementation. If you're using anything other than a normal stock userfolder, beware! cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] WebDAV BUGS and access to /tmp directory
Pavel Zaitsev wrote: I am back trying to figure out why my zope crashes on open('/tmp/tmp4fd4foo') kind of opens, which seem to originated from webdav code. I doubt it's anything specific to the webdav code that's causing a problem. Maybe a large file upload, try doing the same by addign a file object using the ZMI. Question to someone who is expert in webdav/*.py code... I just would like to know so I can further my investigation into the bug/malfuction of zope on OS X. I'd suggest checking that the user running Zope has permission to write the the /tmp/ folder. cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: login page problem
Somhorst JJT wrote: You could try to look at the tutorial on devshed.com. They created a login system using text files. Its not exactly as you want but it gives you an idea about how to handle things :) Talk about re-inventing wheels. Zope has an amazingly powerful and flexible security architecture. Why on earth would you want to start again from scratch? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] question about manipulating zcatalog query results
Ira Sher wrote: the time (save to wait for 7.4 to come out of beta). Is anyone else experiencing this? Is there a workaround? What am I missing? Can you paste a real traceback or two? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Adding ZPyGreSQLDA Database Adaptor in Windows
Reddy, Niranjan Kumar (STSD) wrote: I have directly added the ZPyGreSQLDA folder in Zope-2.7 / lib / python / Products folder,, the Zope crashes !!! What traceback is displayed when this happens? cheers, Chris FWIW, I use mxODBC to connect to postgres from WIndows servers... -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] HTTPSConnection Python 2.3.4
Step back a bit: what are you trying to do and wha tare you trying to do it? ;-) Chris Joshua Jacobson wrote: On the same machine, my script works in python 2.3.4 outside of zope, but it doesn't work in python 2.3.4 within zope as an external script. There I get sslerror: The read operation has timed out. Here's the script: import httplib, urllib Action = 'Create' CreateFunction = 'Create using Function' WLP = '123' WLPPW = '456' params = urllib.urlencode({'CreateFunction':CreateFunction, 'Action':Action, 'WLP':WLP, 'WLPPW':WLPPW, 'ClientLoginId':ClientLoginID, 'ClientPassword':'ClientPassword'}) headers = {Content-type: application/x-www-form-urlencoded, Accept: text/plain} conn = httplib.HTTPSConnection(x..com) conn.request(POST, /ClientReg.asp, params, headers) response = conn.getresponse() data = response.read() print data conn.close() Why I am I getting different response from within Zope versus without? Thanks, Joshua ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] HTTPSConnection Python 2.3.4
Chris, As part of my registration process on my Plone site, I need to make a make a URL connection to a script on a remote site which returns some information. Then I save that information in my database and email it to the user. Thanks, Joshua -Original Message- From: Chris Withers [mailto:[EMAIL PROTECTED] Sent: Thursday, March 31, 2005 1:50 PM To: Joshua Jacobson Cc: zope@zope.org Subject: Re: [Zope] HTTPSConnection Python 2.3.4 Step back a bit: what are you trying to do and wha tare you trying to do it? ;-) Chris Joshua Jacobson wrote: On the same machine, my script works in python 2.3.4 outside of zope, but it doesn't work in python 2.3.4 within zope as an external script. There I get sslerror: The read operation has timed out. Here's the script: import httplib, urllib Action = 'Create' CreateFunction = 'Create using Function' WLP = '123' WLPPW = '456' params = urllib.urlencode({'CreateFunction':CreateFunction, 'Action':Action, 'WLP':WLP, 'WLPPW':WLPPW, 'ClientLoginId':ClientLoginID, 'ClientPassword':'ClientPassword'}) headers = {Content-type: application/x-www-form-urlencoded, Accept: text/plain} conn = httplib.HTTPSConnection(x..com) conn.request(POST, /ClientReg.asp, params, headers) response = conn.getresponse() data = response.read() print data conn.close() Why I am I getting different response from within Zope versus without? Thanks, Joshua -- -- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: login page problem
Use SimpleUserFolder and CookieCrumbler, and cut out the cute abbreviations like n and d while you're at it. I second that! I have started hitting the delete button rather than engage in the mental translation. Cliff Chris Withers wrote: prabuddha ray wrote: now my problem how n where do i check d pwd n redirect to the next zpt or the previous one if its wrong. i've a zsql method giving me the pwd for the user param passed. i wanted to kno if i can call this method on d onsubmit event? kindly gimme solns u've in mind. Use SimpleUserFolder and CookieCrumbler, and cut out the cute abbreviations like n and d while you're at it. Chris ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: login page problem
Cliff Ford wrote: Use SimpleUserFolder and CookieCrumbler, and cut out the cute abbreviations like n and d while you're at it. I second that! I have started hitting the delete button rather than engage in the mental translation. I gave up and added ray to my spam can procmail rule. Oh well, no more for me ot read I guess ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] HTTPSConnection Python 2.3.4
On Thu, Mar 31, 2005 at 01:12:41PM +0200, Joshua Jacobson wrote: On the same machine, my script works in python 2.3.4 outside of zope, but it doesn't work in python 2.3.4 within zope as an external script. There I get sslerror: The read operation has timed out. I have a somewhat similar issue; an in-house Zope product is retrieving some information from a remote URL. If I hit the same URL from the command line on the zope server (using wget), it works fine. When Zope hits it, it gets a Bad Gateway error from the remote (Apache + Jboss) server. Will post back here with anything I find out, maybe it will help you. -PW -- Paul Winkler http://www.slinkp.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Dynamic Zope Style Sheets with HTML 4.01 Strict
Good day everyone! I added a doc type string to one of my Zope pages because it needed to pass an HTML 4.01 Strict validator. When I did this FireFox seems to ignore the style sheet. My style sheet is dynamic so I used a page template and tal. If the Content Type on the style sheet is set to text/html FireFox will not load the style sheet. If I set the Content Type to text/css I get an error when I save the page. Compilation failed xml.parsers.expat.ExpatError: syntax error: line 3, column 0 If I make my style sheet with a file and content type of text/cc instead of a page template FireFox loads the style sheet but the tal statements do not get rendered. So, how do I make a dynamic style sheet that has the correct (text/css) content type? Am I going to have to write a python script to call the style sheet page template and change the content type or is there a better way to handle this? Thanks! Andy ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Dynamic Zope Style Sheets with HTML 4.01 Strict
On Thu, Mar 31, 2005 at 11:38:59AM -0600, Andy Yates wrote: Am I going to have to write a python script to call the style sheet page template and change the content type or is there a better way to handle this? Page Templates are awkward to use for non-XML output. I never tried to use them for stylesheets. fwiw, I have good results using DTML Methods for my dynamic stylesheets. It's about the only thing I use DTML for anymore. Mine look roughly like this: dtml-with SomethingThatGivesMeABunchOfProperties body { background-color: dtml-mainBackgroundColor;; color: dtml-mainTextColor;; } /* more style rules follow */ ... /dtml-with -- Paul Winkler http://www.slinkp.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] question about manipulating zcatalog query results
Chris, a traceback for a script (testy in this case, called from testyer_html, as I've broken out the problem area and have been trying to work around it) using a for loop on a zcatalog result looks like: * Module ZPublisher.Publish, line 101, in publish * Module ZPublisher.mapply, line 88, in mapply * Module ZPublisher.Publish, line 39, in call_object * Module OFS.DTMLMethod, line 144, in __call__ DTMLMethod instance at 2b98350 URL: http://www.sarabandebooks.test/testyer_html/manage_main Physical Path:/sarabande/testyer_html * Module DocumentTemplate.DT_String, line 474, in __call__ * Module DocumentTemplate.DT_In, line 626, in renderwob * Module DocumentTemplate.DT_Util, line 198, in eval __traceback_info__: testy * Module string, line 1, in expression * Module Shared.DC.Scripts.Bindings, line 306, in __call__ * Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec * Module Products.PythonScripts.PythonScript, line 302, in _exec __traceback_info__: ({'traverse_subpath': [], 'container': Folder instance at 2b923e0, 'context': Folder instance at 2b923e0, 'script': PythonScript at /sarabande/testy}, ('Author', 'id', 'none'), {}, None) * Module Script (Python), line 16, in testy NameError: global name '_getiter_' is not defined There is no call to _getiter_, of course, in the script, but whenever I use any for looping on the results, I get a variation of the above. Any thoughts on this? thanks again, ira On Thu, 31 Mar 2005 12:43:52 +0100, Chris Withers [EMAIL PROTECTED] wrote: Ira Sher wrote: the time (save to wait for 7.4 to come out of beta). Is anyone else experiencing this? Is there a workaround? What am I missing? Can you paste a real traceback or two? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Dynamic Zope Style Sheets with HTML 4.01 Strict
Thanks! I've never used dtml for style sheets. I've always used page templates and never had a problem 'til now. Also, I don't see a way to set the content type on a dtml doc or method. I assume it would be text/html and then I back in the same boat. To restate my problem, FireFox in HTML 4.01 Strict mode does not seem to accept a style sheet if the content type is text/html. It needs to see text/css. (Of course IE is fat dumb and happy) Everything worked fine until I added this doc string to my page: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd; Unless somebody has some better magic this seems work. context.REQUEST.RESPONSE.setHeader('content-type', 'text/css') return context.stylesheet() This way I can leave the content type on the page template text/html so Zope is happy and make FireFox happy by overriding the content type to text/css. Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Winkler Sent: Thursday, March 31, 2005 12:00 PM To: zope@zope.org Subject: Re: [Zope] Dynamic Zope Style Sheets with HTML 4.01 Strict On Thu, Mar 31, 2005 at 11:38:59AM -0600, Andy Yates wrote: Am I going to have to write a python script to call the style sheet page template and change the content type or is there a better way to handle this? Page Templates are awkward to use for non-XML output. I never tried to use them for stylesheets. fwiw, I have good results using DTML Methods for my dynamic stylesheets. It's about the only thing I use DTML for anymore. Mine look roughly like this: dtml-with SomethingThatGivesMeABunchOfProperties body { background-color: dtml-mainBackgroundColor;; color: dtml-mainTextColor;; } /* more style rules follow */ ... /dtml-with -- Paul Winkler http://www.slinkp.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Folder Listing as a Plone Portlet Mini-HOWTO (draft)
http://web.irtnog.org/Members/xenophon/plone/portlet-folder-contents This folder listing portlet displays the title of the folder, its description, and a list of each item in the folder. Mousing over each link pops up its description in browsers that understand the title anchor (A) tag attribute. Your comments and suggestions are greatly appreciated! Best wishes, Matthew ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] ClockServer 0.1 released
Hi folks, I was creeped out by Zope scheduling products that started a separate thread to call methods at scheduled intervals and I got tired of setting up cron+wget to call Zope methods via HTTP, thus: http://plope.com/software/ClockServer It works by posing as a medusa server, and injects things that look like http requests into the publisher every so often. Have fun! - C ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: next part of tal:atrributes problem
below is python script c_nlogged: request = container.REQUEST RESP = request.RESPONSE passwd = request.password1 user = request.username, See the comma on the end of the user= line? That's your syntax error. When you get a syntax error always check a couple of lines further up the script. if container.chkpwd(uname=user,pwd=passwd): //getting sysntax error here. RESP.redirect(/store_nic/consumables/c_menu) else: RESP.redirect(/store_nic/consumables/index_html) below is zsql method chkpwd : select distinct(password) from c_userdet where username=dtml-sqlvar uname type=string and password=dtml-sqlvar pwd type=string i wanted to avoid d middle python script n handle the pwd validation in the same zpt . is it possible. i have carry req vars eg. username pwd ,districtname in session for future use. And can you _PLEASE_ use proper English spelling? It's not 'd', it's 'the'. I realise that you may not be a native English speaker so I won't worry about grammar, but when I see an email like this 99% of the time I don't even bother reading it. I don't mean to be offensive, but I think you would get a better response if your emails were easy to read, with proper capitalisation and words spelt out in full. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Dynamic Zope Style Sheets with HTML 4.01 Strict
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andy Yates wrote: Thanks! I've never used dtml for style sheets. I've always used page templates and never had a problem 'til now. Also, I don't see a way to set the content type on a dtml doc or method. You can just add the line, 'Content-type: text/css', followed by a blank line, to the top of the DTML method (yes, I know, that smells funny). I assume it would be text/html and then I back in the same boat. To restate my problem, FireFox in HTML 4.01 Strict mode does not seem to accept a style sheet if the content type is text/html. It needs to see text/css. (Of course IE is fat dumb and happy) Everything worked fine until I added this doc string to my page: Tres. - -- === Tres Seaver[EMAIL PROTECTED] Zope Corporation Zope Dealers http://www.zope.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCTIRaGqWXf00rNCgRAhLXAJ983+vJpioFFRfwyiuJIxHe11lJYwCgoJNC +OUbcLanRDKcYCbFhB69HKM= =bTey -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] WebDAV BUGS and access to /tmp directory
Pavel Zaitsev [EMAIL PROTECTED] wrote: I am back trying to figure out why my zope crashes on Please define crashes. Florent open('/tmp/tmp4fd4foo') kind of opens, which seem to originated from webdav code. Question to someone who is expert in webdav/*.py code... I just would like to know so I can further my investigation into the bug/malfuction of zope on OS X. -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of RD +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] User changing their own password via External Method with Cookie Crumbler
Dave Cinege [EMAIL PROTECTED] wrote: self.login.credentialsChanged(reqd['username'],reqd['username'],reqd['password']) Both before and after self.acl_users.userFolderEditUser(reqd['username'],reqd['password'],'','') That should be self.acl_users.userFolderEditUser(username, password, roles, domains) the domains may be [] (it's hardly ever used) but the roles have to be the roles you give to the user. You may want to do username = reqd['username'] password = reqd['password'] aclu = self.acl_users user = aclu.getUser(username) if user is not None: aclu.userFolderEditUser(username, password, user.getRoles(), user.getDomains()) Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of RD +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] WebDAV BUGS and access to /tmp directory
Florent Guillaume wrote: Pavel Zaitsev [EMAIL PROTECTED] wrote: I am back trying to figure out why my zope crashes on Please define crashes. Well zope is trying to create file in /tmp , process gets 'state' - 'U' which is not defined in the manual, maybe Unresponsive, like 'D' sign? then after while whole system locks up, it gets killed by overlooking parent, after which things sort of go back to normal.(pid of process gotten by 'ps aux|grep zope' changes.) gdb does not seem to be able to dump a backtrace of the process either, it says that process has quit while evaluating injected statement i have no idea what is going on. pavel. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )