Re: [Zope-dev] GitHub and Travis CI
Le 04/03/13 20:00, Stephan Richter a écrit : Hi everyone, I have invested some time today to implement the Travis CI hook setup for GitHub. I can now turn on and update Travis CI for any package. See the ``README.rst`` file. I did the same in z3c.taskqueue and five.taskqueue that Stephan very nicely migrated for me. Thanks to you, Stephan ! -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Zope Foundation patch policy
Le 09/10/12 09:39, Jens Vagelpohl a écrit : Hi all, During the discussion about new ways to host and manage code in Zope Foundation repositories one omission we had never really addressed became clear: What is the status of patches reaching us by people who have not signed the contributor agreement, e.g. code uploaded to issue trackers, or code checked into Zope Foundation repositories by people other than the original authors? We need to have guidelines that ensure that we don't end up with code exclusively owned by third parties where no ownership assignment has taken place in our repositories. Fortunately the Plone Foundation has considered this exact issue before us and we took their well-written patch policy[1] and adapted it for our own use. Thanks to the Plone Foundation board and all those who drafted their policy. The Zope Foundation board has voted on adopting the following text as the official Zope Foundation patch policy, binding for all Zope Foundation contributors (PDF alert): http://foundation.zope.org/agreements/ZopeFoundation_Patch_Policy.pdf Jens Vagelpohl Thanks a lot to the board of having taken time and energy to fix this omission. Regards -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] response.status is not set properly when Zope2 publication failure events are notified
Hi, Short story : response.status is not set when PubBeforeAbort and PubFailure events are notified. Any code in the event handlers trying to use response.status always gets 200 even though an exception has happened. Longer story : publish function in ZPublisher.Publish.py is notifiying all publication events ZPublisher.interfaces.IPubEvent. It is called by publish_module_standard function which is in charge of transforming exceptions into HTTP status by calling response.exception(). However, this happens after the publishing events have been notified. IOW, when failure events (PubBeforeAbort and PubFailure) are notified, request.status is still 200 :-( Proposal attempt: First, a disclaimer : there are so many nested try except, try finally in publish and publish_module_standard functions that I am sure I do not fully understand the code. However, I'll state my thoughts as a starting point. I have the feeling that moving the call to response.exception() into the publish function before the events are notified would break a lot of code. Maybe we could just move the setStatus() call made in response.exception(). We might move the notification of PubFailure to response.exception(). However, its semantics would then change slightly and it is not obvious which exc_info would then be passed to the event. I'd appreciate feedback on this issue. -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] More information in case of ZCML conflict errors
Le 02/08/11 15:29, Sylvain Viollon a écrit : Hello, I spend a long time trying to understand why I could not override a component in ZCML and debug the error. First, includeOverrides doesn't include any overriding registration. At least not like you would expect. At best It can be used to include a package in the site.zcml that would conflict with an another, replacing the conflicting actions by his own. After I would love, when there is a conflict error in ZCML to have a bit more of information other than what we currently have: like which file include which file and so up to the conflicting actions. As I pdb through this conflict, I see that all this information is already there, it is just not included in the exception nor displayed to the user. This information can be found in zope.configuration.config line 1517, in the variable includepath and basepath. This just need to be added to the exception. Since I work with Zope and ZCML, having those informations to debug conflict errors would have saved me days of works, at least. My issue was that an another package was already including the package that contained actions I wanted to override, so even if I wanted to include it myself in order to override its actions, it would not be included since it already have been included. Finally, I think a bit of documentation on ZCML conflict errors would help a lot everybody. Regards, Sylvain, I bumped recently on the exact same issue. I totally agree with your statements. I think it is really worth changing the message issued by the configuration conflict errors. I hope I will be able to work on this in the coming weeks. Sylvain, I'll let you know. -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] beta.zope.org (www.zope.org relaunch project)
Le 10/05/11 10:47, Hanno Schlichting a écrit : On Tue, May 10, 2011 at 6:55 AM, Andreas Jungli...@zopyx.com wrote: I am happy to announce that we have made progress with the zope.org relaunch project. The first public version of the new site is now available under http://beta.zope.org Constructive criticism and feedback is welcome _now_. Thanks all of you for the great work. It is much appreciated! Hanno I want to support that statement ! :-) Great work ! -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Zope test layers, pytest, and test isolation
Hi Uli, I am happy that some people started to look what is needed to make modular component registrations with py.test. The long explanation that you wrote made it easy for me to jump into funcargs. Those last months, I have been diving into the great plone.testing package written by Martin Aspeli. Among others, plone.testing has a very nice module zca.py to ease building zope.testing layers that need ZCA. See https://dev.plone.org/plone/browser/plone.testing/trunk/src/plone/testing/zca.py Specifically, pushGlobalRegistry and popGlobalRegistry are a pair of functions that allow to make registrations step by step, while easily throwing away the latest registrations when they are not needed anymore. plone.testing does not depend on Zope2 even if it comes with support for building Zope2 layers. Le 24/03/11 01:05, Uli Fouquet a écrit : Compared to Zope test layers I came to the conclusion that there is not much like this concept already in `pytest` and the behaviour of test layers can not easily be faked. `pytest` provides only the three mentioned scopes as kind of 'natural' layers. Spreading fixtures over many modules (as layers easily do) might contradict with the basic design goals of pytest and I am pretty sure that Holge Krekel wouldn't like it. I do not agree with that last statement : the fact that resources can be cached during a session allows them to be reused over many modules. IOW, it does not contradict pytest design. Digging into funcargs gives me the feeling that they are much richer than layers. Because funcargs are functions that get access to a lot of context, they allow for more flexibility than layers that are only static resources. Overall, we're now looking for a satisfying solution in terms of runtime and isolation. Some of the questions that arise: My feeling is that the extrakey argument of cached_setup can be used in combination with code similar to plone.testing ZCA support to build something satisfying in terms of runtime and isolation. Would it make sense to bring the Zope layer concept into `pytest`? I think what is already available in py.test might avoid the need of layers. Are there already possibilities to mimic testlayer-like behaviour in `pytest` which we simply overlooked? See above. Are there cheap/fast ways to cache/restore registry setups we hadn't had on the screen? Really fast setups/cache-restores could make even function-wise registrations a considerable thing. Would it simply be okay to use the 'module' scope for registration setups? Or do you have completely different ideas how to solve that issue? Any comments are really appreciated! Best regards, -- Uli -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] string exceptions
Hi, I find a few string exceptions leftover in Zope 2.13 code. However, they are not allowed anymore in Python 2.6. I guess that the remaining string exceptions are in dead/semidead code. What practice has been followed until now regarding fixing those exceptions ? Regards -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] string exceptions
Le 25/02/11 12:03, Laurence Rowe a écrit : On 25 February 2011 10:58, Godefroid Chapellegot...@bubblenet.be wrote: Hi, I find a few string exceptions leftover in Zope 2.13 code. However, they are not allowed anymore in Python 2.6. I guess that the remaining string exceptions are in dead/semidead code. What practice has been followed until now regarding fixing those exceptions ? According to this doc, http://docs.python.org/c-api/exceptions.html#deprecation-of-string-exceptions String exceptions are still supported in the interpreter to allow existing code to run unmodified, but this will also change in a future release. It will of course be important to fix these before we move to Python 3.x, but I would expect that the dead/semidead code will not be ported. Laurence I just tried to run the code hereunder with Python 2.6.5: def main(): raise Abc main() This is what I get : Traceback (most recent call last): File test.py, line 4, in module main() File test.py, line 2, in main raise Abc TypeError: exceptions must be old-style classes or derived from BaseException, not str I am not sure what the documentation above means but it seems to be text that was not fixed... -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] string exceptions
Le 25/02/11 12:03, Hanno Schlichting a écrit : I find a few string exceptions leftover in Zope 2.13 code. What practice has been followed until now regarding fixing those exceptions ? Just upgrade them to new-style exception classes. Since string exceptions cannot possibly work anymore, we cannot make things worse by fixing them. Hanno What about deciding to kill that code ? I guess it is a bit early because not enough people did migrate to 2.12 or later. Where should those fixes happen ? 2.13 branch and trunk I suppose -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] ConnectionStateError
Hello, We have been experiencing some ConnectionStateError in a Zope 2 based application. Looking for info on the web makes me almost 100% sure that we have a bug in our application layer. I understand that I should look for persistent objects stored in module or class level variables (which imply shared by threads and thus connections). Do not hesitate to tell me if this is a wrong explanation of the potential cause of ConnectionStateError. However, I wonder if some of you could give debugging techniques outside reviewing the code. I also wonder what was the reason to deprecate ``zope.thread``. I see it was used by ``zope.component`` to hold thread-safe siteinfo. Could a too frequent usage of getSite lead to ConnectionStateError ? I think that it is not the case but I prefer to ask. Thanks -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ConnectionStateError
Le 12/01/11 17:06, Hanno Schlichting a écrit : On Wed, Jan 12, 2011 at 2:34 PM, Godefroid Chapellegot...@bubblenet.be wrote: I understand that I should look for persistent objects stored in module or class level variables (which imply shared by threads and thus connections). Do not hesitate to tell me if this is a wrong explanation of the potential cause of ConnectionStateError. However, I wonder if some of you could give debugging techniques outside reviewing the code. Thanks for help from anyone. Once debugged, I'll blog how I found the bug. Do you get the classic: Shouldn't load state for %s when the connection is closed or one of the The database connection is closed errors? In the first case you get the p_oid, which you can load from the database to give you some clue on what class it is. I had no clue that the number in the error message was the p_oid. I could have found out by reading the code. Nevertheless, I propose to make the error message more self-explanatory. Typical problems include using plone.memoize decorators on things without knowing where exactly the cache is stored or as someone else noted registering persistent objects in the global site manager instead of the local one. The global one is of course just a module global data structure in the end. Hanno -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.schema validation can create read/write conflicts
Le 24/12/10 13:03, Souheil CHELFOUH a écrit : Done and commited. Thanks ! If anyone can and want to release, it's ready. 3.7.1 released. -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] z3c.table and z3c.batching PYPI access
Hi, jfroche and I will need to make releases of z3c.table and z3c.batching. Can someone grant me access on PYPI ? Thanks userid: gotcha -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] New release of z3c.form
Hi z3c.form fathers ;-) jfroche and I added a widget manager that enables mixing content providers inbetween widgets when rendering forms. We merged our branch to trunk : http://permalink.gmane.org/gmane.comp.web.zope.all-cvs/43663 We would like a new release of z3c.form. Can you give us access rights to PyPI ? Or can you make the release ? Regards, -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] New release of z3c.form
Le 01/07/10 14:16, Godefroid Chapelle a écrit : Hi z3c.form fathers ;-) jfroche and I added a widget manager that enables mixing content providers inbetween widgets when rendering forms. We merged our branch to trunk : http://permalink.gmane.org/gmane.comp.web.zope.all-cvs/43663 We would like a new release of z3c.form. Can you give us access rights to PyPI ? Or can you make the release ? Regards, Adam gave me access... Before doing a release, I checked the web for documentation. I found http://docs.zope.org/z3c.form/ Last updated Nov 08,2009 Version 1.8.2dev. What is the process to get the latest version published ? -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] New release of z3c.form
Le 01/07/10 14:53, Stephan Richter a écrit : On Thursday, July 01, 2010, Godefroid Chapelle wrote: I found http://docs.zope.org/z3c.form/ Last updated Nov 08,2009 Version 1.8.2dev. What is the process to get the latest version published ? Not sure. I think Paul Carduner did that. Since z3c.form is Sphinx-enabled, I wonder whether we could stick the docs into http://packages.python.org/z3c.form. Manuel does this already: http://packages.python.org/manuel/ Regards, Stephan Done http://packages.python.org/z3c.form Who will get rid of http://docs.zope.org/z3c.form/ ? -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] RFC: Proposed new style for documenting and testing ZTK packages
On 17/04/10 23:20, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jim Fulton wrote: snip - I can almost guarantee that any examples that aren't tested will be wrong. I tried to do a good job on the bobo docs. I made almost all of the examples executable, and the ones I didn't had an amazing tendency to have bugs. I'm not against having the snippets be executable, because I *do* want them to work. I just don't want to encourage anyone to think that they are testing the software when they write the snippets, or execute them. I second Martin: the sentence hereunder is worth its weight in gold. (I wonder if this is an appropriate use of the translation of French valoir son pesant d'or) Executing the snippets is testing the documentation, not the software. - I agree that tests should be separate from documentation. You can get some of your coverage from the docs, but you'll need tests for edge cases and details not addressed by the docs. I would actually prefer to measure coverage (objectively) without reference to the snippets in the docs. I think this would make a lot of sense. Having *all* the tests for a module in one place helps think more clearly about getting good coverage, both from the lines executed standpoint (which can be objectively measured) and from the semantics enforced standpoint, which can't. Tres. With both unit and doc testing, we can get full lines executed coverage. Because of the insulation enforced by our unit testing framework, this can lead to better semantic coverage than with the dependent tests we write when doc testing. One of the reason that full lines executed coverage does not translate to full semantics coverage is the presence of class attributes. In fact, those attributes are holding sub-global state that multiplies the number of combinations that should be tested. I slowly have come to the idea that class attributes can be as bad as global variables : they allow hidden dependencies between methods. This is an insidious problem as class attributes look better until you are told other. A good sign that this problem is creeping in is when you need to write complex setup in order to write method tests. In other words, unit testing can be seen as a way of being warned early of too many attributes in our classes. PS: Hereabove, I speak only of the insulated semantics of each class. This does not remove the need for integration tests which *try* to test all interactions between those classes. -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Zope2 - Release Manager
On 31/03/10 17:07, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hanno Schlichting wrote: snip I'm planning to make a 2.12.4 release on Easter Monday (April 5). You have until then to ask questions and complain :) An enthusiastic +1 from me: I think you are an ideal candidate for the job. Tres Seaver Same enthusiastic support and thanks from me ! -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Summary of this weeks' meeting (2010-03-30)
On 31/03/10 17:17, Christian Theune wrote: The meeting summaries have been found useful, although the participants of the IRC meetings suspect that those developers that could not join may find them even more useful. Feedback from the mailinglist (hey, are you reading this?) would be welcome. I am reading them ! And pleased that the meetings happen. Thanks Christian -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Agenda for today's IRC meeting (3pm UTC on #zope)
On 16/03/10 14:28, Christian Theune wrote: snip Horizon --- These items are currently tracked on the horizon. We won't discuss them at this meeting, but we'll get to them at some point: - Test runners / nightly builds - Volunteer for coordinating automated builds - Towards a list of projects/platforms/etc. we want guaranteed builds for - Automatic binary egg builds for Windows - Access to Windows (2003) build machines for developers (Baiju M.) - Bug tracking / working on bugs regularly - How do we deal with proposed API changes and Python 3 compatibility? (Lennart Regebro) - Pondering *some* (re-)structuring of the ZTK to allow for better maintenance/release management/communication/marketing. (Chris McDonough) Hope to see you in about 90 minutes, Christian As far as I know, Zope 2 has no release manager since Andreas retired after so many years of hard work. I think there is a need for a new release manager. Is that question part of the horizon of the IRC meetings ? Or is it processed elsewhere ? Thanks for taking the time of leading those meetings. -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] lovely.remotetask
Hi, Jean-Francois Roche and I need to port lovely.remotetask to Zope 2. We have started to look at the existing branch port-for-zope210. In order to clean the branch, we made a buildout to run its tests. Doing this, we found out that lovely.remotetask has some ui components that depends heavily on zope.app. We would like to refactor the package into two packages : The first one would hold backend components and would depend on zope.app as little as possible. (z3c.remotetask.core) The second one would hold the ui components. (z3c.remotetask.browser) We would also refactor lovely.remotetask to depend on the new packages. Comments welcome. PS: Lovely people, do you mind that the new packages would move to z3c namespace iow that it looses the lovely namespace ? -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Stepping back as Zope 2 release manager
On 11/01/10 17:19, Andreas Jung wrote: Hi there, I would like to inform you that I intent to retreat from the Zope 2 release manager position soon. I have been serving the Zope community in this position for almost seven years and now it is time to move on and hand over the responsibility to some other person. The reasons for stepping down are pretty easy: I am too busy with other things and I would like to shift my focus on other Zope-related projects but I will remain part of the Zope and Plone community. The Zope community has no official process for choosing a new release manager so I assume some volunteer has to speak up or someone may suggest a honorable person of the Zope community for the position. Regards, Andreas Andreas, you made more than great work ! Thanks a lot. Has the Zope Foundation any will of leading the process to choose a new release manager ? -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.schema
On 22/12/09 15:09, Hanno Schlichting wrote: On Mon, Dec 21, 2009 at 12:01 PM, Godefroid Chapelle got...@bubblenet.be wrote: Jean-Francois and I made a few improvements to zope.schema. Would it be possible to get a new release ? You have a new 3.6.0 release up on PyPi. Hanno Thanks ! -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.schema
On 22/12/09 17:23, Hanno Schlichting wrote: On Tue, Dec 22, 2009 at 5:21 PM, Godefroid Chapellegot...@bubblenet.be wrote: On 22/12/09 15:09, Hanno Schlichting wrote: On Mon, Dec 21, 2009 at 12:01 PM, Godefroid Chapelle got...@bubblenet.bewrote: Jean-Francois and I made a few improvements to zope.schema. You have a new 3.6.0 release up on PyPi. I also made the required changes in all the other Zope Toolkit packages to the new testing output, released new versions of them all and updated the ZTK. Merry x-mas :) Hanno This is a nice x-mas gift ! Thanks for the work. I had overlooked fixes needed in other packages. Is there a buildout you can point me at so that next time I get warned and do those fixes myself ? Regards -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.schema
On 22/12/09 17:55, Hanno Schlichting wrote: On Tue, Dec 22, 2009 at 5:33 PM, Godefroid Chapellegot...@bubblenet.be wrote: On 22/12/09 17:23, Hanno Schlichting wrote: I also made the required changes in all the other Zope Toolkit packages to the new testing output, released new versions of them all and updated the ZTK. This is a nice x-mas gift ! Thanks for the work. I had overlooked fixes needed in other packages. Is there a buildout you can point me at so that next time I get warned and do those fixes myself ? We only have a buildbot testing the ZTK itself. The ZTK does not track SVN trunk or the latest release of all its packages. Instead it tracks a defined list of versions of these packages, which are known to work together. It's definition lives at svn+ssh://svn.zope.org/repos/main/zopetoolkit/trunk So if you want to be nice, you check and build out that location. Make your changes to the package you are working on, stick it into that buildout as a develop egg and run all tests for all packages via bin/test-ztk. If all tests for all packages pass, you can release a new version of the package and update the ztk.cfg in the buildout to point to that release. I frequently do that the other way around, where I first release new versions of packages, then update the ztk.cfg locally. Run the tests and if errors in other packages come up, fix those, make new releases of those, and repeat the dance. The important rule is, that the SVN trunk of the ztk.cfg will at all times give a test-failure free configuration. But as a contributor to an individual package, you are not required to care about the ZTK as a whole. You can contribute to one of them, without all the overhead. Other people like me have an interest in maintaining the ZTK and will do so. Cheers, Hanno Thanks for all details. I dunno if this is documented somewhere else. If it is not, where could that be added to help newcomers ? -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] zope.schema
Hi, Jean-Francois and I made a few improvements to zope.schema. Would it be possible to get a new release ? Or to give us access on Pypi so that we can make it ourselves ? Thanks -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] the ZCA API decision
Martijn Faassen wrote: Hi there, I think we've had enough discussion to make a decision. Hopefully everybody is at least reasonably happy with this: An adapt() method will be added to Interface. It takes the objects to adapt as *args, and optional but explicit 'default' and 'name' aguments. A utility() method will be added to Interface. It takes optional but explicit 'default' and 'name' arguments. On the adapter hook (__call__) we will deprecate the implicit second argument for defaults, with a deprecation warning. Instead, we will require people to write out 'default=' explicitly. Otherwise its behavior remains unchanged. I think we can motivate this change purely because IFoo(bar, baz) really is quite surprising compared to IFoo(bar, default=baz). I tried to follow this discussion closely: however, I cannot say that I understand if doing multi-adaptation with IFoo(bar, baz, boo) has been rejected or postponed. [steering group members, if you are really unhappy with this, please speak up now. Silence is assent. :)] Hopefully we can move forward towards implementation. Thomas Lotze, are you happy enough with this to still help with the implementation? Thanks everybody for your participation in the discussion! Regards, Martijn -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] implementing zope.component 4.0
Fred Drake wrote: On Tue, Dec 1, 2009 at 11:34 AM, Martin Aspeli optilude+li...@gmail.com wrote: I think that logically, these are two different concepts that meet two different sets of use cases. Agreed here. This is essential to this discussion. I've been quite surprised that there are so many who argue to unify these ideas. -Fred Agreed here as well. I think that the different intentions of 1) lookup by interface in registry and 2) adaptation will be easier to understand if the code patterns are different as well. Because I doubt tuple adaptation is that frequent, I am for 5) Call the interface for adaption, and something else for utility lookup, with tuples for multi-adaptation. where the something else is 'Interface.getUtility()'. This way we can - make the interface more prominent when doing lookups (and have some sort of symmetry between lookup and adaptation) - and simultaneously keep the semantic difference between adaptation and lookup. -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.testing 3.8 fails in mysterious ways
Marius Gedminas wrote: On Mon, Aug 03, 2009 at 01:17:41PM +0200, Andreas Zeidler wrote: just fyi: the bug is also present in zope.testing 3.7.7 (showing up when testing plone.z3cform). would it perhaps be possible to release a fixed 3.7.8 soon, so that our buildout stops complaining again? :) I looked at the bug and Godefroid's checkin today. Things seem to be complicated. Short summary: collective.recipe.z2testrunner doesn't support running tests in a subprocess. Long summary: https://launchpad.net/bugs/407916 As a quick workaround, instead of a single 'run tests' step that does bin/test do separate 'run unit tests' and 'run functional tests' steps bin/test -u bin/test -f in your buildbot config. Marius Gedminas I did fix zope.testing and plone.recipe.zope2instance : http://mail.zope.org/pipermail/checkins/2009-August/036807.html https://dev.plone.org/collective/changeset/94328/buildout/plone.recipe.zope2instance/trunk/src Fixes released in zope.testing 0.8.1 and plone.recipe.zope2instance 3.4 -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.testing 3.8 fails in mysterious ways
Sidnei da Silva wrote: On Thu, Jul 30, 2009 at 9:33 PM, Martin Aspelioptilude+li...@gmail.com wrote: Unfortunately, I've got other packages that depend on a newer zope.testing (specifically, collective.testcaselayer). But I thought zope.testing aimed to be able to run any valid tests, so it sounds like a bug in zope.testing regardless, at least since every other test I've run in the same instance work fine. The traceback you pasted shows an UnboundLocalError. What about looking at the source and figuring out why that local variable is not defined? -- Sidnei I bumped into the same bug while working on the same package... I allowed myself to add the missing assignment. However, I'd like someone to check over my shoulder. http://mail.zope.org/pipermail/checkins/2009-July/036586.html Further, this bug is triggered by another one happening when running tests with buildout in plone.z3cform current trunk (r102411). The test runner is trying to spawn a subprocess with the --resume-layer argument. However, the --resume-layer argument is not accepted by the subprocess. This produces an error in a format not foreseen by the error parser. (which then triggered the UnboundLocalError). It would be nice if someone with a better understanding of the testrunner could take a look and understand why the --resume-layer stuff happens. Christian ? -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] [Fwd: Zope Tests: 4 OK, 2 Failed]
Tres Seaver wrote: As an aside / vent: the reason for the now-removed EXTERNALS.txt files was to keep the canonical information about the externals in a diffable file: why subversion can't do a proper diff on its own line-oriented property is beyond me. Another benefit of an EXTERNALS.txt file was that it could be inspected in the web view of a directory, which isn't true for the svn:externals property itself. Tres. I want to support this. The noise made by keeping EXTERNALS.txt in svn is very low compared to the signal it provides. -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [Repoze-dev] Somebody needs to talk at EuropPython.
Lennart Regebro wrote: So, we need talks at EuropPython about both Repoze and Grok. I can't go, but I want to make sure *somebody* does. :) Hands up: Who is talking about Grok, and who talks about Repoze? :) Other super-cool Zope technologies that should be talked about? I think Lennart is really hitting a nail here. We need to advertize about our great efforts. I wont be in EuroPython even if I would have spoken about it with pleasure. -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Strange traceback or Error in the traceback ?
Hi, While seaching for objects of all types containing some text through the ZMI find tab, I got the traceback hereunder. (Zope 2.7.8-final on windows) Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.Scripts.Bindings, line 306, in __call__ Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec Module App.special_dtml, line 175, in _exec Module DocumentTemplate.DT_With, line 61, in render Module DocumentTemplate.DT_Util, line 198, in eval - __traceback_info__: _ Module string, line 0, in ? Module OFS.FindSupport, line 151, in ZopeFind Module OFS.FindSupport, line 151, in ZopeFind Module OFS.FindSupport, line 113, in ZopeFind Module OFS.Image, line 425, in PrincipiaSearchSource AttributeError: content_typestartswith I went to the code and found the following : def PrincipiaSearchSource(self): Allow file objects to be searched. if self.content_type.startswith('text/'): return str(self.data) return '' IOW, the traceback is really strange. Anybody with a clue ? -- Godefroid Chapelle (aka __gotcha)http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: ZpdfDocument
Fernando Lujan wrote: Hi, Are someone developing some Product like ZpdfDocument? Today, If I need a pdf file, I use the reporlab lib, and write it from scratch... A better solution exist? Thanks and Regards. You could also take a look at CMFReportTool. (http://svn.plone.org/view/collective/CMFReportTool/) I have used it recently in a project and the code is imho really nice (the PDF generation code does not depend on CMF). A nice aspect is the generation of PDF from PML (XML description of ReportLab objects). This allows you to easily define your PDFs with ZPTs. HTH -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: Five within Zope 2.8 - really cool !
Martijn Faassen wrote: Andreas Jung wrote: I just would like to thank everyone working on the Five integration with Zope 2.8. It's really easy and fun to work with views, view classes, adapters and interfaces in a Zope 2 environment. I've always tried to get around Zope 3 somehow but now I am at the point where I am really convinced and healed :-) It was a good decision to ship Five now instead in Zope 2.9 or so. I am sure Five will make Z2 application design a lot more straight forward and cleaner...thanks...great work. Thanks on behalf of the Five developers and integrators! That's very nice to hear, especially coming from you! Regards, Martijn Andreas, Getting thanks from someone deeply involved in the everyday work of the Zope maintenance is a pleasure. And a good opportunity to thank YOU for the work done on 2.x release management. Godefroid PS: I am a bit late on this, was on holiday... ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] ZConfig keys
Hello, I would like to confirm that ZConfig keys are case insensitive and that the corresponding attributes on the config object returned by the 'loadConfig' call are always lower case. The only thing that seems relevant about keys and case sensitivity in the documentation does not state it explicitely : '''When this schema is loaded, a set of defaults for the derived section type is computed. Since basic-key is case-insensitive (everything is converted to lower case), foo and Foo are both converted to foo, which clashes since key only allows one value for each key.''' Thanks -- Godefroid Chapelle (aka __gotcha)http://bubblenet.be ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: Streaming large files
Thilo Staebler wrote: hi! I have to stream large mpeg-files over http with range support. this works quite nice until the client seeks in the (media)player and the files aren't to large, because zope caches the whole file... ...so each seek means streaming the whole file from the requested position till end *g* - my RESPONSE object doesn't even know, that the player has seeked e.g. back to the beginning... is there a way to bypass the zope caching? and how do I know if the player has disconnected, so I can stop streaming? thanks in advance thilo You may want to take a look at Railroad project from Infrae. http://infrae.com/products/railroad/ -- Godefroid Chapelle (aka __gotcha)http://bubblenet.be ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: zope-dev list policies
Tres Seaver wrote: Leonardo Rochael Almeida wrote: On Mon, 2004-06-21 at 11:59, Casey Duncan wrote: -1 on changing the list policy. I read and post to all of the public lists through Gmane, which won't work if the policy is changed. I might be wrong but I think this is incorrect. From the headers of this message you sent it's possible to see that you sent it thru gmane, yet the From: address is your zope.com address, so you should not have a problem posting thru the list this way. I think you got a direct reply (but could be wrong). I got the original mail bounced to me just now. Tres. This surprises me. I am administring plone-i18n mailing list. Non members cannot post. I always post through gmane and my messages get accepted ! Further, I think Mohsen has a very good point when he mentions the fact that spam pollutes the archives ! IOW, I think we really could make advantage of Non-members not allowed on zope lists. -- Godefroid Chapelle (aka __gotcha)http://bubblenet.be ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: Zope 3 Newsletter 11
Gary Poster wrote: GODEFROID CHAPELLE: Page Template usage variable Usage in Page templates has been completed during the Rheinland Sprint organized by DZUG. I should have asserted that only the infrastructure for the usage variable has been completed. Now, it's time to : 1) walk the zope3 tree and evolve all pages that depend on another template that the main template. 2) evolve the main template to allow it to be used in all the cases in 1) 3) improve the main template, as we will have only one to maitain -- Godefroid Chapelle (aka __gotcha)http://bubblenet.be ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: Still i18n:attributes DeprecationWarning on Zope head!
At 13:24 17/09/2003, Chris Withers wrote: I know that, the error message is fine, but there are tests that need to be corrected. Since you know this syntax very well, please can you check out the Zope HEAD, search for tal:attributes and fix and broken tests? I think there are only a few files that need to be changed... Done cheers, Chris -- Godefroid Chapelle BubbleNet sprl rue Victor Horta, 18 / 202 1348 Louvain-la-Neuve Belgium Tel + 32 (10) 459901 TVA 467 093 008 RC Niv 49849 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: i18n:attributes in 2.7
Godefroid Chapelle wrote: To summarize, as message ids translation for attributes was added, 2.7 and 3 are working according to the doc/spec, but 2.7 breaks backward compatibility to 2.6.1. This leads to the following question : do we (1) accept this rupture in i18n:attributes management or do we (2) want 2.7 to cover space separated attributes ? IOW, could people that need backward compatibility stand up ? Plone 1.1 needs backwards compatibility. Plone guys would like not to have to maintain two versions for 2.6 and 2.7 This implies that we need to implement the second possibility : 2.7 must accept space separated attributes. BTW, second choice would lead us to a bad situation where we cannot discriminate between span value=value title=title i18n:attributes=value title / and span value=value title=title i18n:attributes=title msgtitle / Quoting Jim on #zope3-dev : ok, then I suggest: In the case where there are other than 2, there is no ambiguity If there is a semicolon, then use the new rule foo title; - title is message id so if there are two things: foo bar if *bar* is an attr, then: Translate it and issue a depreication warning using the warnings module if *bar* if not an attr: Treat it as a message id. IOW if space separated and there are more than two items, all are treated as attributes plus deprecation warning if space separated and two items : - i18n:attributes=value msg_id; (with semicolon) will always be treated as attr msg_id - i18n:attributes=value title will be treated as attr attr as long as title exist as attribute plus deprecation warning -- Godefroid Chapelle BubbleNet sprl rue Victor Horta, 18 / 202 1348 Louvain-la-Neuve Belgium Tel + 32 (10) 459901 TVA 467 093 008 RC Niv 49849 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [Vote] PEP308 voting began
Evan Simpson wrote: Guido van Rossum wrote: IMO TALES should solve this for itself by introducing an if/then/else expression form rather than depending on Python. If you can have a not:.. expression, surely you can have an if:..:then:..:else:.. expression. Now that you point it out, it's not even hard. Here's a proof-of-concept, with really awful parsing (it obviously breaks on nested if: then: else:), that actually works: class IfExpr: def __init__(self, name, expr, compiler): self._s = expr = expr.lstrip() m = re.match('(.*) then:(.*) else:(.*)', expr) if m is not None: condexpr, thenexpr, elseexpr = m.groups() self._cond = compiler.compile(condexpr) self._then = compiler.compile(thenexpr) self._else = compiler.compile(elseexpr) def __call__(self, econtext): if econtext.evaluateBoolean(self._cond): return econtext.evaluate(self._then) return econtext.evaluate(self._else) (Tested with div tal:replace=if:options/x then:string:yes else:string:no) Is this worth a robust implementation, ZPT folks? I think so. Iam much too often using python:test( just for simple condition testing. Cheers, Evan @ 4-am ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] cvs.zope.org broken
Hi all, Does someone knows what happens with cvs.zope.org which is currently broken ? Thanks -- Godefroid Chapelle BubbleNet sprl rue Victor Horta, 18 / 202 1348 Louvain-la-Neuve Belgium Tel + 32 (10) 459901 Mob + 32 (477) 363942 TVA 467 093 008 RC Niv 49849 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Zope 2.5.1 on Win Me
Hi all, I have been using Zope from 2.2.4 on Linux, Win 95 and Win 2K, never experiencing any problems. I am trying to convince a potential colleague to try and learn Zope. He installed 2.5.1 on Win Me. When he begins with start.bat the machine is totally blocked after few seconds. The only exit is to reboot the machine. I deinstalled 2.5.1 and installed 2.3.3 on the same machine which works perfectly. But I still would like to know if you have heard any similar problems with Millenium (I have searched NIP archives on Millenium and did not find anything). I have no idea how to trace the problem. Thanks -- Godefroid Chapelle BubbleNet sprl rue Victor Horta, 18 / 202 1348 Louvain-la-Neuve Belgium Tel + 32 (10) 459901 Mob + 32 (477) 363942 TVA 467 093 008 RC Niv 49849 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: Zope-Dev digest, Vol 1 #1682 - 11 msgs
At 06:13 10/05/2002, [EMAIL PROTECTED] wrote: 'else' is tricky within the block oriented structure of anything XML-ish, because of the concept of 'well-formedness'. The 'if' statement would have to be singly wrapped, and the else block wrapped separately, looking at least somewhat awkward any way you go about it. The best I can come up with in my mind is this, in order to have the 'else' pick up on the condition expressed in its surrounding container. But, yuck: if ... true stuff else false stuff /else /if A good page template way is something like this: tal:if condition=myTalesExpression truth /tal:if tal:else condition=not:myTalesExpression false /tal:else The 'not' TALES namespace is valuable. The downside is that you evaluate the expression twice. A good way to work within this is something that I did earlier today, outside of this conversation, where I evaluate an expression earlier and assign it to a variable: div id=edit-area tal:define=editItems python:here.getMenuItem(...) h3Edit Menu Items/h3 form action=Delete method=post name=actForm tal:condition=editItems ... (form and table elements, and a loop over editItems contained in here if there were results) ... /form div class=emph tal:condition=not:editItems No menu items available /div /div This is something I did a lot in DTML too, setting a search result to either a global variable, or inside of a large dtml-let namescape It is maybe not clear that the above is really usable and allowed. I do not know how and where to stress that the tal: marked tags are underdocumented what a pity. I have already tried : http://www.zope.org/Documentation/ZopeBook/AdvZPT.stx#3-44 Sorry that I am not able to explain it better... -- Godefroid Chapelle BubbleNet sprl rue Victor Horta, 18 / 202 1348 Louvain-la-Neuve Belgium Tel + 32 (10) 459901 Mob + 32 (477) 363942 TVA 467 093 008 RC Niv 49849 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [Zope] Security Assertions
At 18:43 16/01/2002, you wrote: Sorry about cross-posting but I think the following info is worth reading for both zope-users and developers. Note that up until Zope 2.5.0b4 there is a bug in the way module security assertions are handled that makes it impossible to declare more than one assertion without overwriting a previous assertion. It's not really a security hole, it's just annoying and clearly broken. I'd suggest that you complain about this (or do it yourself) if you think a monkeypatch is in order for Zope 2.3/2.4. I went to CVS and read AccessControl.SecurityInfo.py The code looked simple enough that I would take no risk by including it even if my understanding of the inner-working of Zope is still elementary. The following patch works to correct the problem for Zope 2.3.3. It does not seem to cause any other problem. # patch taken from Zope 2.5 from string import rfind # 1.5.2 syntax def ModuleSecurityInfo(module_name=None): if module_name is not None: modsec = _moduleSecurity.get(module_name, None) if modsec is not None: return modsec dot = rfind(module_name, '.') # 1.5.2 syntax if dot 0: # If the module is in a package, recursively make sure # there are security declarations for the package steps # leading to the module modname = module_name[dot + 1:] pmodsec = ModuleSecurityInfo(module_name[:dot]) if not pmodsec.names.has_key(modname): pmodsec.declarePublic(modname) return _ModuleSecurityInfo(module_name) class _ModuleSecurityInfo(SecurityInfo): Encapsulate security information for modules. in place of class ModuleSecurityInfo(SecurityInfo): Encapsulate security information for modules. I do not know what you mean by a 'monkeypatch' but it is certainly worth it to add the patch to 2.3.x and 2.4.x branches. Godefroid Chapelle wrote: Casey Duncan wrote: So the following things don't work: from Products.Formulator.Form import FormValidationError Either Martijn or you need to add the following lines to a Product __init__.py somewhere: from AccessControl import ModuleSecurityInfo ModuleSecurityInfo('Products').declarePublic('Formulator') ModuleSecurityInfo('Products.Formulator').declarePublic('Form') ModuleSecurityInfo('Products.Formulator.Form').declarePublic('FormValidationError') Cheers, Evan @ Zope I added the above code in the corresponding __init__.py on my machine. Which works almost perfectly...: Further, I needed to be able to import : from Products.gvibDA.gvib.gvibExceptions import IntegrityError So I added the following code in gvibDA's __init__.py from Products.PythonScripts.Utility import allow_module, allow_class from AccessControl import ModuleSecurityInfo, ClassSecurityInfo from Globals import InitializeClass ModuleSecurityInfo('Products').declarePublic('gvibDA') ModuleSecurityInfo('Products.gvibDA').declarePublic('gvib') ModuleSecurityInfo('Products.gvibDA.gvib').declarePublic('gvibExceptions') ModuleSecurityInfo('Products.gvibDA.gvib.gvibExceptions').declarePublic('IntegrityError') from gvib.gvibExceptions import IntegrityError allow_class(IntegrityError) I get an 'Unauthorized: Formulator' error when accessing a script beginning with from Products.Formulator.Form import FormValidationError from Products.gvibDA.gvib.gvibExceptions import IntegrityError I suppose it has something to do with the creation of two instances of ModuleSecurityInfo('Products') but have no idea how to correct the problem. Any help would be appreciated. -- Godefroid Chapelle BubbleNet sprl rue Victor Horta, 18 / 202 1348 Louvain-la-Neuve Belgium Tel + 32 (10) 459901 Mob + 32 (477) 363942 TVA 467 093 008 RC Niv 49849 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) -- Godefroid Chapelle BubbleNet sprl rue Victor Horta, 18 / 202 1348 Louvain-la-Neuve Belgium Tel + 32 (10) 459901 Mob + 32 (477) 363942 TVA 467 093 008 RC Niv 49849 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] CoreSessionTracking onStart
Hi, I am trying to use the onStart method of a session data manager But I do not get how to give the path so that my method get called... I could not find any information of the real way to use it. Can someone help me ? Thanks -- Godefroid Chapelle BubbleNet sprl rue Victor Horta, 30 1348 Louvain-la-Neuve Belgium Tel + 32 (10) 457490 Mob + 32 (477) 363942 TVA 467 093 008 RC Niv 49849 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] ComputedAttribute, Persitent and too many datafull baseclasses
Hi, In a product I am writing, I am trying to add a ComputedAttribute to an instance of a Folder descendant class. This is the code I use: def addComputedAttribute(self, attributeName, sourceCode): methodName = '_ca_get%s' % attributeName self.addMethod(methodName, sourceCode) setattr(self, attributeName, ContextComputedAttribute(self.__class__.__dict__[methodName])) where at first I defined ContextComputed Attribute like this: import ComputedAttribute _ComputedAttribute = ComputedAttribute.ComputedAttribute del ComputedAttribute class ContextComputedAttribute(_ComputedAttribute): pass This put the Folder in a bad state : when I access it later, the Zope instance crashes. So I supposed I needed to use a persistent Attribute and I tried with ContextComputedAttribute class defined like this: class ContextComputedAttribute(Persistent): def __init__(self, test): pass In this case, the Folder stays in a good state but it does not fullfill the requirements as ContextComputedAttribute does not descend from the real Zope ComputedAttribute class. My problem is the following : I cannot define a class like this: import ComputedAttribute _ComputedAttribute = ComputedAttribute.ComputedAttribute del ComputedAttribute class ContextComputedAttribute(_ComputedAttribute, Persistent): pass In this case, I get the following error TypeError: too many datafull base classes which has to do with too many ExtensionClass derivation... Can someone tell me how to define a class with both ComputedAttribute and Persistent behaviours ? Thanks a lot. -- Godefroid Chapelle BubbleNet sprl rue Victor Horta, 30 1348 Louvain-la-Neuve Belgium Tel + 32 (10) 457490 Mob + 32 (477) 363942 TVA 467 093 008 RC Niv 49849 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] hack for refused authorization with virtual dataskin
Hello, After rereading the ZopeSecurityPolicy source code, I tried the following hack. I add in the skinscript : WITH 1 COMPUTE __allow_access_to_unprotected_subobjects__=RESULT which does work : it fools the security mechanism. I can live with it but feel that there is only a slight problem which could allow me to avoid the hack. I hope this can hint some of you to help me to understand what is badly settled in my installation. -- Godefroid Chapelle BubbleNet sprl rue Victor Horta, 30 1348 Louvain-la-Neuve Belgium Tel 010 457490 Mob 0477 363942 TVA 467 093 008 RC Niv 49849 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Virtual dataskinned ZClass instance
Steve Alexander a crit : Godefroid Chapelle wrote: where getNames is a python method in a DataSkin Class Extender. It is defined as : import string list = string.split(context.id, '_') return list[1] use getId() perhaps? -- Steve Alexander When using context.getId(), I get the id of the specialist, not of the HumanClass instance... Actually, what I present is a "toy test" where I try to access the id as you do in the skinscript exapmle you sent me... If I change the skinscript to something simpler... WITH 'test' COMPUTE prenom=RESULT and the DTML to : dtml-var standard_html_header h2dtml-var title_or_id/h2 dtml-var "defaultRack.getItem('100_Peter').prenom" dtml-var standard_html_footer I get the same unauthorized error response but this time when accessing 'prenom'. I suppose ther something wrong with the default ZClass constructor which is used by the rack to make the instance... but is that correct ... no idea... -- Godefroid Chapelle BubbleNet sprl rue Victor Horta, 30 1348 Louvain-la-Neuve Belgium Tel 010 457490 Mob 0477 363942 TVA 467 093 008 RC Niv 49849 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Dataskin with no persistence.
Hi, I am trying to build a specialist which gives me access to a facade ZClass in front of a XML file. As the XML is already stored, I do not want to store the facade ZClass. Actually, I would like it to be a base on which the skinscript of the specialist's rack can add attributes. So I created a ZClass (HumanClass) with no properties inheriting from ZObject and _ZClass_for_DataSkin. I create a specialist in which the default rack has the following properties : data plug-in : a skinscript computing attributes based on an id and the xml. storage : Class to use for stored items: HumanClass Objects are: loaded by accessing attribute nom (which is defined in the skinscript) Store 'persistent' data: Directly in this object I store no HumanClass instance and try to get an instance : specialist.getItem(anId) I always get None. Am I trying to do something impossible because of lack of understanding or am I just wrong in one property of ZClass, Specialist, Rack ? Thanks a lot -- Godefroid Chapelle BubbleNet sprl rue Victor Horta, 30 1348 Louvain-la-Neuve Belgium Tel 010 457490 Mob 0477 363942 TVA 467 093 008 RC Niv 49849 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Dataskin with no persistence.
Steve Alexander a crit : Godefroid Chapelle wrote: data plug-in : a skinscript computing attributes based on an id and the xml. I just want to stress that I deleted every prebuilt other data plugins... My ZClass has only an empty dataskin property sheet. storage : Class to use for stored items: HumanClass Objects are: loaded by accessing attribute nom (which is defined in the skinscript) I have changed the load attribute to id. This helps a little : with dtml-var "getItem(REQUEST.id)" in the specialist, I get a HumanClass Instance at xxx in the HTML code. But when trying to access any attribute of the instance I get an authorization error. I remembered having seen somewhere to put a proxy role on the skinscript so I tried. With manager, I keep the same authorization error... With owner or anonymous, I get a NameError on the first name mentioned in the skinscript... Store 'persistent' data: Directly in this object I store no HumanClass instance and try to get an instance : specialist.getItem(anId) I always get None. Am I trying to do something impossible because of lack of understanding or am I just wrong in one property of ZClass, Specialist, Rack ? What you're doing sounds about right. What does your SkinScript look like? In the ScinScript, you need to determine what data to use based on self.id. Here's the SkinScript I use for a similar function; I'm creating "virtual" instances of one ZClass, based on instances of a different ZClass from another Specialist. In this case, the other specialist is "Responses". WITH Responses.get_data_for_code(code=self.id) COMPUTE subject_name, rater_name, relationship_name, response_code, process_step -- Steve Alexander Software Engineer Cat-Box limited BTW Has there been a patch for an error I get when using copy or cut buttons in ZPatterns containers : Zope Error Zope has encountered an error while publishing this resource. Error Type: KeyError Error Value: manage_tabs -- Godefroid Chapelle BubbleNet sprl rue Victor Horta, 30 1348 Louvain-la-Neuve Belgium Tel 010 457490 Mob 0477 363942 TVA 467 093 008 RC Niv 49849 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Memory problems with ParsedXML ?
Karl Anderson a crit : I didn't think that anyone would want to see a management screen with 2500 ParsedXML instances - or 2500 instances of anything - at one time. Have you tried using a BTree folder? BTree Folder is working very nicely... Another thing to keep in mind is that the ParsedXML *product* is a DOM tree and a management interface around it. The management interface only gives you a convenient UI and a place to store a few bits that the DOM doesn't know about (content type, namespace usage, etc.). It's always more efficient to just use the DOM tree and related utilities (parsing, printing), although it is less convenient - you have to know a little bit more about what you're doing. Do you need each of those 2500 product instances? See the createDOMDocument method to create a DOM document without the management interface. I am trying to use createDOMDocument, calling it from an external method: from Products.ParsedXML import ParsedXML def accessXml(document): return ParsedXML.createDOMDocument(document) When using the document returned in a python script, it seems that Zope security prevents me from accessing any DOM attributes. Am I doing something wrong or am I forced to do everything through external methods ? -- Karl Anderson [EMAIL PROTECTED] Thanks -- Godefroid Chapelle BubbleNet sprl rue Victor Horta, 30 1348 Louvain-la-Neuve Belgium Tel 010 457490 Mob 0477 363942 TVA 467 093 008 RC Niv 49849 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Memory problems with ParsedXML ?
Hi, I have imported about 2500 xml files in ParsedXML objects through the use of : manage_addProduct['ParsedXML'].manage_addParsedXML(id, '', xmlString) This works perfectly. But when trying to browse the folder containing the ParsedXML instances, a whole lot of memory is used by Zope and it took my machine down. Have I done something wrong or does this info help you debug the product ? Hope this help. -- Godefroid Chapelle BubbleNet sprl rue Victor Horta, 30 1348 Louvain-la-Neuve Belgium Tel 010 457490 Mob 0477 363942 TVA 467 093 008 RC Niv 49849 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Memory problems with ParsedXML ?
Karl Anderson a crit : Hm, it's been pointed out to me that the inefficiency of the get_size method of ParsedXML is compounded with many instances because the standard management interface uses it. It's possible that some stuff isn't getting garbage collected until the transaction is done, and calling get_size on many ParsedXML instances in one transaction is the problem. I'll look into it. I didn't think that anyone would want to see a management screen with 2500 ParsedXML instances - or 2500 instances of anything - at one time. Have you tried using a BTree folder? Another thing to keep in mind is that the ParsedXML *product* is a DOM tree and a management interface around it. The management interface only gives you a convenient UI and a place to store a few bits that the DOM doesn't know about (content type, namespace usage, etc.). It's always more efficient to just use the DOM tree and related utilities (parsing, printing), although it is less convenient - you have to know a little bit more about what you're doing. Do you need each of those 2500 product instances? See the createDOMDocument method to create a DOM document without the management interface. It's easy to wrap a ParsedXML product around an existing DOM tree - see the initFromDOMDocument method. Currently, you have to create the persistent ParsedXML product which wraps the DOM Document node, and install that product in a Zope ObjectManager (or subclass like Folder) somewhere, to avoid a few warts. Someday I'd like to be able to just instantiate a management wrapper when I want a management interface, and then just throw it away, without bothering to add it to a folder. -- Karl Anderson [EMAIL PROTECTED] Thanks answering so quickly... I am still a newbie and will check BTree Folder and the API you point to me. -- Godefroid Chapelle BubbleNet sprl rue Victor Horta, 30 1348 Louvain-la-Neuve Belgium Tel 010 457490 Mob 0477 363942 TVA 467 093 008 RC Niv 49849 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )