Re: [Zope-CMF] Where can I found information about CMFCore class DirectoryRegistry ?

2005-04-21 Thread Chris Withers
KLEIN Stéphane wrote: I search information about CMFCore class DirectoryRegistry. What is it ? How use it ? ... Where can I found information about it ? Here's a better question: Why do you want to know how to use it? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting

[Zope-CMF] Re: Where can I found information about CMFCore class DirectoryRegistry ?

2005-04-21 Thread Chris Withers
Well, the source code is it. You don't need to worry about any of these though, if you just want to change and add some fields.. cheers, Chris KLEIN Stéphane wrote: Chris Withers a écrit : KLEIN Stéphane wrote: I search information about CMFCore class DirectoryRegistry. What is it ? How use

Re: [Zope-CMF] Re: [CMF-checkins] CVS: Products/CMFCore - DirectoryView.py:1.47.2.7

2005-05-26 Thread Chris Withers
Hi Florent, Florent Guillaume wrote: I deliberately didn't use a LOG call, because this line will get executed for every request if there is an old directory view present, and it'll fill your logs pretty quickly, which is not acceptable. Well, what's acceptable or not is a matter of opinion

Re: [Zope-CMF] Problem when setting Portal Image as index_html

2005-05-26 Thread Chris Withers
Dinh Trung Viet wrote: It seems that Portal Image cannot display the image when it was set as default page i.e. id = index_html. Anyone has the same problem before? I'm using Plone 2.0.5. Go ask on the plone list then ;-) cheers, Chris -- Simplistix - Content Management, Zope Python

Re: [Zope-CMF] Re: [CMF-checkins] CVS: Products/CMFCore - DirectoryView.py:1.47.2.7

2005-06-02 Thread Chris Withers
Dieter Maurer wrote: You asked for this a long time ago and I responded (a long time ago!): You turn the warning (all of them, if you like) into exceptions and you get a nice traceback. You find details in the description of the Python (command) options or the module warnings. OK.

[Zope-CMF] Re: Bad interaction between CMF 1.4 and Zope 2.8 (catalog-getObject-raises)

2005-06-03 Thread Chris Withers
Tres Seaver wrote: Exactly. The point is that the adverse effect *already happened*, in some prior request, probably due to one of Chris' beloved hasattrs ;). The current request should *not* be prevented from continuing. Why not? Chris, take this as a fiat: this one will *never* turn into

Re: [Zope-CMF] Nested skins

2005-08-24 Thread Chris Withers
Laurence, Could you stick this in the collector so it doesn't get forgotten please? cheers, Chris Dieter Maurer wrote: Laurence Rowe wrote at 2005-8-22 17:04 +0100: ... I often define several skins, and after a while they get a little complicated (I'm using Plone ;-) So in order to make

Re: [Zope-CMF] Small CMFCatalogAware refactoring

2005-09-12 Thread Chris Withers
Julien Anguenot wrote: The refactoring was obsious and harmless right ? Just removing hardcoded references to portal_catalog and portal_workflow within the internals of CMFCatalogAware. Well, that's not refactoring is it? You've added new functionality with the intent of allowing a new

Re: [Zope-CMF] Re: CachingPolicyManager improvements

2005-09-14 Thread Chris Withers
Tres Seaver wrote: Note that the goal with unit tests is to use the *smallest possible fixture*; using PortalTestCase when you could equally well use RequestTest reduces the usefulness of the test: - it runs slower (the nibbled to death by ducks effect, particularly when re-running the

[Zope-CMF] Zope Debugger 0.8.0 Released!

2005-09-28 Thread Chris Withers
Zope Debugger is an enhanced version of pdb for use with Zope. It can be used simply by inserting the following lines in any python code you'd like to debug, including Script (Python)'s and FSPythonScripts: from Products.zdb import set_trace set_trace() It requires no changes to Zope, CMF or

Re: [Zope-CMF] Re: CMFTestCase: Best way to create the CMF site?

2005-10-05 Thread Chris Withers
Stefan H. Holek wrote: I see two options: a) Use a different portal name portal_name = 'mysite' CMFTestCase.setupCMFSite(portal_name) Can setupCMFSite not do something more clever if it finds the object already there? b) Use getPortal() to create a new portal per test def

Re: [Zope-CMF] Testing skin scripts and templates using ZopeTestCase.Functional

2005-10-06 Thread Chris Withers
Paul Winkler wrote: Aha! I just confirmed that it works as you say in zopectl debug. (You do have to first make sure that the portal has a REQUEST attribute.) Yeah, I believe the canonical way is: from Testing.makerequest import makerequest portal = makerequest(self.portal)

Re: [Zope-CMF] Re: CMFTestCase: Best way to create the CMF site?

2005-10-06 Thread Chris Withers
OK, so I misunderstood the actual problem Paul was reporting... Can someone explain it for a stupid person like me? ;-) Chris Stefan H. Holek wrote: Oh, setupCMFSite is sufficiently clever, it's the CMF tests that aren't ;-) Stefan On 5. Okt 2005, at 10:45, Chris Withers wrote: Stefan

[Zope-CMF] Re: [Zope-dev] RestrictedPython, TALES Expressions and CMF

2005-10-11 Thread Chris Withers
Sidnei da Silva wrote: CMF seems to create expression contexts in two places off the top of my head: In 'CMFCore/Expression.py' and 'CMFCore/CachingPolicyManager.py'. None of those define 'here' or 'context' but instead just 'object'. I believe one of those two now has context defined in svn

Re: [Zope-CMF] Trying to customize CMF login to use email rather than userid

2005-10-17 Thread Chris Withers
Deb Lewis wrote: Configuration: Zope 2.7.7, CMF 1.4.8; also GRUF (GroupUserFolder) 3.3 Why are you using such old and crufty software? Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___

Re: [Zope-CMF] Help with Frostbite

2005-10-18 Thread Chris Withers
robert rottermann wrote: do you have SpeedPack installed? You could always remove that garbage ;-) Frostbite is likely going to be a bigger win, and better written too... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk

Re: [Zope-CMF] Re: Five views / redirects

2005-10-18 Thread Chris Withers
yuppie wrote: def __call__(self): if self.isTuesday(): return ZopeTwoPageTemplateFile('tuesday.pt').__of__(self)() return self.index() Surely the following is going to be better? tuesday_pt = ZopeTwoPageTemplateFile('tuesday.pt') def __call__(self):

Re: [Zope-dev] Re: [Zope-CMF] Better DeprecationWarnings (was Re: SVN: CMF/trunk/CMFDefault/Portal.py - reverted Portal.py change of r39125 to fix BBB temporarily)

2005-10-21 Thread Chris Withers
Tim Peters wrote: Note: sometimes _internals_ use deprecated gimmicks in order to support deprecated gimmicks too, and then stacklevel=3 is too small. It's happened so rarely in ZODB that I haven't tried to do something about that yet. Interestingly, I've found that even this is sometimes

[Zope-CMF] Re: getActionById replacement

2005-10-25 Thread Chris Withers
yuppie wrote: getActionObject(action_path) is the method you are looking for. getActionById is defined as public, getActionObject as private, so you can't use it in any skin scripts or templates :-( Can't see why you would need that method in the skins. Okay, so how would you get the

[Zope-CMF] Re: getActionById replacement

2005-10-25 Thread Chris Withers
yuppie wrote: This is in a completely set up Plone site? Could you please try to debug those values while we are still in customizePortalTypes? Okay, in there, it's just the normal Plone types, which we don't use. And yes, their _aliases dict appears to have 'view' keys which map to the

Re: [Zope-CMF] Debugging security settings in .metadata files

2005-10-31 Thread Chris Withers
Floyd May wrote: I have a set of files - page templates, python scripts, and zsql methods - that are set up as filesystem objects. I'm having trouble getting the security set the way I want it to be with the .metadata files. Here is the content of my .metadata files:

Re: [Zope-CMF] Biography type

2005-11-02 Thread Chris Withers
BIll Anderson wrote: Ok, so it's clearly been quite some time since I've done any CMF stuff. Obviously these are not part of Metadata OOTB. What would be the simplest way to add the ability to set/change these? I'd prefer to be able to have them set during the creation process and must be able

Re: [Zope-CMF] Dead branches

2005-11-11 Thread Chris Withers
Florent Guillaume wrote: Could folks having old CMF branches clean them up ? Why, what's the problem with them? Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope-CMF maillist -

[Zope-CMF] Re: [CMF-checkins] SVN: CMF/branches/tseaver-pkg_resources/ Avoid using __file__ where possible.

2005-11-11 Thread Chris Withers
Tres Seaver wrote: Log message for revision 40036: Avoid using __file__ where possible. Why? I use this all over the place so need to know why it's bad ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk

Re: [Zope-CMF] [dev] RFC: logging/reporting framework for GenericSetup

2005-11-16 Thread Chris Withers
Jens Vagelpohl wrote: There could be a multiplexer that logs to the standard Zope event log *and* keeps the messages in a memory buffer to be displayed in the browser. This could be done in a separate class or a logging API could be added to ISetupContext. Should be easy to do, really.

[Zope-CMF] Catching logging during unittesting?

2005-11-18 Thread Chris Withers
Hi All, Asking here 'cos I'm sure I saw someone talking about this recently. I'm unit testing something which does some logging. It's supposed to log, so ideally I'd like to test for that, but I'd also like to not have the log spew showing during tests runs, which seems to have started

Re: [Zope-CMF] CMF 1.6

2005-11-18 Thread Chris Withers
Alec Mitchell wrote: to start using it immediately or risk strange breakages. Maintaining product compatibility between versions of CMF/Plone will become nearly impossible. I'm sorry, I really couldn't resist this... And that differs from other Plone releases how exactly? ;-) Chris --

Re: [Zope-CMF] Re: [dev] RFC: logging/reporting framework for GenericSetup

2005-11-18 Thread Chris Withers
yuppie wrote: Or would be 'GenericSetup.content' enough? Yes, that looks nicer to me :-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope-CMF maillist - Zope-CMF@lists.zope.org

[Zope-CMF] Re: CMF 1.6

2005-11-18 Thread Chris Withers
Alexander Limi wrote: And that differs from other Plone releases how exactly? ;-) And what, exactly, have you done to help Plone have less bugs? *sigh* there's not a lot I can do, the problems with Plone are cultural. There seems to be a pervasive culture of monkey patching and

Re: [Zope-CMF] Catching logging during unittesting?

2005-11-18 Thread Chris Withers
Answering my own question and cc'ing Vinay in since I was also talking to him about this... Chris Withers wrote: I'm unit testing something which does some logging. It's supposed to log, so ideally I'd like to test for that, but I'd also like to not have the log spew showing during tests runs

Re: [Zope-CMF] reindexing optimizations

2005-11-21 Thread Chris Withers
Hi Alec, Alec Mitchell wrote: So, Sidnei has been plugging away at the AT reindexes things an obscene number of times issue today, and appears to have fixed many of the AT triggered indexing redundancies. Where is this work being done? I'd be very interested to track it... *)

Re: [Zope-CMF] Re: reindexing optimizations

2005-11-21 Thread Chris Withers
Florent Guillaume wrote: That's certainly a good hack. There are several ways to do it, either with a thread-local variable, or in the request, or by walking the stack's locals to check for a __dont_index__ attribute... You'd have to bench, but a thread-local variable is probably the fastest.

Re: [Zope-CMF] Re: reindexing optimizations

2005-11-21 Thread Chris Withers
Julien Anguenot wrote: yup you're right. We do define this already. All the subscribers can run 'async' or 'sync' . Check the base interface for those subscribers there : http://svn.nuxeo.org/trac/pub/file/CPSCore/trunk/interfaces.py

Re: [Zope-CMF] Re: reindexing optimizations

2005-11-21 Thread Chris Withers
Julien Anguenot wrote: If you want a flush, following what I think I understood you mean ;), we use the transaction.commit() in the tests when needed. Okay, but then how do you undo the changes made by that commit? Also, how would you go about overriding this late-indexing behaviour if you

Re: [Zope-CMF] Re: reindexing optimizations

2005-11-24 Thread Chris Withers
Julien Anguenot wrote: Can you gimme a use case, within a test, where the interface we define in CPS would not be enough for you ? In our CPSTestCase we set all subscribers to 'async' and then all works as if no txn subscribers exists during the tests. Ah, okay, yes, I guess this is one way to

Re: [Zope-CMF] Re: SVN: CMF/trunk/ - converted types tool setup handlers to new style

2005-11-25 Thread Chris Withers
Florent Guillaume wrote: Or even better: self._logger.info(%r type info imported. % self.context.getId()) Or you could even take advantage of the good work done by the python logging people ;) self._logger.info(%r type info imported.,self.context.getId()) cheers, Chris -- Simplistix -

Re: [Zope-CMF] Re: CMF GenericSetup log levels

2005-12-15 Thread Chris Withers
yuppie wrote: 1.) It would be nice to have a policy for Zope. If the Zope core officially supports the BLATHER level (not just in the deprecated zLOG module) I'm fine with using it in GenericSetup as well. It doesn't, ZODB has a mapping for it but it's a stupid name left over from before the

[Zope-CMF] Re: CMF GenericSetup log levels

2005-12-15 Thread Chris Withers
yuppie wrote: By 'broken setups' I meant e.g. if you loose some catalog indexes on export/import because no handler exists for those index classes. This is a problem you should know about, but maybe you don't care or you fix that by hand. Ah, okay, I kinda agree here, and don't feel strongly

[Zope-CMF] Re: CMF GenericSetup log levels

2005-12-15 Thread Chris Withers
Hi Tres, Tres Seaver wrote: No, it isn't, at least in Zope. BLATHER is intended to be summary information, useful for developers but not important enough to show by default. DEBUG is for more detailed information, and TRACE is for completely overwhelming detail. Show me the docs in zope

Re: [Zope-CMF] [dev] i18n Message objects: encoding issues

2006-01-25 Thread Chris Withers
yuppie wrote: 2.) Switch completely to unicode in CMF 2.0: Sounds like a too big change, don't think we should try that. I think we all know this is where we need to be eventually, 2.0 seems the right time to do that, I'd actually prefer this, even though it'll delay the 2.0 release...

Re: [Zope-CMF] What's the story for using Z3 content types as first-class citizens in CMF?

2006-02-13 Thread Chris Withers
Martin Aspeli wrote: Alec Mitchell's plone_schemas product lets you use such types in Plone, though he derives from CMF's PortalContent (as I recall) and manually constructs an FTI. FWIW, I think this is an exceptionally bad idea. I'd much prefer to see CMF grow a way to use Z3 content types

Re: [Zope-CMF] Classes whose instances appear in ZODB

2006-03-09 Thread Chris Withers
Lennart Regebro wrote: Nope, that's not equivalent. I'm not exactly sure what the requirements are. A getId method, a title attribute and a meta_type probably. Subclassing from SimpleItem is definitely a good idea. ...appart from the lame-ass allow by default security policy it drags in along

Re: [Zope-CMF] Fighting the Zope 2.9 testrunner

2006-03-21 Thread Chris Withers
Jens Vagelpohl wrote: From the old testrunner, which I miss *a lot*, I could ensure I am indeed running a specific module by doing... Yup, this is one of the things I like least from the Zope 3 world. What happened to proposals and community agreement before inflicting big changes on

[Zope-CMF] Zope Debugger 0.8.2 Released!

2006-03-21 Thread Chris Withers
Zope Debugger is an enhanced version of pdb for use with Zope. This release fixes compatability issues with Zope 2.9 and Python 2.4. It can be used simply by inserting the following lines in any python code you'd like to debug, including Script (Python)'s and FSPythonScripts: from Products.zdb

Re: [Zope3-dev] Re: [Zope-CMF] Fighting the Zope 2.9 testrunner

2006-03-22 Thread Chris Withers
Jim Fulton wrote: From the old testrunner, which I miss *a lot*, I could ensure I am indeed running a specific module by doing... Yup, this is one of the things I like least from the Zope 3 world. What happened to proposals and community agreement before inflicting big changes on other

Re: [Zope3-dev] Re: [Zope-CMF] Fighting the Zope 2.9 testrunner

2006-03-23 Thread Chris Withers
Stephan Richter wrote: On Tuesday 21 March 2006 02:54, Chris Withers wrote: I particularly hate the fact that no real effort was put into backwards compatibility, not to mention those silly weird sort-of-fifty-dots-per-line thing that doesn't actually work. I think this is not fair. Jim has

Re: [Zope3-dev] Re: [Zope-CMF] Fighting the Zope 2.9 testrunner

2006-03-23 Thread Chris Withers
Philipp von Weitershausen wrote: Tres Seaver wrote: I'm not sure what Chris meant, but the change to the visual output of the testrunner when running with dots seems gratuitous to me, as well -- I don't see any benefit to the indented, narrower output, Me neither, for what it's worth. Okay,

Re: [Zope3-dev] Re: [Zope-CMF] Fighting the Zope 2.9 testrunner

2006-03-24 Thread Chris Withers
Stuart Bishop wrote: silence it (and open a bug report at the same time). The noisier test output is, the more likely you are to miss relevant information. Totally agreed, I was kinda shocked at how many deprecation errors Zope 2.9 ships with :-( Chris -- Simplistix - Content Management,

Re: [Zope-CMF] Re: CMF roadmap update

2006-04-25 Thread Chris Withers
Jens Vagelpohl wrote: I sent an email about this a couple days ago. Basically, I'm down to one failing unit test in CMFUid and have discovered that CMFUid is basically broken in 2.0/trunk. I also sent an email on this issue to the list, hoping that the developers who wrote CMFUid and lobbied

Re: [Zope-CMF] Re: CMF roadmap update

2006-04-27 Thread Chris Withers
Tres Seaver wrote: Customization is hard: without TTW modules we *can't* do customization of arbitrary view logic. What's the blocker on this? Same thing that's blocking TTW schemas? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting -

Re: [Zope-CMF] Re: SVN: CMF/branches/1.6/ Avoid deprecation warnings with Zope 2.10.

2006-06-12 Thread Chris Withers
Jens Vagelpohl wrote: 2006-06-09 20:43:01 WARNING ZODB.DB DB.open() has 13 open connections with a pool_size of 7 Looks like someone somewhere ain't closing their zodb connection in a test... ERROR:foo.bar:eek None 2006-06-09 20:44:24 ERROR foo.bar eek None INFO:foo.bar:blah blah I'd

Re: [Zope-CMF] Re: SVN: CMF/branches/1.6/ Avoid deprecation warnings with Zope 2.10.

2006-06-13 Thread Chris Withers
Jens Vagelpohl wrote: I'd love to nail this one, it gets boring seeing it in a project's nightly test runs every night... A bit of grepping might find that one. :) Cool, lemme know when you're done :-P Chris -- Simplistix - Content Management, Zope Python Consulting -

Re: [Zope-CMF] [dev] writing tests for CMF 2.1

2006-11-09 Thread Chris Withers
Hi All, yuppie wrote: Layers -- ZCML is set up using test layers. Their setUp() and tearDown() methods are only run once for all tests in the layer. Maybe of interest, I've attached the layers file I use when testing Zope 2 apps. It does the right thing w.r.t. having a DemoStorage for

Re: [Zope-CMF] Zope 3 events from workflow

2007-01-02 Thread Chris Withers
Hi All, Martin Aspeli wrote: class IWorkflowEvent(IObjectEvent): A workflow related event wf_name = TextLine(title=uThe name of the workflow this event is part of) transition = TextLine(title=uThe name of the transition taking place) state_before = TextLine(title=uThe

Re: [Zope-CMF] Zope 3 events from workflow

2007-01-03 Thread Chris Withers
Martin Aspeli wrote: To subscribe only to particular transitions, you would need for each transition object to provide a specific interface. Unless you could leverage the same kind of thing that makes named adapters work... zope.event?), it registers a general subscriber for IObjectEvent

[Zope-CMF] Re: [CMF-checkins] SVN: CMF/trunk/CMFDefault/formlib/schema. - added Pdata support

2007-02-15 Thread Chris Withers
PData is there for a reason, unravelling it into a string is often not the best thing to do. That said, I can't see much context here, but just thought I'd mention it.. Chris Yvo Schubbe wrote: Log message for revision 72567: - added Pdata support Changed: U

Re: [Zope-CMF] memberdata + mysql integration

2007-04-27 Thread Chris Withers
Miles wrote: - PAS: looks the most pluggable but doesn't seem to have a MySQL plugin and is quite complicated at first glance. - MySQLUserFolder: appears to fit the bill for authentication but no changes since late 2005. - ExUserFolder: also looks like it will deal with authentication

Re: [Zope-CMF] Making TypesTool faster

2007-05-02 Thread Chris Withers
Alexander Limi wrote: This issue goes back to the original discovery that Zope had a bug that made its Product lookup mechanism What do you mean by Product lookup mechanism? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk

Re: [Zope-CMF] Re: pdf generation

2007-07-26 Thread Chris Withers
Philipp von Weitershausen wrote: Charlie Clark wrote: Do you know of a Zope Product that already wraps report lab, or do you recommend just accessing directly with a script? I can't think of anything that would do this for you: transforming HTML to PDF doesn't usually work very well.