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. Reportla

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] 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 but

[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 CMF/trunk/CMFDefault/formli

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 a

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=u"The name of the workflow this event is part of") transition = TextLine(title=u"The name of the transition taking place") state_before = TextLine(ti

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] 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 - http://ww

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

2006-06-11 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 love

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 - http://www.simplisti

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 ha

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, Zo

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

2006-03-23 Thread Chris Withers
Martijn Faassen wrote: Anyway, a release and the development situation looking similar helps people actually work on the same codebase and structure, and not having to learn different ways of doing things as soon as they switch. Forcing context switches on people isn't a good idea. Huge +1 fr

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. Ok

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. Ji

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 peopl

[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: [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 other

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 alon

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 w

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

2006-01-30 Thread Chris Withers
yuppie wrote: 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... Might make sense. But I'll not work on this on my own, so unless there are other volunteers this is not really an

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... 3

[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 a

[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

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

2005-12-15 Thread Chris Withers
Florent Guillaume wrote: Stupid is in the eye of the beholder. You don't like something that's useful for others so you want it to die. Congratulations for your openmindedness. And you apparently can't grasp the idea that there can be different levels of informativeness. Are you honestly tell

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

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: 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: reindexing optimizations

2005-11-24 Thread Chris Withers
Florent Guillaume wrote: Actually for our Trees Tool, there's also a flushEvents() method. It's trivial to implement. I had a feeling it might be, cool :-) cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk __

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 r

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 http://svn.nuxeo.org/trac/pub/file/CPSCore/trunk/BaseManager.

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. Y

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... *) TypesTool.c

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

[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 bludegeon

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 h

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

2005-11-18 Thread Chris Withers
yuppie wrote: Have a look at MailingLogger's SummarisingLogger for ideas. Give it a go and let me know where the code is if you want me to take a look, I've got to know and love python's logging module quite well ;-) I had a quick look at MailingLogger, but it seems to do something different.

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 -- Sim

[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 happen

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. W

Re: [Zope-CMF] Dead branches

2005-11-15 Thread Chris Withers
Paul Winkler wrote: On Thu, Nov 10, 2005 at 05:52:05PM +0100, Florent Guillaume wrote: Could folks having old CMF branches clean them up ? See http://svn.zope.org/CMF/branches/ This seems to concern: ajung, andrew, chrism, chrisw, gregweb, jshell, mj, regebro, shane, sidnei, slinkp, tseaver,

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 - Zo

[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] 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 t

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: --8<---

[Zope-CMF] Re: getActionById replacement

2005-10-27 Thread Chris Withers
yuppie wrote: yuppie wrote: Okay, so how would you get the url for an action from inside a skin script or template? obj.getActionInfo('object/view')['url'] for type actions or provider.getActionInfo('user/join')['url'] for other actions. Now, do these return full urls or just the last segmen

[Zope-CMF] Re: getActionById replacement

2005-10-27 Thread Chris Withers
yuppie wrote: The _aliases attribute is an implementation detail of default FTIs. ATCT uses CMFDynamicViewFTI which has a different implementation of queryMethodID. Ah, but we're using normal AT, not ATCT... Chris -- Simplistix - Content Management, Zope & Python Consulting - http

Re: [Zope-CMF] Re: getActionById replacement

2005-10-27 Thread Chris Withers
Tres Seaver wrote: ti.queryMethodID('view', object) Note that this change is an instance of the "object-overrides-type" pattern, which is what some people want for *other* type-specific policies, too (e.g., worklflows, allowed metadata, etc.) Not sure what this means, or whether you're sugg

[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 righ

[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 u

[Zope-CMF] Re: getActionById replacement

2005-10-21 Thread Chris Withers
yuppie wrote: Once again: getActionObject(action_path) is the method you are looking for. Another problem with this: getActionById is defined as public, getActionObject as private, so you can't use it in any skin scripts or templates :-( Suggestions? I'd be very much up for getting togeth

[Zope-CMF] Re: getActionById replacement

2005-10-21 Thread Chris Withers
yuppie wrote: I wonder why ti.queryMethodID('view') is None. Is that the case for all your type infos? Looks like it. Does ti._aliases exist? If yes, what does it look like? Yep, often just maps 'edit':'base_edit', and here queryMethodID (annoying capitalisation!) returns None Iin a c

[Zope-CMF] Re: getActionById replacement

2005-10-21 Thread Chris Withers
yuppie wrote: Oops! Should have had a better look at the Plone code. I thought you need the object. Now in plone, they do: view=typeInfo.getActionById('view') typeObj._setPropValue('immediate_view',view) The best I've managed to come up with to replace that is: from Products.CMFCore.utils

[Zope-CMF] Re: getActionById replacement

2005-10-21 Thread Chris Withers
yuppie wrote: listActionInfos() returns a tuple of ActionInfo objects, getActionInfo() the first ActionInfo that passes the checks. Note that ActionInfo is a dict, not the persistent Action object you need. Ah, okay, dunno how I ended up on that trail... 'action paths' are the unique identifi

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-20 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-20 Thread Chris Withers
Hi Yuppie! yuppie wrote: getActionInfo()[\'url\'] ...will net you a TypeError explaining that getActionInfo takes a argument that isn't supplied. Looking at the docs, an action_chain, but I have no idea what one of them is... 'action_chain' is a sequence of 'action paths'. Does supplying

[Zope-CMF] getActionById replacement

2005-10-20 Thread Chris Withers
Hi All, I'm trying to get Plone 2.1 to SFTU a bit more by shushing its deprecation warnings... Getting there but stumped as to what to do with their call to getActionById in CMFPlone/Portal.py... They use it to turn for example 'view' into 'base_view', but no non-deprecated way to do this

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-20 Thread Chris Withers
Tres Seaver wrote: Note that I have just figured out that we can make DeprecationWarnings more useful by passing the 'stacklevel' argument to 'warnings.warn'; passing a value of 2 for that argument causes the warning to be reported against the *caller* of the code issuing the warning, which makes

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-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] 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 ___ Zo

[Zope-CMF] Zope Debugger 0.8.1 Released!

2005-10-11 Thread Chris Withers
This release adds support for both Zope 2.7 and Zope 2.8. 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_t

[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 HE

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

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) portal.changeSkin(

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 get

[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

[Zope-CMF] zdb and FS Python Scripts

2005-09-23 Thread Chris Withers
Hi Tres, (and cmf people), I got zdb working on the plane back from the Plone conference by monkeypatching PythonScript._exec to fill pdb's linecache. However, I do the change in what gets stored in code.co_filename by monkeypatching PythonScript._compile. I just got bitten by this with a n

Re: [Zope-CMF] Re: CachingPolicyManager improvements

2005-09-13 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

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 featur

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 my

Re: [Zope-CMF] Re: xsl/xul and FSPageTemplate

2005-08-24 Thread Chris Withers
Tres Seaver wrote: Not sure if you've written this, but a general FSXMLTemplate (not just XSL) would be nice for the rendering of xml Page Templates. In particular the problem I've wrangled with is inserting dynamically the Where that really needs to be: Yup, we've all been there befor

Re: [Zope-CMF] Re: Another small plone related change

2005-07-20 Thread Chris Withers
Christian Heimes wrote: PS: Login on zope.org is borked. I had to login several times plus a hard reload of the site in order to log in. That's 'cos someone left a really crappy old version of Plone on there. Care to fix? ;-) Chris -- Simplistix - Content Management, Zope & Python Consulti

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

2005-06-03 Thread Chris Withers
Raphael Ritz wrote: Since you ask so explicitly ;-) I agree with Florent: Your site's _USERES_ should never get an error thrown at. Even if they're potentially destroying their own data as a result?! Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.s

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

2005-06-02 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 int

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: [CMF-checkins] CVS: Products/CMFCore - DirectoryView.py:1.47.2.7

2005-05-26 Thread Chris Withers
yuppie wrote: Can you please tell us *why* you hate it? warnings.warn is used in many places, so if there is a good reason not to use it other code should be changed as well. Well, personally, I find it opaque and useless, why isn't it just a log call? My personal hate of it comes from seei

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 Consu

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] Re: Bad interaction between CMF 1.4 and Zope 2.8 (catalog-getObject-raises)

2005-05-26 Thread Chris Withers
Dieter Maurer wrote: Yes, logging should be there. I'll add a LOG at level WARNING somewhere, I'm not sure where (after all it's unrestrictedTraverse that does the catching). When something in the catalog tells you, there were an object and the object is not locatable, then this is an ERROR an

Re: [Zope-CMF] CMF 1.4 + Zope 2.8

2005-05-26 Thread Chris Withers
Jens Vagelpohl wrote: in trying to make it run. The only holdout I know, Plone, has always been slow to recommend/ship new versions of underlying software. Amusing given the rediculously incompatible third point releases that the plone and collective people manage to come out with ;-) Chris

Re: [Zope-CMF] portal_actions condition

2005-05-26 Thread Chris Withers
cla wrote: I want to add a condition in some portal_tab that alows to show this or not,depending on the user name that is logged. that's faily evil. Why not bsaed on user permissions in context? sounds like it belongs in an action's goard or something. Urg, too long since I looked at these to

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

2005-05-23 Thread Chris Withers
Florent Guillaume wrote: +warn('DirectoryView %s refers to a non-existing path %s' + % (self.id, dirpath), UserWarning) Urg. I hate the warn module, anyone object if I change that to a normal logging call? cheers, Chris -- Simplistix - Content Management

[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 u

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

2005-04-21 Thread Chris Withers
Florent Guillaume wrote: Please read and understand the code more carefully. There is no expected error. reindexObjectSecurity (which I introduced more than 2 years ago because CMF was buggy without it) needs access to all subobjects to reindex them. To do that it has to: 1. use an unrestricted se

Re: [Zope-CMF] Expression context naming scheme - redux

2005-04-21 Thread Chris Withers
Jens Vagelpohl wrote: I am proposing to add a simple alias from "here" to "object" in the DCWorkflow expression context. Unlike the rest of CMF I don't want to call "here" deprecated, but at least introduce more consistency. Sort of semi-seriously, why isn't "context" used everywhere? cheers, Chr

Re: [Zope-CMF] Re: setSecurityProfile

2005-04-21 Thread Chris Withers
Florent Guillaume wrote: I can't say I care about it, sorry :) MemberDataTool is dead to me, only bits of the API remain :) I agree. It should probaly go away completely. I never understood the userfolder/membershiptool/memberdata tools trichotomy from day 1 of CMF... cheers, Chris -- Simplistix

Re: [Zope-CMF] CMF - PUT_factory - need help!

2005-04-21 Thread Chris Withers
Eugenio Grytsenko wrote: executed by default. I tried to overwrite this method by creating the "External Method" in the Plone site: That won't work since, as the error message tells you, there's already a PUT_factory there... I need to use a PUT_factory different from which CMFCore uses, becau

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

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

2005-04-20 Thread Chris Withers
Florent Guillaume wrote: It could raise Unauthorized because the current user is not allowed to access the returned object, which is the case if there are security restrictions lower in the object tree. Which is something you don't seem to grok. So why not just catch Unauthorized rather than maskin

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

2005-04-20 Thread Chris Withers
Tres Seaver wrote: Chris, you need to get off this hobby horse. Florent's fix was correct for the *new* model which has 'getObject' raising (a model you profess to *like*). Why not by catching the expected errors? Do you like bare try: except:'s? (since that's effectively what this is!) Bugs in

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

2005-04-20 Thread Chris Withers
Sidnei da Silva wrote: Specifically, in CMFCatalogAware.reindexObjectSecurity (recently introduced by Florent Guillaume if I recall), it assumes getObject() will return None in a failure. reindexObjectSecurity is as old as the hills to the best of my knowledge, what was it Florent introduced? M

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

2005-04-20 Thread Chris Withers
Florent Guillaume wrote: Specifically, in CMFCatalogAware.reindexObjectSecurity (recently introduced by Florent Guillaume if I recall), it assumes getObject() will return None in a failure. Yes, see http://www.zope.org/Collectors/CMF/337 which I'm about to fix. This is a bad fix IMNSHO :-( Why was

Re: [Zope-CMF] DirectoryView : ReadConflict Error

2005-04-20 Thread Chris Withers
Julien Anguenot wrote: Any idea about this ? CMF-1.5 HEAD / Zope-2.7.5 2005-04-14T16:44:03 INFO(0) ZODB conflict error at /VirtualHostBase/http/tana.dev:80/tana/VirtualHostRoot/portal_themes/tanaskins/backgrounds/LightGrayStripes2.gif (1 conflicts since startup at 2005-04-14T16:41:33) It reminds me

Re: [Zope-CMF] CMFSetup comments

2005-04-04 Thread Chris Withers
Florent Guillaume wrote: Chris Withers wrote: Sidnei da Silva wrote: > Look for CMFSetupExtensions on the collective. Why am I not suprised... Why couldn't this just have been fed into the real CMFSetup?! Actually this code is quite specialized (to Archetypes and other stuff), it does

Re: [Zope-CMF] CMFSetup comments

2005-04-04 Thread Chris Withers
Sidnei da Silva wrote: Look for CMFSetupExtensions on the collective. Why am I not suprised... Why couldn't this just have been fed into the real CMFSetup?! Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk __

Re: [Zope-CMF] FSZSQL Methods

2005-03-31 Thread Chris Withers
Andrew Veitch wrote: What's a connection hook when it's at home? I've got many MailManager instances that I want to connect to different databases. Normally you have to specify the database connection id in the zsql method, but the connection hook lets you define a method which returns a connect