[Zope3-Users] Hi, I'm new here
Hehe, Well, it's ALMOST true, since you guys have done so much amazing work since I last looked in! Anyway, as a newbie, I got some questions: - What docs should I read first? - How do I get Zope 3 up and running on Windows, and what's the best version for me to try? - Where can I find good reference docs? What books should I buy? - Are there any good example apps I can look at so I can build my first app, which is likely to be Swishdot ;-) cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Zope3 Product directory Problem
And I'm pretty sure that Zope 3 needs Python 2.4 ;-) Chris Adam Groszer wrote: Hello Shariq, Plone is a product for Zope 2.xx. Monday, July 11, 2005, 1:07:12 PM, you wrote: ss ss Hi, ss I have download Zope3 by using Python 2.3 but i didn't find ss any Product directory where I can install Plone. ss How to install Plone. ss Kindly help me, ss Thanks in advance ss Shariq br, Adam ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Zope3 Product directory Problem
Jim Fulton wrote: Chris Withers wrote: And I'm pretty sure that Zope 3 needs Python 2.4 ;-) No, Zope 3 works with Python 2.3. Some add-ons might require 2.4. Really? I'm sure I saw something fly by saying Zope 3 required Python 2.4 :-S Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Disappearing dictionary. Upon restart, dictionary resets.
Alec Munro wrote: class SomeObj: some_dictionary = PersistentDict({}) ouch, never use mutables for class attributes, for exactly the reasons you've found. two points: 1. the dict will get newly created every time this code runs, ie: each time Zope starts. 2. the object is never seated into the ZODB. It's an attribute of the class, not any instance of the class, and it's only instances of the class that are persisted by zodb. cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Interface tests: NotImplemented or NotImplementedError
Fred Drake wrote: A rich-comparison method should return NotImplemented to indicate that it doesn't implement the specific comparison; the response should be for Python to allow the other operand a chance to handle the comparison (inverted, of course). Oh :-( What an unfortunate name, I'd have called it Uncomparable on some such... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Interface tests: NotImplemented or NotImplementedError
Fred Drake wrote: On 10/20/05, Chris Withers [EMAIL PROTECTED] wrote: What an unfortunate name, I'd have called it Uncomparable on some such... While the current name is unfortunate, and Uncomparable would make the two easier to distinguish, Uncomparable would also be wrong. (If a comparison cannot be performed between two objects, that should be an exception.) This value is only used to indicate that the comparison is not implemented by the specific method chosen; the other operand may well implement the comparison. This is done to allow third-party numeric types to be implement comparison with the built-in types in meaningful ways, instead of the outcome of the comparison being dependent on the order of the operands. Sorry, I meant some-other-less-confusing-name, not that the one I suggested was the right one ;-) At the very least NotImplementedComparision or NotImplementedOperandForType would be more explicit... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Interface tests: NotImplemented or NotImplementedError
Fred Drake wrote: On 10/21/05, Chris Withers [EMAIL PROTECTED] wrote: At the very least NotImplementedComparision or NotImplementedOperandForType would be more explicit... Indeed. We (and many others in the Python community) are in complete agreement on this. Well, if we're all in agreement, what's required for it to actually change? ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] i18n of an image
Andreas Jung wrote: i18n:attributes just replaces the attributes with content from the catalog file. How can change an image depend on the user location? how about i18n:attributes=src python: test(your_condition, 'someurl1', 'someurl2') ? I tend to create a folder of the image name, with actual images called, for example, 'en' 'fr' 'de', etc and then have an index_html python script aquirable from fromwhere that picks the right image, falls back to a default if one isn't available, and renders it. This also means you can juse use normal image tags... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] apache as zope3's frontend and NTLM
Simon Hang wrote: 1. Installed mod_ntlm for apache 1.3, and tested. Really? Did you get this to work? I've heard it was flakey and/or broken... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] apache as zope3's frontend and NTLM
Simon Hang wrote: Not under heavy load. Any machine should be able to handle this. Ah, hmmm, do you know how it would behave under high load? Our current use case resulted in problematic behaviour under high load and I wonderd if this had been addressed in the version you are using.. But now, next question is how to let zope know the authenticated user? REMOTE_USER is only available in CGI SSL mode. Really? i just thought REMOTE_USER was put in the CGI environment, which Zope had access to no matter how it ran? Zope 2 had a REMOTE_USER mode but I don't know about Zope 3 I'm afraid :-S cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: apache as zope3's frontend and NTLM
Philipp von Weitershausen wrote: True, it's not the nicest solution. But you could make it safer by first stripping the according request variable from the QUERY_STRING. mod_rewrite is quite powerful in that respect. Is it just me, or should a deep feeling of uneasiness accompany the extraction of authentication credentials from a query string? ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Permission required for renaming?
Alec Munro wrote: My users are unable to rename things, seemingly everywhere. They can add, remove, but not rename, or cut/copy. I'm not sure how to set the permission for this. Do they have the necessary permissions on the objects container rather than the object itself? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: What's the rationale of @@ ? Was: index.html
Jim Fulton wrote: This is a matter of policy. It is straightforward to change. Many people hate @@ and the ++view++name syntax. They will often arrange their item and view names so that they don't overlap. How hard is it to plug in different url parsing? It's often something people want to do their own way, and as you point out, some people don't like the default ;-) cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: What's the rationale of @@ ? Was: index.html
Jim Fulton wrote: This isn't really URL parsing, it's traversal. It's easy to plug in different traversal adapters. Are there any examples of this or docs? Chris - sorry if I'm missing something obvious :-S -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Is Zope Zope2 or Zope3?
Brad Allen wrote: Maybe it's too late for this, but what about coming up with a new name to reflect the reality that Zope 3 is a complete redesign and rethink? I always thought Zope sounded too much like SOAP, anyway. Here are some name ideas I think renaming would be an exceptionally bad idea... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Squid/Apache Caching
Steve Wedig wrote: I'm in the planning stages for developing a Zope 3 application. It would be nice to know my http caching plan ahead of time. It seems that the two main options are squid and apache. I was wondering if the most flexible setup might be to have apache running behind squid, and zope behind apache. My personal preference is apache - squid - zope But that's 'cos I like Apache's rewriting and have more faith in it as a front-end proxy for sanitizing requests and the like... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Zope 3 Developer's LiveBook
Reinoud van Leeuwen wrote: On Tue, Feb 14, 2006 at 09:15:42PM +0100, Florian Lindner wrote: I also think that pure Latex would be the best choice. It's convertible into a lot different formats and can be edited just using a simple text editor. Isn't Docbook a better choice? Is is specially designed for documents like this, and easily parsable. lots of tools around. It can (AFAIK) be read and written by Open Office or any text editor. If I can use a real word processor to edit stuff (ie: OpenOffice) then I'd much prefer to see this... I find it ironic the one of the first uses of PCs was to do word processing, and yet we seem to always strive to edit plain text of one variety or another, and yes, that includes latex ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] What attributes are made persistent
Peter Bengtsson wrote: self.queue seem is empty each time I restart Zope. That's because dictionaries are not derived from Persistent. Try PersistentDict. D'oh! That's confusing. Isn't there a class that gathers all of these in one. Urm, Peter, the rules of persistence w.r.t. mutable objects have been documented for a _long_ time. There's nothing Zope 3-specific here, and someone who's been using Zope as long as you should know better ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Squid/Apache Caching
Peter Bengtsson wrote: That's very interesting. If you understood Squid better do you think you'd leave out apache? Maybe, I guess I just have a soft spot for Apache though ;-) And what about the performance overhead? Any experience you can share? Nope, Plone gives me all the performance overhead I need... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] What attributes are made persistent
Peter Bengtsson wrote: So by using PersistentList it just means that you can use: self.alist.append(1) in your code. The attribute, self.alist, is still saved even without PersistentList but it just means you have to be careful when writing to it. PersistentX classes also usually subclass Persistent which means they get their own pickle jar. This can slow ZODB growth if you have lots of big attributes but where only one of them regularly changes: make the changing one a PersistentWhatever instance. cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Zope 3 Developer's LiveBook
Fred Drake wrote: I've worked a bit with generating OpenDocument documents for use with OpenOffice, and have no expectation that the document will be edited in a way that a plain-text user will be happy with. Since the files are ZIP files that contain XML, it's not like supporting plain text users is a use-case for OpenDocument. Indeed, but I'm guessing there's maybe a script that can be run to turn OpenDocument into DocBook and vice versa? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Zope 3 Developer's LiveBook
Fred Drake wrote: On 2/16/06, Chris Withers [EMAIL PROTECTED] wrote: Indeed, but I'm guessing there's maybe a script that can be run to turn OpenDocument into DocBook and vice versa? The DocBook -- OpenDocument conversion is lossy, so there's no round trip. :-( Oh well, not too attached to DocBook then... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Squid/Apache Caching
Andrew Sawyers wrote: If you have needs for Apache, use Apache - but there is no need for it just for rewriting urls. Agreed, Jens can fill you in on the rest of the details as to why we use Apache ;-) cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] zope3 debian/testing ZopeXMLConfigurationError
Stefane Fermigier wrote: You should probably report this to the Debian Zope packaging team. ...and then once you've given up on package builds, try compiling from source ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] zodb objects backup
Shaun Cutts wrote: So far so good, modulo the replication issue. (We don't have much funding yet... but if initial launch goes well, we're hopeful :)). As people have mentioned, you can use repozo to get almost the same effect. Either that or do app-level replication ;-) It would be very nice if there were a faq or other doc addressing all of these scalability-related questions systematically for someone like me who understands what a relational database is doing for them (in return for squashing all their objects). It seems I'm not the only one with these concerns. :) Welcome to Open Source, we look forward to seeing your newly-written faq as it becomes available online ;-) In the meantime, I had an idea about my current implementation: maybe instead of __getstate__ and __setstate__ I should put the external data in _v_data (marking as volatile). Then I could trap for its existence, and load if necessary; and also have an explicit refresh wired to a button in the GUI. Yup, this is exactly what _v_ was designed for... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: ZODB - ways of storages?
Andreas Elvers wrote: Personally I don't like to store big files (pictures and the like) in ZODB. Zope provides you the functionality to store this data outside of ZODB (somewhere on the harddrive). Although commonly a reference still exists in ZODB in form of a content object. This content object has the knowledge to access the stored data. Be careful here, getting transactional semantics right with files _not_ in ZODB is hard and not something many people get right... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] CORBA integration
Reinhold Strobl wrote: is it possible to integrate CORBA with Zope. Sure, but I doubt it's been done before, so you'd be on your own... I mean, generally can I can code every python code in Corba, Dunno what this means, CORBA's a communication protocol not a programming language, right? can I also start a CORBA server in Zope components? Not unless you find a CORBA server an integrate it... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] How to distribute distinct components among multiple Zope servers?
Reinhold Strobl wrote: For instance, server A provides the views and server B provides business functionality via utilities. As a side effect, this should help to increase scalability, since I split functionality over multiple servers. But how to I get them to work together? Is XML-RPC the right/only solution? Have you looked at ZEO? I've used the pattern of a backend server pumping content into a zeo storage server to be served out through an app server for years on one major project and that sounds like it'd work for your requirements above. cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Deleting subobjects works half only
Stephan Richter wrote: On Tuesday 23 May 2006 01:38, Frank Burkhardt wrote: [x for x in iterator()] easier is list(iterator()) Okay, but where does BTrees promise that iterkeys() returns something that's immutable? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] i18n questions
Hi All, Dunno if this is the right list, but it's about Zope 3's i18n stuff and Five and Zope 2.9, so if anyone can recommend a better list, please let me know... I did try and ask about this on the zope@zope.org list but got no response :-( I have a ZODB-based Zope 2.7 app using PTS that I'm trying to move to Zope 2.9 and I'd like to use the latest and greatest i18n stuff available... I'm guessing this is the i18n stuff from Zope 3? If so, are there any docs on making the transition I'm trying to make? In particular: - Can my existing .pot and .po files be used? - Are ZPT's marked up in the same way as they were in Zope 2? - How would I mark up constant and computers strings in zodb-based Python Scripts? - Same question for External Methods. - How do I ask the translation service what the currently negotiated language is? - How do I ask the translation service what all the available languages are for a particular domain? - How do a write/register a negotiator that choose a language based on an attribute of the user object and then falls back to normal browser negotiation if that attribute isn't present? - How do I generate .pot files from ZPTs, Python Scipts and External Methods? I used to use PTS' .missing functionality and just spider the whole app. Is something similar available in Zope 2.9/3 land? Many thanks for help with any/all of the above... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] i18n questions
Marco Mariani wrote: and then in overrides.zcml: adapter for=zope.publisher.interfaces.browser.IBrowserRequest provides=zope.i18n.interfaces.IUserPreferredLanguages factory=my.package.BrowserItalianLanguage / Thanks! Where does this snippet go in Five-land? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] i18n questions
Stephan Richter wrote: On Wednesday 31 May 2006 04:29, Chris Withers wrote: - Can my existing .pot and .po files be used? Yes, the PO file format is totally independent of Zope and Python. But with PTS, I don't need to build .mo's myself, right? ;-) - How would I mark up constant and computers strings in zodb-based Python Scripts? That issue has not been addressed at all, since we are not supporting TTW development. That doesn't answer my question ;-) - How do I ask the translation service what the currently negotiated language is? There are other interfaces for this; I believe ILanguageNegotiator. Will that let me find out what the currently negotiated language is? - How do I ask the translation service what all the available languages are for a particular domain? I do not think there is an API for that, but you could certainly develop one. Where and how would I do this? I'd suggest this is an oversight in the existing API's and it'd be better to add to an existing API rather than come up with a new one... - How do a write/register a negotiator that choose a language based on an attribute of the user object and then falls back to normal browser negotiation if that attribute isn't present? Just implement the right interface and register it. This is not too hard and I think there are code examples out there. Can you point me at some? I reckon I'll be okay writing the actual python, it's just going through the torture of zcml to find the right goat to sacrifice that I'm worried about, particularly as this is Five, not just Zope 3... - How do I generate .pot files from ZPTs, Python Scipts and External Methods? I used to use PTS' .missing functionality and just spider the whole app. Is something similar available in Zope 2.9/3 land? In Zope 3 you can simply call utilities/i18nextract.py; it will extract all message strings from Python, ZPT and ZCML files. Yeah, but not ones in the ZODB, right? Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Found a (perhaps obvious) page template speedup
Stephan Richter wrote: The point is that I am not interesting in supporting the ZMI at all. I have no use for users or developers to ever use the ZMI. In fact, basing my skin on the ZMI is bad because it provides all those URLs I (a) do not have control over -- thus being a security risk, and (b) are not needed and make the system slower. This is stupid. One of the big wins for Zope 3 was that you were supposed to be able to re-use UI code without having to write it all from scratch. The ZMI has a lot of widgets that people should want to re-use (generically: tree controls, file widgets, directory listings, etc, specifically: forms and configuration for the generic parts of zope) It sounds like you're advocating writing every bit of UI from scratch, as you have to in Zope 2 due to the hard-coded nature of the ZMI, but I'm hoping I'm mistaken... Am I? Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: I fold. What are ++etc++ and ++resource++ etc?
Philipp von Weitershausen wrote: 2. Fall out of search engines. Why? Search engines don't particularly like weird characters in urls. @ and + are not weird characters in URLs. They're allowed by the spec and I'd be surprised if they actually are a problem. So far, this is all hand-waving. Actually, no. I've had customers insist on these characters (and infact, using - instead of _ between words in urls) because they want to be certain a that Google will index the words in the url. Now, I don't know how pagerank works (funny that!) but in this instance, I'm happy to run with whatever the customer wants... The same way you produce a Zope 2 app: make sure view names and content names don't clash and you're all set. Indeed. Just as long as it's possible and doesn't involve too much hoop jumping ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Splitting ZODB ?
Jim Fulton wrote: The default Zope 3 configurations still organizes objects into a tree. Path identifiers are no longer used. How do you now uniquely identify an object? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Splitting ZODB ?
Jim Fulton wrote: First, you usually don't need an independent unique id for an object, since direct object references work much better in Zope 3 than they do in Zope 2. Great :-) If you do need a separate identifier of some kind, you can use a key reference or use an integer id from an intid utlity, which simply assigns integers to key references. What's a key reference? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Splitting ZODB ?
Philipp von Weitershausen wrote: What's a key reference? - zope.app.keyreference - zope.app.intid I was wondering if there was a more high level explanation that rtsl ;-) I kinda know what an intid is, but what's a key reference? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Splitting ZODB ?
Philipp von Weitershausen wrote: class IKeyReference(zope.interface.Interface): A reference to an object (similar to a weak reference). The references are compared by their hashes. There, that wasn't so hard... Well yeah, but it's also not very explanatory ;-) If it's similar to a weak reference, why not just a weak reference? What are the salient differences between a normal weak reference and a key reference? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: [Zope3-dev] AssertionError in ZEO cache
Tim Peters wrote: Same answer as before: someone who understands the intended invariants during cache verification needs to stare at the mutually inconsistent code and comments, and figure out was intended. Is there a list of suspects for this? (or at least change it and see what happens? ;-) ) You could do that immediately :-) yeah, but I really don't want to ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Next steps...
Philipp von Weitershausen wrote: I wouldn't say that. It depends on your taste, really. I personally prefer the package-includes approach for development environments; for actual deployments I find having no package-includes at all, but instead putting everything in site.zcml useful, because it's easier to see in one place what's included and what not. I certainly prefer this ;-) That said, I do like Apache 2 - on - Debian's a2enmod, a2dismod, a2ensite and a2dissite. If Zope had equivalents, I'd probably flip round to the other view... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: Re : [Zope3-Users] Re: Zope 3 SSL
Stéphane Brault wrote: But I can't seem to be able to use apache as a proxy. If you elaborate, people may be able to help you. However, for that specific problem #apache on irc.freenode.net will probably be of more service... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] newbie problem
Karel Antonio Verdecia Ortiz wrote: Thank you, but when I use now svn:// instead of http://; I get: svn: No fue posible conectarse al equipo 'svn.zope.org': Network is unreachable I think it should be a problem with my proxy Indeed, you need to unblock the port. I find it frustrating that svn.zope.org doesn't at least server anonymous checkouts over http :-/ Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Zope 3 Distilled book update 3
Benji York wrote: Baiju M wrote: (This is about : http://kpug.zwiki.org/Zope3Distilled) I recommend you verify that you can use the Distilled name. I believe computer book titles of that form are protected by an Addison-Wesley trademark. I'm pretty sure a trademark like that can't be claimed. You'd be effectively trademarking a dictionary word, and I'm pretty sure that's not allowed... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: Zope 3 Distilled book update 3
Philipp von Weitershausen wrote: I'm pretty sure a trademark like that can't be claimed. You'd be effectively trademarking a dictionary word, and I'm pretty sure that's not allowed... Let's see, looking through the first pages of my English dictionary, it seems that Apple is also a dictionary word... Yes, and you'll also notice that Apple's trademarks are not just for the word Apple... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: NTLM credential plugin
Gary Poster wrote: http://www.innovation.ch/personal/ronald/ntlm.html), the problem is that the 4 way handshake has to happen *within a single connection*. Apparently MS abuses HTTP to perform this. Hmmm, I'm not sure this is true. One project I work on has 10,000+ users a day authenticating via NTLM and I'm not convinced we maintain an http connection for the whole dance. Where you will run into problems is if you have a high volume of users. The DCs can be slow to respond and so you end up with lots of app server threads tied up waiting for them. Since Zope has a limited number of threads, this is an issue. Someone on the project is currently building a mod_python thingy to do this auth and bounce back with a cookie that Zope then trusts since Apache can spawn off new threads at will... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: NTLM credential plugin
Chris McDonough wrote: The right thing to do here is probably to just use something like http://modntlm.sourceforge.net/ and trust the REMOTE_USER environment variable passed by Apache... let somebody else worry about maintaining it. ;-) 'cept it don't work ;-) (well, not in the aforementioned 10,000+ user project I mentioned before) cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] sx.translations 1.0 Released!
This package provides components for use with Zope 3 and Zope 2 + Five that implement both ITranslationDomain and ILanguageAvailability as well as supporting the recording of untranslated msgids. This means that, not only do the components support the interface require to provide messages to Zope 3's i18n framework, they can also be used to generate a list of available languages using code similar to the following: from zope.component import getUtility from zope.i18n.interfaces import ILanguageAvailability from zope.i18n.locales import locales, LoadLocaleError domain = 'myproject' def getLanguages(self): options = getUtility(ILanguageAvailability, domain).getAvailableLanguages() options.sort() result = [] for option in options: lang = option[0] try: locale = locales.getLocale(lang) except LoadLocaleError: # probably not a real locale continue result.append( {'code':lang, 'name':locale.displayNames.languages[lang], ) return result Sample ZCML for configuration could be: configure xmlns=http://namespaces.zope.org/zope; xmlns:i18n=http://namespaces.simplistix.co.uk/translations; !-- make the sx.translations' registerTranslations directive available -- include package=sx.translations file=meta.zcml / !-- register our locales using sx.translations -- i18n:registerTranslations locales=../locales missing=../locales/myproj.pot encoding=utf-8/ /configure For more information, please see: http://www.simplistix.co.uk/software/zope/sx.translations I'm happy to contribute this code to the Zope 3 core if people can tell me where and how to do so... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] looking for something like getUtilitiesFor...
...but which just gets the names of utilities available for a particular interface. The reason I ask is that getUtilitiesFor returns tuples of name and utility. This seems wasteful, particular when the utilities need to be created from factories, and all I'm then doing with the list is generating a drop-down for people to select from... Any ideas? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: looking for something like getUtilitiesFor...
Philipp von Weitershausen wrote: Utilities are never created when they're looked up. They're created when registered. Singletons (instances) are registered with the utility registry, never factories. Ah, yes, of course, I think I'm looking for local utilities... and all I'm then doing with the list is generating a drop-down for people to select from... getUtilitiesFor is all we have. If you want that drop-down, consider using UtilityVocabulary from zope.app.component.vocabulary, e.g.: class FooUtilityNames(UtilityVocabulary): interface = IFoo nameOnly = True classProvides(IVocabularyFactory) Register that as a utility: utility component=...FooUtilityNames name=Foo Utilities/ Then you can refer to it from a schema definition (Choice field). Hmm, okay, how have the UI's for the creation of local utilities been built? (I'm thinking there must be some kind of drop-down somewhere with an Add list as in Zope 2's ZMI, and that must include the available types of local utility?) Also, more theoretically, would you see indexes for a catalog as being local utilities. If not, what would you see them as being? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: looking for something like getUtilitiesFor...
Philipp von Weitershausen wrote: Chris Withers wrote: Philipp von Weitershausen wrote: Utilities are never created when they're looked up. They're created when registered. Singletons (instances) are registered with the utility registry, never factories. Ah, yes, of course, I think I'm looking for local utilities... But even global utilities are *first* instantiated from their factory, then registered as singleton instances. Yes, that's true, but unrelated... In fact, in this case, the utilities that are global are just python functions marked with directlyProvides ;-) Hmm, okay, how have the UI's for the creation of local utilities been built? (I'm thinking there must be some kind of drop-down somewhere with an Add list as in Zope 2's ZMI, and that must include the available types of local utility?) Sure. Just use the standard Add menu in Zope 3. Some of the items there are potential local utilities, such as the Catalog, Cookie Client Id Manager, Error Logging Utiltiy, etc. You can add these objects anywhere, though it is recommended to do it within ++etc++site. The thing that makes them available as utilities is the registration. All objects have a Registration tab. Ah, I see, so rather than using ZCML, you use the Registrations tab? (now I'm dying to know if this has been implemented in Zope 2/Five) That said, when you add a local utility in Zope 3, does it automatically register itself by default? It'd be quite annoying to have to: 1. add you thing that uses local utilities 2. oops, actually have to go create the local utility 3. great, now I have to register the damn local utility 4. finally, I can go back and tell my thing to use the new local utility Ideally there'd be some way to do steps 2-4 automatically, but at the very least, having to manually do 3 seems superfluous, although I do like the idea of being able to manually un-register a utility... Also, more theoretically, would you see indexes for a catalog as being local utilities. If not, what would you see them as being? The catalog is the local utility. That's also true, but also not really what I was getting at ;-) It functions as a container for indices. Indeed, and how are these indices managed? For me, an Index is a local (and potentially or maybe even definitely local to only that catalog) utility for ICatalogIndex (or whatever it may be called). For me it'd be nice to register the types of indexes using something like (and this is all pseudo code): utility provides=catalog.interfaces.Index factory=catalog.fieldindex.FieldIndex name=Field Index/ utility provides=catalog.interfaces.Index factory=catalog.textindex.TextIndex name=Text Index/ ...so you then have your list of addable index types. How _is_ this done in Zope 3? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Security in Zope 3
Hi All, Curious about security in Zope 3. In Zope 2 the following would be bad: class X(SimpleItem): pass class Y(SimpleItem): pass class Z(SimpleItem): pass x = X() y = Y() z = Z() x.y = y x.z = z y.z = z ...because z has two containment paths: x.z x.y.z ...which might have different security constraints. How does Zope 3 handle the same kind of setup? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Reportlab threadsafe solution?
Chris McDonough wrote: Why not just use a mutex (a recursive lock makes things easier too)? Yeah, Big Fat Lock has been my solution with Reportlab, worked well under high load for several years. I don't use RLocks myself, paranoia says they're not big or fat enough ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Backing up ZEO
Timothy Reaves wrote: Is the recommended way still to use repozo, or is there a different ZEA client for that? You either want to run repozo on the storage server or look at ZRS, which will cost you real money... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] suppressing menu item
Tom Dossis wrote: browser:page name=upload.html menu=zmi_views title=Upload for=zope.app.file.interfaces.IFile template=file_upload.pt class=.file.FileUpload permission=zope.ManageContent / Is it possible, and if, how? Hi Sascha, I think if you name your page (editform) 'upload.html' rather than 'editmyfile.html' it will effectively override the base view. I suppose so, but what if I don't want to replace it, just wanna get rid of it? Don't know whether you can - other than a work around, eg. override it (overrides.zcml) perhaps with a new permission. This sounds like the first in the wild case of something I've been looking for in zcml since day 1: the ability to turn off directives that have been made elsewhere... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] how to know which port zope is runnning on?
Shailesh Kumar wrote: Thanx Tom, but I was looking for the general case, not in the context of a request. Like say during application startup I want to know the port number. Is it possible? This is surely in the event log, why don't you look there? Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] how to know which port zope is runnning on?
Shailesh Kumar wrote: Thanx for the hint. I still don't know how to programmatically access the event log. will try to figure it out. Why do you need to know programmatically? Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] how to know which port zope is runnning on?
Shailesh Kumar wrote: I have 2 different zope applications running (on different machines) and they would be talking to each other, one is a master application and there may be multiple instances of the other one (on different machines). I need the port number information for registing one with another programmatically. don't want to fix port numbers for them. Well, I'd be looking to dig into the config info provided by zope.conf. In Zope 2, this is done with: from App.config import getConfiguration config = getConfiguration() config.whatever.etc ...Zope 3 likely has something similar. couldn't figure out how it can be accessible). Probably I can get it by parsing zope.conf again in my code. Don't do that, it would be silly ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Infrastructure Requirements?
Dan Buch wrote: Let's say that we take HA out of the equation Well, okay, but I thought that was the point of this discussion? ;-) and that our supposed infrastructure already has storage and web covered. How so? Are you storing all your data in a relational database? Is someone else running a caching web proxy in front of you? The app will be used by *maybe* 50 concurrent users. What kind of usage are they each up to? Just reading? Lots of modifying objects? Are they authenticated? If so, how? Again, where you store your data makes a difference here... I'm already pretty confident in the answer, but would I do okay with something like Config 1 shown here: (please forgive the HUGE URL) Why the obsession with Sun? What's their brand getting you? Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Infrastructure Requirements?
Dan Buch wrote: security: 100% authenticated, all the time (TLS/SSL?) TLS/SSL has little to do with authentication. What percentage of your users will be logged in using a password/sso/nltm/etc? activities: 90% reading 10% modifying objects Yeah, you'll have no problems with zodb based on those figures... It took me long enough to convince my bosses that Ubuntu, Zope, Python, everything FOSS, were safe alternatives to going 100% MS. If my company can purchase a Sun server, then we can purchase support from Canonical: http://www.ubuntu.com/sun Canonical will support anything if you give them money ;-) I wouldn't have thought Sun was that high up their list of caring... Please let me know if I'm totally off-base with my logic here ;-) The IT infrastructure consultant (the company pres.'s son) would prefer to buy everything through Dell, so if I'd be better off abandoning my obsession with Sun, well... that's what I'll have to do :) Stick with the dells... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] What is the difference between acquisition and trivial?
Alex Cheng wrote: Thanks. What 'trivial' are you referring to? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Using Zope3 components outside Zope
Andrew Groom wrote: I need to reuse a Zope3 component outside Zope for doing some non-web based regular processing, e.g., bulk emailing, and the component makes use of adapters specified in the configure.zcml for the component. How do I make these adapters available to my non-Zope process ? I've already created non-Zope processes that don't use any .zcml-driven functionality, btw. Not really sure what you're asking. You'll neeed zope.component available in the python environment you're using, and you can find examples in Philipp's book of how to register adapters without zcml. Are these any other problems you're having with this? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: zc.queue conflict question
Gary Poster wrote: Why does adding to identical objects to a queue at the same time result in a conflict? Surely they should both just get added in an artbitary order? Basically, the constraint allows for more powerful conflict resolution, or at least simpler code. Um, can you explain that? How is adding two dissimilar objects different from adding two identical objects? I'd certainly welcome a variation that removed the constraint, possibly in exchange for weaker conflict resolution, if you were willing to contribute it to zc.queue. Sure, but I'm still hazy on what the problem with adding two identical objects is. Can you explain? Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] zope.conf options
Thierry Florac wrote: I'm looking for the set of parameters that can be used in zope.conf file, including those relatives to ZODB caching options and ZEO configuration. Any link would be greatly welcome... Looks for a schema.xml file in the source distro. That'll be the ZConfig schema used to drive zope.conf and it'll have all the options in it. (lib/python/zope/app/twisted/schema.xml might well be what you're after) cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] ObjectModifiedEvent but not ContainerModifiedEvent
Hey All, How do I subscribe a susbcriber to ObjectModifiedEvent but not ContainerModifiedEvent? I have a subscriber that is currently subscribed to IObjectModifiedEvent, but as a result it's getting called when objects are added and removed whereas I only want it when the container is actually getting modified. cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: ObjectModifiedEvent but not ContainerModifiedEvent
Martin Aspeli wrote: def handler(event): if IContainerModifiedEvent.providedBy(event): return ...which is pretty inefficient. All the subscriber lookup, etc, has to happen to get this far. There must be a better way... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: ObjectModifiedEvent but not ContainerModifiedEvent
Jeff Shell wrote: Well, a container is an object. It's being modified by the sake of its content changing. Yeah, but the reason there's two types of events would probably be so you can differentiate between them with subscribers. The inheritence structure and nature of how adapters/subscribers works seems to be sub-optimal, especially for my use case, which I suspect may be a common one: the set of operations you want to do when a container's properties change doesn't have much intersection with those you want to do when the contents of a container changes. Better way? The only better way, really, would be doing a re-dispatch. Or fire off your own event when you modify other properties on a container. Indeed. I think a better long term solution would be to have ContainerModified be seperate from ObjectModified, no? Or kick all of the code that sends modified events so that they send along descriptions of what has changed. You're still filtering then, and I don't think we want ot be filtering in that way here... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] best way to get started nowadays?
Hey All, I need a little time tracking app so I thought I'd knock it up in Zope 3 with a ZODB backing, just to check on the latest and greatest way to build a Zope 3 app. So, what *is* the standard way now and where can I read about how to do it? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] best way to get started nowadays?
Andreas Jung wrote: I need a little time tracking app so I thought I'd knock it up in Zope 3 with a ZODB backing, just to check on the latest and greatest way to build a Zope 3 app. So, what *is* the standard way now and where can I read about how to do it? GROK? I *do* want ot try grok at some point, but not necessarily for this project... I was talking about normal, straight Zoep 3 here... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] best way to get started nowadays?
Jens Vagelpohl wrote: I was talking about normal, straight Zoep 3 here... Look at Phillip's book? I suspect even the 2nd edition of that is out of date w.r.t. current practice, hence why I'm asking on the list ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] best way to get started nowadays?
Jens Vagelpohl wrote: I suspect even the 2nd edition of that is out of date w.r.t. current practice, hence why I'm asking on the list ;-) I don't think that's the case. I'm pretty sure the full move to eggs along with the introduction of buildout and the recipe-based stuff has happened since the book came out... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] best way to get started nowadays?
Benji York wrote: Chris Withers wrote: So, what *is* the standard way now and where can I read about how to do it? That's in flux at the moment. I think Philipp's zopeproject is a step in the right direction, but haven't had a chance to look at it closely yet. Where's zopeproject's home? Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: best way to get started nowadays?
Philipp von Weitershausen wrote: Yes, it has happened. That doesn't mean all 24 chapters are invalid now. I know that! Just don't take the chapter on Installing Zope for granted. And it's precisely this I'm asking about ;-) My suggestion is to use zopeproject which I've tried to document extensively: http://cheeseshop.python.org/pypi/zopeproject. Will do! Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Zope3, ZEO and RAMCache
Thierry Florac wrote: Hi, I have a simple question : I'm using RAMCache What's RAMCache? with ZEO and several Zope frontends ; when calling cache.invalidate(), are the selected entries invalidated only on the Zope frontend which handled the request, or are they invalidated on each frontend ?? if the invalidation finds its way back to ZEO, all clients will be invalidated... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Zope3, ZEO and RAMCache
Thierry Florac wrote: As it's name implies, RAMCache utility only stores it's data in RAM. So I guess that ZODB won't be impacted by cache updates, as other Zope frontends... So what do you mean by find it's way back to ZEO ? And how can you handle this ?? Oh, I have no idea about RAMCache... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] using zope.testing's testrunner outside of zope
Hi All, I've come to realise that a lot of the python packages I've developed for use outside of zope (twiddler and mailinglogger spring to mind) rely on zope.testing and work best with the testrunner in zope.testing. What's the best way to use this in a non-zope environment? Also, what's the best way to indicate in setup.py that my package needs zope.testing for the tests? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] formlib example/how-to?
Hey All, I need something like formlib so want to give it a spin. Is there a good how-to or example anywhere? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] formlib vs z3c.form
Chris Withers wrote: I need something like formlib so want to give it a spin. Is there a good how-to or example anywhere? Kapil rightly pointed out off-list that z3c.form is the latest and greatest. Which one is best and where do I go for docs/examples? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Adapter registration problem
Hi All, Why does the following adapter registration not work? adapter for=.SomeModule.SomeClass * provides=.interfaces.ISomething factory=.factories.Factory name=something / from zope.component import getAdapters from SomeModule import SomeClass from interfaces import ISomething getAdapters((SomeClass('test'),object()),ISomething) [] Cheers, Chris ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Adapter registration problem
Stephan Richter wrote: zope.component.getAdapters((MyClass(), object()), ISomething) generator object at 0xb7c56d8c list(zope.component.getAdapters((MyClass(), object()), ISomething)) [(u'something', __main__.MyFactory object at 0xb7b4a06c)] Interesting, what version of zope.component are you using? I'm using the one that ships with Zope 2.9.4, were any bugs in this area fixed since then? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] using zope.testing's testrunner outside of zope
Stephan Richter wrote: If you use buildout, there is a recipe for creating a test runner. See http://svn.zope.org/zope.kgs/trunk/?rev=83325 for a good example. Where's the actual test runner or test runner creater? Also, what's the best way to indicate in setup.py that my package needs zope.testing for the tests? There is a test option, where you can list all packages that should be installed for testing. See http://svn.zope.org/zope.component/trunk/setup.py?rev=81358view=auto What's the difference between tests_require and extras_require['test']? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] using zope.testing's testrunner outside of zope
Stephan Richter wrote: On Friday 01 February 2008, Chris Withers wrote: Stephan Richter wrote: If you use buildout, there is a recipe for creating a test runner. See http://svn.zope.org/zope.kgs/trunk/?rev=83325 for a good example. Where's the actual test runner or test runner creater? [test] recipe = zc.recipe.testrunner eggs = zope.kgs [test] Ah, okay, so what actually is zc.recipe.testrunner? I thought the testrunner was in zope.testing.testrunner... I feel like I'm missing a lot here, is there documentation I can read to catch up on this? Also, what's the best way to indicate in setup.py that my package needs zope.testing for the tests? There is a test option, where you can list all packages that should be installed for testing. See http://svn.zope.org/zope.component/trunk/setup.py?rev=81358view=auto What's the difference between tests_require and extras_require['test']? tests_require contains a list of test dependencies that setuptools uses for its integrated test support. Unfortunately, this lsit is not exposed, so buildout cannot use it. So instead, we use extras_require['test'] to provide that same list. Ah, okay... so I only need to worry about extras_require if I want to support buildout? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: [Zope-dev] Zope 3.4.0 candidate 1 Released
Marius Gedminas wrote: how bout a zope3 page on myspace?lol Just write a Facebook app that interacts with the list archives ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Get anonymous and logged users
David Pratt wrote: I was thinking of a small wsgi app that puts ip into a database or dict and remove ips if they are not active within a time interval. Sessions will give logged users so they can be differentiate with anonymous. Think that should do it. Seems simple enough, any other ideas? This is all well and good as long as you accept that it's only ever an guestimate ;-) I'd also suggest using something other than zodb to store this information. cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Zope Product Recommendations
Jon Hadley wrote: Hi all, The list of products at Zope.org is fairly daunting for a n00b like me. None of the product there will likely work with Zope 3 anyway ;-) Does anyone have any recommendations in terms of usefulness / wow factor / day to day utility apps? That's a bit like asking what types of food are there?, it's too general to be meaningful ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] PyCon UK Approaching...
Hi All, Apologies for what might be seen as spam but I wasn't even aware this conference took place last year and I live in the UK! So, hopefully you won't mind me letting you know that it's taking place again this year ;-) PyCon UK 2008 is an independent, community-run, community-controlled and not-for-profit conference dedicated to the Python programming language, Python applications, toolkits and frameworks. It also features social events and a chance to meet fellow Python users. It is organised by members of Python User Groups from across the United Kingdom. PyCon UK 2008 will be taking place in Birmingham City Centre from the 12th-14th September. It will feature the leading members of the UK Python community as well as Ted Leung from Sun Microsystems, Jacob Kaplan-Moss from the Django Project and Mark Shuttleworth, a developer of the Bazaar Version Control System and founder of the Ubuntu Linux distribution. PyConUK will feature around 60 talks and tutorials, a conference dinner and two pub events. Booking is open now at http://pyconuk.org/booking.html Further Information is available at http://pyconuk.org/ Hope to see you there! Chris :-) -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] getting post data in a Zope 3 view
Hi All, I have a view: from zope.publisher.browser import BrowserView class Receiver(BrowserView): def __call__(self): print self.request.bodyStream.read() return 'done' ...which I'm trying to test with the following script: import socket socket.setdefaulttimeout(5) from httplib import HTTPConnection c = HTTPConnection('localhost:8080') c.request('POST','/@@wasp','foo',{'Content-type':'text/plain', 'Content-length':3}) print c.getresponse().read() ...but the processing seems to hang in bodyStream.read() until the socket times out on the client side (ie: I get a timeout exception) at which point the read() returns and shows what I'd expect. What am I doing wrong? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] getting post data in a Zope 3 view [moreinfo: paster]
Chris Withers wrote: ...but the processing seems to hang in bodyStream.read() until the socket times out on the client side (ie: I get a timeout exception) at which point the read() returns and shows what I'd expect. What am I doing wrong? I should note that I'm using paster serve here, so I wonder if that has any bearing? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] getting post data in a Zope 3 view - paste.httpserver is the problem
Chris Withers wrote: I should note that I'm using paster serve here, so I wonder if that has any bearing? Well no, but the fact that my deploy.ini contained the following: [app:main] use = egg:HelloWorld [server:main] use = egg:Paste#http host = 127.0.0.1 port = 8080 ..was the problem. Look's like Paste's httpserver doesn't handle this kind of post properly. Changing the deploy.ini to the following solved the problem: [app:main] use = egg:HelloWorld [server:main] use = egg:zope.server#main host = 127.0.0.1 port = 8080 cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] getting post data in a Zope 3 view [moreinfo: paster]
Alek Kowalczyk wrote: I would suggest checking if the Content-Length value has been properly set. Yep, httplib.HTTPConnection does this for you. I even checked that it works ;-) cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] building zope 3 instances?
Hi All, Am I right in thinking that this is now the canonical way to get a zope 3 instance: http://pypi.python.org/pypi/zc.zope3recipes ? If so, could the owners of these packages hide, remove or otherwise document that they're out of date: http://pypi.python.org/pypi/zc.recipe.zope3checkout/1.2 http://pypi.python.org/pypi/zc.recipe.zope3instance/1.0.0a1 http://pypi.python.org/pypi/gocept.zope3instance/2.0a2 cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] building zope 3 instances?
Philipp von Weitershausen wrote: http://pypi.python.org/pypi/zc.zope3recipes ? If you still want an instance, yes. I don't particularly like instances as we've had them with Zope 2 and Zope 3 (they don't quite work in a WSGI environment). So what do you do instead? How do people get a zope 3 project/application/whatever up and running? If so, could the owners of these packages hide, remove or otherwise document that they're out of date: http://pypi.python.org/pypi/zc.recipe.zope3checkout/1.2 http://pypi.python.org/pypi/zc.recipe.zope3instance/1.0.0a1 http://pypi.python.org/pypi/gocept.zope3instance/2.0a2 Please don't remove things! Never ever. People might still be using them. That is getting a bit old. The confusion from having this cruft lying around (in the same way as accidentally released packages) is causing a lot more hurt tham people who're already using this (and hence already have a local copy of the egg, which they can keep using should no egg be available on pypi) would experience if they went away. Yes, ideally there should be some way to hide them on pypi such that setuptools still finds them but that they don't strip up unsuspecting users. Does pypi support this? At the *very* least it's take about 2 minutes for a package manager to put a large DO NOT USE - THIS IS ONLY HERE TO SUPPORT EXISTING SETUPS at the top of the text on pypi to stop innocent bystanders getting caught out. cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] building zope 3 instances?
Sebastien Douche wrote: On Wed, Aug 20, 2008 at 00:11, Chris Withers [EMAIL PROTECTED] wrote: Please don't remove things! Never ever. People might still be using them. That is getting a bit old. The confusion from having this cruft lying around (in the same way as accidentally released packages) is causing a lot more hurt tham people who're already using this (and hence already have a local copy of the egg, which they can keep using should no egg be available on pypi) would experience if they went away. +1. Glad I'm not the only one. At the *very* least it's take about 2 minutes for a package manager to put a large DO NOT USE - THIS IS ONLY HERE TO SUPPORT EXISTING SETUPS at the top of the text on pypi to stop innocent bystanders getting caught out. Remove packages on Pypi only (and not on download.zope.org). The response here is find-links option, I think. Why not download.zope.org too? Certainly I wish download.zope.org/distribution would go away... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] building zope 3 instances?
Marius Gedminas wrote: At the *very* least it's take about 2 minutes for a package manager to put a large DO NOT USE - THIS IS ONLY HERE TO SUPPORT EXISTING SETUPS at the top of the text on pypi to stop innocent bystanders getting caught out. That's a very good idea. It should also point people to the current package that does the same thing. E.g. the description of zope.app.form currently says More advanced alternatives are implemented in zope.formlib and z3c.form. near the top. Great, if only I had the access, I'd do it where it was needed... Remove packages on Pypi only (and not on download.zope.org). You'll get shouted at if you remove something from PyPI. Trust me. Which is pathetic. I really don't get this. Yes, theoretically you could leave someone with an old package (well, d'uh, it's the last version of it they're ever going to get so what's the problem) or someone stranded on an newer-according-to-setuptools-but-never-actually-released version, in which case they should be using buildout's prefer-released thingy and pester Phil Eby to make setuptools less braindead here... The response here is find-links option, I think. I heard people complaining a lot about find-links in setup.py files. Hell yes, I didn't even know you could do that. Take 'em out and shoot 'em! find-links in your buildout.cfg might be OK. Indeed, this is where it should belong, or on the easy_install command line if you're not using buildout. cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] building zope 3 instances?
Paul Winkler wrote: That argument neglects to include people that don't cache eggs (for whatever reason) and people that need to build on a machine that may have never cached the egg in question (like deploying brand new servers). +99 Deleted releases can cause massive unintended pain downstream, regardless of how sensible it may seem at the time. Just Don't Do It Ever. I just don't buy this argument when the egg in question isn't intended for release and likely isn't even usuable. Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] [Zope-dev] Next Step to Bug Resolution???
Tim Cook wrote: As I said before I may have miss-diagnosed the problem and may fix may break other things? This is what a full-coverage unit and functional test suit is for. You have got automated tests for all this stuff, right? Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] [Zope-dev] Next Step to Bug Resolution???
Tim Cook wrote: Hi Chris, On Fri, 2008-12-19 at 10:06 +, Chris Withers wrote: Tim Cook wrote: As I said before I may have miss-diagnosed the problem and may fix may break other things? This is what a full-coverage unit and functional test suit is for. You have got automated tests for all this stuff, right? NO! I do not! I am a ZCA user not a full time python programmer. That is why I a asking for help here. Initially at least on the Zope Users list. Hang on, you're making out this project of yours is some big deal, and yet when questioned on whether you use sane development practises, you throw your hands up in the air... If anyone is developing any kind of serious project, even as a ZCA user, I'd expect them to have automated unit tests with execellent coverage. If you don't, then your project starts to look pretty weak. If you are expecting ZCA users to be full time Python gurus then why have two mailing lists? zope-dev is for the development *of* the zope libraries zope3-users is for people developing software *with* the zope libraries. cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] How do I get rid of a PAU with the API?
Douglas Cerna wrote: Try to remove the utility from the sm like this: del sm['authentication'] Eh? You shouldn't have do delete it just because you want to un-register it. I wonder why Sebastian's unregisterUtility didn't work? Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] [RFC] Merging zope3-users list with z...@zope.org list
Andreas Jung wrote: Thoughts? +1, they already end up in the same IMAP folder for me... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] ImportError: No module named viewlet.interfaces !!
Chetan Kumar wrote: bump!! This is not a bulletin board. Appending exclamation marks and making stupid posts like this will just get you ignored/blocked. I suggest you read the whole of this: http://www.catb.org/~esr/faqs/smart-questions.htm Specifically: http://www.catb.org/~esr/faqs/smart-questions.html#urgent cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] ImportError: No module named viewlet.interfaces !!
Chetan Kumar wrote: The reason was the absence of path to zope.viewlet egg from the sys.path. This slippage can surely be attributed to buildout. Also discovered that out of 170 eggs listed in buildout.cfg only about 60 appear in the scipts generated by buildout (paster, debug, ctl, python). Does it sound reasonable to say that buildout machinary may need attention? While we're at it: http://www.catb.org/~esr/faqs/smart-questions.html#id306810 Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users