Re: [Zope3-Users] building zope 3 instances?
On Tue, 2008-08-19 at 23:11 +0100, Chris Withers wrote: 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? *I* (as in gocept) am perfectly happy with the zope3recipes instances. -- Christian Theune · [EMAIL PROTECTED] gocept gmbh co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1 Zope and Plone consulting and development signature.asc Description: This is a digitally signed message part ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] buildout recipe for ReportLab
On Thu, 2008-07-10 at 21:21 +0200, Lorenzo Gil Sánchez wrote: Hi, I'd like to ask if anybody is using a buildout recipe to install ReportLab in the buildout. I only declare 'ReportLab' as a dependency. Whats the issue? Christian -- Christian Theune · [EMAIL PROTECTED] gocept gmbh co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1 Zope and Plone consulting and development signature.asc Description: This is a digitally signed message part ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Getting zope.publisher to log errors
Hi, On Tue, 2008-07-01 at 15:55 +1200, andrew wrote: Hi All, Is it possible to modify the default behaviour of zope.publisher somehow when handling exceptions ? For instance, I want to log all the details of the exception when one occurs instead of the very unhelpful little default message returned by the http.py:handleException. You might want to look into the error log (dunno where it's implemented) which causes errors that appear in the publisher to be logged (in the UI and the log). You should find the code how to instrument the publisher to do that there. Christian -- Christian Theune · [EMAIL PROTECTED] gocept gmbh co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1 Zope and Plone consulting and development signature.asc Description: This is a digitally signed message part ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] zope.i18n.locales and currency
On Fri, May 23, 2008 at 01:34:21PM +0200, Brian Sutherland wrote: On Fri, May 23, 2008 at 12:16:41PM +0200, Adam GROSZER wrote: Hello, Which is the sane to format currencies? locale.numbers.getFormatter('currency').format(value) Holds something like: ¤1,000,000.00 Should I simply replace ¤ with the currency sign or is there a better way? That's more or less what I've been doing. I looked extensively, but couldn't find a better way. (or even any documentation) What I understand is that ¤ is a symbol that would be replaced by the `correct` sign/character/string during translation for a given language and currency. I haven't seen it working myself though. Christian -- Christian Theune · [EMAIL PROTECTED] gocept gmbh co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] z3c.zalchemy - which version to use?
On Wed, May 07, 2008 at 03:41:11PM +0200, Hermann Himmelbauer wrote: Hi, I'd like to know if / which SVN version/branch of z3c.zalchemy works with a current SQLAlchemy distribution. If none does, what about z3c.sqlalchemy? In addition to what Andreas said: zalchemy is going to be abandoned. zope.sqlalchemy will be the common base implementation of transaction integration with SQLAlchemy. Other packages like z3c.sqlalchemy will implement higher level functions in addition to that. Christian -- gocept gmbh co. kg - forsterstrasse 29 - 06112 halle (saale) - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Buildout and custom python
Am Freitag, den 21.12.2007, 08:30 -0500 schrieb Benji York: Darryl Cousins wrote: I'm trying to created an isolated environment using buildout. I had understood that defining a custom build python would ensure that all eggs are installed and compiled with the custom python. An alternative to building Python with buildout is to build a single clean Python and use it for all their buildouts. Some advantages of this approach are that your buildouts take less time to build from scratch (no building Python every time), and are a bit smaller (by about 115MB on my system). I keep lots of buildouts around (a few dozen), so those advantages add up. Of course it also lets you stay away from the generally dirty system Python (just as the Python-per-buildout strategy does as well). And you can mix-and match: have buildout profiles that use your personal `good` Python for development and production profiles that build it themselves. OTOH this is somewhat controversial regarding test what you fly, fly what you test ... ;) Christian -- gocept gmbh co. kg - forsterstrasse 29 - 06112 halle (saale) - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Buildout and custom python
Am Freitag, den 21.12.2007, 09:15 -0500 schrieb Benji York: Christian Theune wrote: And you can mix-and match: have buildout profiles that use your personal `good` Python for development and production profiles that build it themselves. OTOH this is somewhat controversial regarding test what you fly, fly what you test ... ;) As long as you also run your tests in production, it seems fine to me. True. OTOH you really don't want your development environment to be far off your production environment. Joel (Spolsky) wrote a good article about leaking abstractions. It can be rather nasty to find a failing test when wanting to put something into production. (Of course this is way better than going in production and not seeing failing tests.) Christian -- gocept gmbh co. kg - forsterstrasse 29 - 06112 halle (saale) - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] z3c.formdemo fails upon ./bin/buildout
Am Mittwoch, den 12.09.2007, 17:27 -0300 schrieb Fernando Correa Neto: Hi srs I think there was a mistake in the last version of z3c.form demo. (trunk) After running ./bin/buildout, it fails due to a develop = . z3c.form in buildout.cfg. I think z3c.form was supposed to be pulled from svn with a svn:externals set to z3c.form in the z3c.formdemo directory. Checking out z3c.form inside z3c.formdemo seems to solve the problem. You can also solve the problem by removing z3c.form from the develop list, then the normally released egg will be downloaded. -- gocept gmbh co. kg - forsterstrasse 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Fundraising for ZEORaid 1.0, see zodb-dev
Hi, (sorry for the cross-post, please do not reply on this list, please use zodb-dev or mail me in private for discussions, I won't post for this issue on these lists again) gocept received interest in finishing the ZEORaid project and we're trying to do a fund-raising round. If you're interested in a FLOSS solution for ZEO failover and replication please have a look at: http://mail.zope.org/pipermail/zodb-dev/2007-September/011192.html Christian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
RE: [Zope3-Users] Darwin iCalserver a Zope3 application?
Am Montag, den 10.09.2007, 09:06 -0400 schrieb Doyon, Jean-Francois: The Zope 3 Interface package is required, not Zope 3 as a whole, or the Zope 3 server itself. I don't know that that necessarily merits mentionning in advocay though ... The actual dependency is twisted which in return uses (a rather old) zope.interface. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] zalchemy with sqlalchemy 0.4 support?
Hi, Am Samstag, den 08.09.2007, 20:46 +0200 schrieb Peter Piehler: Does anybody know if there is a zalchemy version, which supports sqlalchemy 0.4? There isn't, right now. 0.4 introduced some incompatibilities. At this time the following error occurs: Error: There is a version conflict. We already have: SQLAlchemy 0.4.0beta5 but z3c.zalchemy 0.2dev-r79489 requires 'SQLAlchemy=0.3.9,0.4dev'. But I need some features from sqlalchemy 0.4. Which features are those? We have some plans on making the two-phase commit available in the data manager when making compatibility with 0.4. Christian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Ahh, counters... Best practice?
Am Dienstag, den 14.08.2007, 17:21 -0400 schrieb Benji York: Jeff Shell wrote: We're working on something where we need to allow site visitors to rate items. It's the basic star-rating thing. We want to keep a count of the number of votes along with the current value. At work we've been contemplating an approach for use in some similar situations we want to address. In broad strokes: keep the updated value in memory, write the value to the database periodically (for whatever value of periodically is appropriate for the data). This should work well when the value changes often and loosing the most recent updates to the value isn't catastrophic. I've used a similar approach in Zope 2. The only problem is that if you use ZEO you end up with counters that always are slightly off. If your use case can cope with that, then it's fine. I've used a thread in each instance that flushed the value from memory to ensure that the flushing is done serialized and doesn't conflict with running application transactions. Christian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: Re[2]: [Zope3-Users] possible bug in zope\app\authentication\principalfolder.py
Hi, Am Donnerstag, den 09.08.2007, 14:32 +0530 schrieb Shailesh Kumar: Hi, Just another quick question on this. Is there any plan for new bug fix releases of 3.3 branch? or Will the next releases be on the 3.4 branch? Zope 3.4 will receive a release candidate soon, but we need to do some more bugfixing. (If anybody is interested, help on fixing open bugs is always appreciated.) Zope 3.3 is currently maintained and will receive bugfix releases as necessary. The 3.3 branch might already incorporate fixes that haven't been released yet. In general, branches are maintained as long as their are people contributing fixes, the minimum amount of versions we support is two (currently Zope 3.3 and Zope 3.2). Christian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problems importing zalchemy
Hey, Am Freitag, den 27.07.2007, 11:18 +1000 schrieb Catriona Johnson: Hello I am a novice zope 3 user and would appreciate any help on this. I am trying to follow a few examples using zalchemy but am unable to progress beyond importing zalchemy. My python script so far contains import sqlalchemy import z3c.zalchemy and I get the following error when trying to import zalchemy AttributeError: __path__ Traceback (innermost last): File C:\Projects\TestZalchemyOracleConnection.py, line 1, in ? File C:\Projects\TestZalchemyOracleConnection.py, line 3, in ? import z3c.zalchemy File C:\Python24\Lib\site-packages\z3c.zalchemy-0.2-py2.4.egg\z3c\zalchemy\__init__.py, line 15, in ? from datamanager import ( File C:\Python24\Lib\site-packages\z3c.zalchemy-0.2-py2.4.egg\z3c\zalchemy\datamanager.py, line 20, in ? from zope.component import queryUtility, getUtility, getUtilitiesFor File C:\Python24\Lib\site-packages\zope\component\__init__.py, line 24, in ? from zope.component.interfaces import IComponentArchitecture File C:\Python24\Lib\site-packages\zope\deferredimport\deferredmodule.py, line 71, in __getattr__ raise AttributeError, name I am running this in the Wing IDE on Windows XP with Python 2.4, Zope 3.3, SQLalchemy 0.3.8 and zalchemy 0.2 Zope 3.3 might be too old in the sense that zalchemy probably depends on some other packages (via egg dependencies) that are not satisfied in Zope 3.3 yet. I can't directly make sense out of the error message though. How did you install this version of zalchemy? Christian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Strange ZODB error
Am Donnerstag, den 09.08.2007, 09:52 -0400 schrieb Gary Poster: You probably need to find out what the object is for anyone to have a chance of helping. I usually just put a pdb in the ZODB that is triggered if there's an error here, and then start poking around. Using the postmortem debug publisher might work too, but it has caused enough problems for me in the past that I dropped it, myself. One way to do this is to use the http postmortem debugger server, especially helpful if you try to debug problems in code that is triggered many times in an app, but you only want to see the pdb when an error happens. Christian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] z3c.zalchemy / z3c.sqlalchemy
Am Dienstag, den 17.07.2007, 14:52 +0200 schrieb Andreas Jung: --On 17. Juli 2007 14:43:27 +0200 Thierry Florac [EMAIL PROTECTED] wrote: Hi, I'm looking for packages to ease integration of SQLAlchemy and Zope3. I found the two references listed into this message's subject and was wondering if there was any link between then, if both of them are up-to-date and actively maintained, and what where the benefits of using any or both of them... z3c.sqlalchemy (written by myself) is actively maintained in will be used in several upcoming projects. The goals and usecases covered by z3c.sqlalchemy are documented on the cheeseshop project page. z3c.zalchemy isn't actively maintained as far from what I heard some weeks ago. z3c.zalchemy tries to approach problems I did not have or I did not understand. It's a bit more Zope 3 oriented while z3c.sqlalchemy works fine on Zope 2 and Zope 3. To add another choice: collective.lead by Martin Aspeli. I'm using z3c.zalchemy and am happy to fix bugs, so you could call it maintained by me. I'm not a consumer of the very Zope 3 (read: content) -oriented approaches, but I am working on some reasonable integration issues to make the use as transparent as possible in Zope 3. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Zope 3.4.0b1 released
July 5, 2007 - The Zope 3 development team announces the Zope 3.4.0b1 release This release is the first beta release for Zope 3.4.0. It was preceeded by an alpha release in April. Since the beta we finished repackaging of eggs, added three new features and fixed more than 12 bugs, please see the change log for details. Zope 3.4 introduces support for binary large objects in the ZODB, provides a new postprocessing hook for publishing results and makes all Zope packages available as Python eggs. Development release and feedback This is a development release with beta quality. It is intended for developers to check their applications for compatibility with the new features. This release *is not intended to be used in production environments*. We would love to hear about any bugs you encounter. Please use our bug tracker, the mailing lists, and the IRC channel to contact us in case you encounter any problems. This beta release will be succeeded by a release candidate which is expected to be available by August 5, 2007. For status updates on our roadmap check: https://launchpad.net/zope3/3.4/+milestones What is Zope 3? --- Zope 3 is a web application server that continues to build on the heritage of Zope. It was rewritten from scratch based on the latest software design patterns and the experiences of Zope 2. The component architecture is the very core of Zope 3 that allows developers to create flexible and powerful web applications. Compatibility with Zope 2 -- We continue to work on the transition from Zope 2 to Zope 3 by making Zope 2 use more and more of the Zope 3 packages. But we're not there yet. **You can't run Zope 2 applications in Zope 3.** Downloads - Zope 3 can be downloaded from: http://zope.org/Products/Zope3 Installation instructions for both Windows and Un*x/Linux are now available in the top level README.txt file of the distribution. The binary installer is recommended for Windows. Zope 3.4 requires Python 2.4.3 to run. You must also have zlib installed on your system. Resources - - Zope 3 Development Web Site: http://wiki.zope.org/zope3 - Zope 3 Developers Mailing List: http://mail.zope.org/mailman/listinfo/zope3-dev - Zope 3 Users Mailing List: http://mail.zope.org/mailman/listinfo/zope3-users - Bug tracker at launchpad: https://launchpad.net/zope3 - IRC Channel: #zope3-dev at irc.freenode.net Acknowledgments --- Much thanks to everyone who contributed to this release: Jim Fulton, Dmitry Vasiliev, Martijn Faassen, Christian Theune, Wolfgang Schnerring, Fred Drake, Marius Gedminas, Baiju M, Brian Sutherland, Gary Poster ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-dev] Re: [Zope3-Users] z3c.form 1.0.0 released!
Am Mittwoch, den 30.05.2007, 18:12 +0200 schrieb Maciej Wisniowski: Thanks. BTW, I am still looking for 1-2 demos to write but I am out of ideas. Do have anything related to forms that you would like to see demoed? It would be very interesting to see RDBMS interaction. Formlib for example is not trivial to use with RDBMS especially because of a lack of documentation and because everything seems to be written with ZODB objects in mind. It works together with a mapper like SQLAlchemy (and z3c.zalchemy). IMHO, it is not formlib's task to do mappings like that. Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] getting random results out of a catalogs field index
Hey, Am Samstag, den 05.05.2007, 19:27 +0200 schrieb Dominique Lederer: hi, thanks for the reply, i just managed to improve the performance of my query significantly: what i wanted to do was: - retrieve the len() of the catalog index - retrieve a list() of the Resultset - accessing n random results and their objects to retrieve a random object i did: query = catalog.apply({'myIndex':(None,None)}) length = len(query) index_intids = list(query) intid = all[random.randint(0,len_all-1)] object = getObject(intid) which was with 1 items in the index slow (i had to wait 2-3 seconds for a view to render) after looking into the field index implementation i changed the above lines to: length = len(catalog['myIndex']._rev_index) index_intids = list(catalog['myIndex']._rev_index.keys()) which now works like a charm. Hmm. But it's at least not memory efficient and it has to load the whole reverse index, at least the keys. Given those are integers 10k elements are probably not that much of a problem. However, you're probably screwing up your LRU caches as a 10k BTree needs to load quite a few nodes and buckets. i am not an expert with BTrees so i cant really say what the problem is/was. Well, essentially you have cut out the searching. Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] getting random results out of a catalogs field index
Am Samstag, den 05.05.2007, 17:42 +0200 schrieb Dominique Lederer: hi i would like to retrieve a number of *random* entries out of a catalogs field index. i tried it with first getting the catalogindex-length an then accessing a randomized list-index, but this is very slow, because of the large number of entries in the index. do you know any better solution? I'm kind of guessing here. You say you are: - querying the catalog - accessing a random index from the result set - noticing that this is slow Does this only happen if the index is very large, e.g. you're retrieving an element from the end of the result set? I don't know exactly how the result sets are organized, but this behaviour would imply that loading a later element triggers something like loading the earlier elements too. I can't really imagine that. I think the general problem that this is slow lies in the fact that randomly selecting elements means a) you need access to the full list of things b) applying a sort Sorting has a complexity of at least O(n log n) which becomes slow enough for large sets that it's noticable. BTW: How large is large? Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Zope 3.4.0a1 released
Am Donnerstag, den 19.04.2007, 19:51 -0400 schrieb Robert Hicks: Martin Aspeli wrote: Robert Hicks wrote: Is this series targeting Python 2.5? No. Martin Thanks, I was just checking and didn't see anything either way. The release announcement refers to Python 2.4, however, I realised that putting the requirements listing in the download section is less than optimal for people scanning the document. Sorry. I'll update the release notes template. Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Zope 3.4.0a1 released
19 April 2007 - The Zope 3 development team announces the Zope 3.4.0a1 release This release introduces support for binary large objects in the ZODB, provides a new postprocessing hook for publishing results and makes all Zope packages available as Python eggs. Development release and feedback This is a development release with alpha quality. It is intended for developers to check their applications for compatibility with the new features. This release *is not intended to be used in production environments*. We'd love to hear about any bugs you encounter. Please use our bug tracker, the mailing lists, and the IRC channel to contact us in case you encounter any problems. This alpha release will be succeeded by a beta which is expected to be available by 3rd May 2007. For status updates on our roadmap check: https://launchpad.net/zope3/3.4/+milestones What is Zope 3? --- Zope 3 is a web application server that continues to build on the heritage of Zope. It was rewritten from scratch based on the latest software design patterns and the experiences of Zope 2. The component architecture is the very core of Zope 3 that allows developers to create flexible and powerful web applications. Compatibility with Zope 2 -- We continue to work on the transition from Zope 2 to Zope 3 by making Zope 2 use more and more of the Zope 3 packages. But we're not there yet. **You can't run Zope 2 applications in Zope 3.** New features and important changes -- - Updated the shipped ZODB to version 3.8 and introduced optimized handling for large files in conjunction with ZODB Blob support. Most Blob operations can be handled with O(1) effort now providing a scalable approach to handling large files. - Introduced IResult hook for postprocessing of publishing results. This replaces a similar private IResult hook from previous releases. It is a hook point into which a variety of interesting policies, including in-Zope pipelining, can be placed. See zope/publisher/httpresults.txt for more details, which itself points to the full details for IResult and IHTTPResponse.setResult in zope/publisher/interfaces/http.py. - zope.app.testing.functional.ZCMLLayer supports in-process tearDown. For backwards compatibility, this feature is disabled by default. You can enable it by passing ``allow_teardown=True`` to ``ZCMLLayer()`` or to ``defineLayer()``. - Removed unused and untested SFTP code from zope.app.twisted along with all the SSH keys. Removed all the SSL keys also. - Added new Decimal field type to zope.schema (and DecimalWidget in zope.app.form) and added security declarations for decimal.Decimal objects - Added new Time field type to zope.schema - Change the publication object to abort the current transaction if the transaction was doomed. Related to: http://www.zope.org/Collectors/Zope3-dev/655. There were many more features, restructurings and bugs fixed. Please consult the file `doc/CHANGES.txt` in the release for more information. Downloads - Zope 3 can be downloaded from: http://zope.org/Products/Zope3 Installation instructions for both Windows and Un*x/Linux are now available in the top level README.txt file of the distribution. The binary installer is recommended for Windows. Zope 3.4 requires Python 2.4.3 to run. You must also have zlib installed on your system. Resources - - Zope 3 Development Web Site: http://wiki.zope.org/zope3 - Zope 3 Developers Mailing List: http://mail.zope.org/mailman/listinfo/zope3-dev - Zope 3 Users Mailing List: http://mail.zope.org/mailman/listinfo/zope3-users - Bug tracker at launchpad: https://launchpad.net/zope3 - IRC Channel: #zope3-dev at irc.freenode.net Acknowledgments --- Much thanks to everyone who contributed to this release: Jim Fulton, Dmitry Vasiliev, Martijn Faassen, Christian Theune, Wolfgang Schnerring, Fred Drake, Marius Gedminas, Baiju M, Brian Sutherland, Gary Poster signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] vary formlib render_submit_button by skin
Am Mittwoch, den 18.04.2007, 17:09 -0400 schrieb Fred Drake: On 4/18/07, Leonardo Rochael [EMAIL PROTECTED] wrote: I was looking at formlib and I found that If i want to customize widgets per skin, I just have to register their view to a different type, e.g.: As you can for all views. However I found no such way of customizing the render_submit_button adapter per-skin. All examples I found of the action renderer declarations are like ... Is there any way of specializing the action rendering per-skin? I expect there to be one since it's html generation, which should be skinnable. It should be, but isn't. :-( I've run up against this as well, and working around it is more painful than it should be. Do you consider it a bug? Is it tracked somewhere already? Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Can interfaces be mutated cleanly?
Hi, Am Freitag, den 13.04.2007, 08:36 +0200 schrieb Hermann Himmelbauer: Am Donnerstag, 12. April 2007 17:22 schrieb Christian Theune: Hi, I didn't find anything in the documentation or google on this: I want to define an interface like: class IMySchema(zope.interface.Interface): pass Later, I want to use ore.alchemist which currently is able to take a SQLAlchemy table description and turn it into a new interface/schema. Interesting - is ore.alchemist the package developed by Kapil Thangalevu? If yes, is it working? I had the impression that the project is abandoned. I currently use z3c.zalchemy, which has, however no automatic generation of interfaces. I use z3c.zalchemy for the transaction integration and only the mapping code from alchemist. This is accidental as I started out with z3c.zalchemy and only needed the additional mapping. The code is reasonably split up into modules that allows only using the mapping code and nothing else. I want to extend this code so that I can pass it an existing interface to modify it (update) with the schema definition. I need this so that the interface is: a) present in the code when reading it b) available for ZCML configuration (it's a problem for us right now because the database/SQLAlchemy stuff is setup up a little bit later after executing a couple of ZCML actions) This is a concept I was also thinking about but I'm unsure if it would really lead to architectural advantages: The DDL statements specify several constraints for the mapped object, such as: - Data Type - Maximum string length - Enumerations (check in) - not null/with default So it looks at first appealing to directly adopt them in the object's interface. However, there may be two caveeats: 1) Often, the interface definitions are stricter than the DDL-statements. For instance, the database could define a varchar(40), while in the interface, I'd rather limit the schema (and therefore an input field) to a length of 20. Or maybe I'd like to use a more specific datatype which can not be automatically deduced from the DDL-statements 2) All ends up with constraints in different locations - some are in the DDL statements, others are in the interfaces. So maybe this also leads to redundancy and complexity. Moreover, what happens if the DDL and interfaces are not being maintained by the same developer group? What if the database guys choose to extend some varchar from 40 to 400, a change which possibly propagates to the page layout? (longer input widget). Therefore maybe it's cleaner to define everything in the interface of the mapped object, regardless if this information is redundant. And then I'm thinking about some check function that tests if the DDL-statements and the interface definitions are conflicting or not - much like with interfaces, which only have contracts with objects (via implements()) and provide utilities such as verifyObject to check if they comply. My motivation is to support agile development sufficiently to start out with an existing database (that the customer already has) and gradually move to manually defined schemata in the interface. Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Zope3-users mailing list [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Can interfaces be mutated cleanly?
Hi, I didn't find anything in the documentation or google on this: I want to define an interface like: class IMySchema(zope.interface.Interface): pass Later, I want to use ore.alchemist which currently is able to take a SQLAlchemy table description and turn it into a new interface/schema. I want to extend this code so that I can pass it an existing interface to modify it (update) with the schema definition. I need this so that the interface is: a) present in the code when reading it b) available for ZCML configuration (it's a problem for us right now because the database/SQLAlchemy stuff is setup up a little bit later after executing a couple of ZCML actions) While looking into it, we found that interfaces do not offer a public way to modify the attributes they have, and modifying the internal data structures would be both evil and cumbersome. Any hints? Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Zope3-users mailing list [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Default value for an interface attribute
Hi, Am Donnerstag, den 01.03.2007, 16:54 +0100 schrieb Maciej Wisniowski: How about checking whether the value of 'default' is a callable and if so call it to obtain the default value. Yup... but evaluation of this is done internally by Zope schema package in Field class I think. Seems for me that there is no way to define 'default' as callable. Right. This is an unsupported use case. I bet if someone writes up a proposal and brings it up to discussion on zope3-dev@zope.org we'll find a common solution to this. Please also notice that we're moving to using launchpad more heavily. So if you write a proposal in the wiki, please also submit it as a feature request (blue print) in launchpad for the Zope 3 product. Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Get a site
Hi, Am Sonntag, den 21.01.2007, 14:44 +0100 schrieb Florian Lindner: Hello, I am in a function that has no context and want to set a site. The function is called periodically from a scheduler: from scheduler import loop def onStartup(event): refresher = loop.LoopTask(releaseRefreshEvent, interval=60) In this function I need to call getUtilitiesFor which needs a site set but I don't know how to get a site: (Pdb) from zope.app.component import hooks (Pdb) from zope.app.zapi import * (Pdb) hooks.setSite(getSiteManager()) *** AttributeError: 'BaseGlobalComponents' object has no attribute 'getSiteManager' (Pdb) hooks.setSite(getGlobalSiteManager()) *** AttributeError: 'BaseGlobalComponents' object has no attribute 'getSiteManager' You don't set the site managers as a site, but the objects that are sites have site managers (or component registries) attached to them. Also, the global registry is always active, without settinga site. Just getting the root object (which AFAIK always is a site) would be ok. Or the object of static path. You'd have to open a connection to the database, get the root object and use that with setSite(). I don't have the complete spelling for that in my head though. If this is code that runs within Zope 3, then you might not want to talk to the database directly anyway because of the automatic transaction management. Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Checkout
Am Freitag, den 19.01.2007, 09:55 +0100 schrieb David Johnson: Has anyone implemented a check out procedure? Any thoughts? It is a bit different than standard Zope components because it often has steps, goes forward and back, and numerous other reasons. I don't understand your question, can you rephrase it a bit? Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Checkout
Hi, Am Freitag, den 19.01.2007, 16:20 +0100 schrieb David Johnson: Yes. Excuse my lack of explanation. When developing an eCommerce site, a customer will in the end need to check out. They will have a shopping cart (which can be handled through sessions and a SQL database), and then they will need to select a form of payment, a delivery address, and complete their purchase. It's been my experience this is one the most difficult parts of an eCommerce application. I realize in retrospect that checkout may imply something about source control. It did for me. :) The confusion is gone now. Although I can't help you directly, you've got a better chance for an answer by somebody who knows now. ;) Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Content cloning ?
Hi, Am Montag, den 15.01.2007, 16:06 +0100 schrieb Thierry Florac: Hi, In an application I'm currently building with Zope3, I need to be able to clone several kinds of content data. While cloning a simple content class is quite simple, I don't know exactly how to clone data provided through adapters, which may store these data throught annotations. What I was thinking about was something like : - create a new interface IClonable, with a single clone method - make my specific content interfaces, eventually provided throught adapters, extend IClonable - get a list of interfaces provided by my content class, directly or throught adapters, which extend IClonable, and call their clone method when cloning is required. So, actually, my main problem is : - how can I get the list of interfaces provided by a given class, directly of throught adapters ? - is this conception method the best one in Python/Zope3 to clone data ?? Thanks for any help or advise... You might want to checkout zc.copy. Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Periodically refresh RSS feeds
Hi, Florian Lindner wrote: That's something I had mentioned in my posting too. It has advantage that the feeds could decide if they want to be called or not, whereas by the utility-way they would always be called. Considering your hesitation towards the component architecture, here's some more input: Nowadays, registering a (persistent) object as a utility expresses basically the same functionality. If it wants to be called, you can register it as a utility for an interface (and maybe a name), if you don't want to, you don't (or you unregister it). What you automatically get is: - you don't have to write your own registry code (again), - the CA is optimized to do this kind of lookups The distinction between software and content space was pretty much removed now. Even content objects are software, or not? Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: OpenPGP digital signature ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Grant problem
Hi, Jonas Jarutis wrote: Hello, I get this error the i try to enter grant screen from ZMI: Does anyone know what is the problem? Traceback (most recent call last): [...] Module zope.app.form.browser.source, line 163, in _value if token is not None:UnboundLocalError: local variable 'token' referenced before assignment Is this a standard instance? For one I consider it a bug in zope.app.form.browser.source in line 163, but that only affects the reporting. Your personal issue is something more complex. It looks a bit like some registrations aren't set up in your server. I'm guessing: either you're not loading some ZCML that is there by default, or your PAU is somewhat confused. Can you try with the same Zope software to create a new Zope instance and check whether you can enter the grant screen there? If you can, please try to find out the differences between this instance and the one that fails. Oh, and which Zope version is this? Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: OpenPGP digital signature ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] readline() takes exactly 1 argument
Hi, George Wright wrote: Trying to get started on Zope3 but frustrated by a couple of barriers: Barrier 1. Added a folder. Added a ZPT Page (As in Zope3 Developer's Book page 12). Then get system error message: Traceback (most recent call last): Module zope.publisher.publish, line 126, in publish request.processInputs() Module zope.publisher.browser, line 263, in processInputs fs = FieldStorage(fp=fp, environ=self._environ, keep_blank_values=1) Module cgi, line 530, in __init__ self.read_multi(environ, keep_blank_values, strict_parsing) Module cgi, line 650, in read_multi environ, keep_blank_values, strict_parsing) Module cgi, line 532, in __init__ self.read_single() Module cgi, line 665, in read_single self.read_lines() Module cgi, line 687, in read_lines self.read_lines_to_outerboundary() Module cgi, line 715, in read_lines_to_outerboundary line = self.fp.readline(116) TypeError: readline() takes exactly 1 argument (2 given) This looks like a known incompatibility with Python 2.4.4. (If you're interested in the details, see http://www.zope.org/Collectors/Zope3-dev/535) I did a search of archives and found references to a patch of http.py and tales of success in solving the same problem: Yes. Apply this patch to the zope3-sources: /http.py --- src/zope/publisher/http.py.old 2006-10-04 15:11:04.0 +0200 +++ src/zope/publisher/http.py 2006-10-04 15:11:04.0 +0200 @@ -205,7 +205,7 @@ return data def readline(self,size=None): -data = self.stream.readline(size) +data = self.stream.readline() self.cacheStream.write(data) return data This is a standard patch format and there is a utility that can apply this patch for you automatically. The patch is made for a checkout and maybe also works on the source distribution for Zope 3.3 You should be able to store that patch in a file, e.g. called 'patchname.patch' and then run 'patch -p0 patchname.patch' in your terminal. (I guess MacOS X comes with patch by default.) Watch out for messages saying Hunk X out of X FAILED though. Then reinstall your Zope server using make install, that should get your installation directory updated with the right file. BUT I'm not sure what to do with it! What do the little - and + in front of the data = lines mean? And the @@ -205,7 +205,7 @@ ? Just which http.py is to be patched? ~/Zope-3.3.0/build/lib.macosx-10.3-fat-2.4/zope/publisher/http.py OR ~/Zope-3.3.0/build/lib.darwin-8.8.0-Power_Macintosh-2.4/zope/ publisher/http.py OR ? This looks like you did 'make' in your Zope-3.3.0 directory multiple times on different versions of your operating system. Or this is an idiom specific to Python on Mac OS X. Maybe this problem has been fixed in a later version? It's not yet fixed finally, but if you watch the bug that I posted above, you should be able to The bugfix release should be available in early Januar 07. Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: OpenPGP digital signature ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: zope 3.3 on windows can't create pages
Hi, Robert Hicks wrote: Any ideas when a 2.4.4 version will be out? That will be Zope 3.3.1 and that should happen until early January 07. Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: OpenPGP digital signature ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Periodically refresh RSS feeds
Hi, Florian Lindner wrote: Hello, I have the following situation: An object represents an RSS feed. It should be updated like every 20 minutes. If there is something new a Jabber message should be send out. Currently I have it implemented with an scheduler loop that emits an refreshRSSFeed event evey 20 minutes. My problem is that a handler for an event must be a static function, but I want a handler function to be called as a member of every instantiated RSS feed object. Another idea I have: Implement an utility where the RSS feeds could register a function that is called every 20 minutes. Another way would be that this utility takes an URL and monitors the URL for changes and only notifies the RSS Feed object in case of a change. How would you do that? So there's two problems here: scheduling and notifying persistent objects about an event. I don't have a good idea about the scheduling right now, except the hint that using a 'zopectl run' script might be worthwhile. I'm not sure what a 'scheduler function is'. About notifying persistent objects: There is a method 'getAllUtilitiesRegisteredFor(interface)' which might help you. Have a look at zope/app/catalog/catalog.py beginning from line 150 (indexDocSubscriber) how the catalog handles events and dispatches them to multiple catalogs. I think this pretty much matches your use case if you make each RSS feed a (named) utility. Of course you could also have a utility that maintains references to all RSS feed objects and simply loops over them and calls a method for refreshing. Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: OpenPGP digital signature ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users