Re: [Zope3-dev] Phantom of GadflyAdapter
On Tue, 13 Dec 2005 10:08:17 -0500 [EMAIL PROTECTED] wrote. On Tuesday 13 December 2005 09:54, Tadashi Matsumoto wrote: If you write a test for this, I'll check it in. I have made a test. It works well (perhaps). This test program is small, so I have attached in this mail. Tadashi Matsumoto [EMAIL PROTECTED] import os, shutil import tempfile, threading from unittest import TestCase, TestSuite, main, makeSuite from zope.app.rdb.gadflyda import GadflyAdapter, setGadflyRoot class GadflyTestBase(TestCase): def setUp(self): TestCase.setUp(self) self.tempdir = None def tearDown(self): TestCase.tearDown(self) if self.tempdir: shutil.rmtree(self.tempdir) setGadflyRoot() def getGadflyRoot(self): if not self.tempdir: self.tempdir = tempfile.mkdtemp('gadfly') setGadflyRoot(self.tempdir) return self.tempdir def _create(self, *args): return GadflyAdapter(*args) def exec_sql(adapter, sql, args, fetch=False): conn = adapter() cur =conn.cursor() cur.execute(sql, args) rows = [] if fetch: rows = cur.fetchall() conn.commit() return rows class TestPhantom(GadflyTestBase): def setUp(self): GadflyTestBase.setUp(self) dir = self.getGadflyRoot() os.mkdir(os.path.join(dir, demo)) self.adapter = self._create(dbi://demo) conn = self.adapter() cur = conn.cursor() cur.execute(create table t1 (name varchar)) conn.commit() def test_Phantom(self): adapter = self.adapter insert = insert into t1 values (?) select = select name from t1 delete = delete from t1 count = 0 for name in ('a', 'b', 'c'): t = threading.Thread(target=exec_sql, args=(adapter, insert, (name,))) t.start() t.join() rows = exec_sql(adapter, select, args=(), fetch=True) count += 1 self.assertEqual(len(rows), count) exec_sql(adapter, delete, args=()) t = threading.Thread(target=exec_sql, args=(adapter, delete, ())) t.start() t.join() rows = exec_sql(adapter, select, args=(), fetch=True) self.assertEqual(len(rows), 0) def test_suite(): return TestSuite(( makeSuite(TestPhantom), )) if __name__=='__main__': main(defaultTest='test_suite') ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Re: View lookup changes in Zope 3.2?
Jim Fulton wrote: Jeff Shell wrote: I understand why this is happening, but it's (obviously) not what I want to have happen. I want MY skin layer's declaration of 'contents.html' to win out. It actually works for all container types, so maybe I need to declare it for a root Zope container interface for my layer? I don't know enough about the relationshipd between your content interfaces, to comment directly, but I will note that the intent was that content interface would have precedence over skin. This was not the case before due to a bug in multi-adapter lookup. While I probably don't understand some details, this thread rather worries me. Imagine I'm writing my own custom skin 'IFoo', that has a page directive for the page 'index' for Zope's 'IContainer' (say), in a layer that's in the skin 'IFoo'. Now someone whose skin setting is set to IFoo is looking at IFolder, which is an IContainer. Zope registers a 'index' page specific for IFolder. Would now Zope's more specific registration win? How would I accomplish making a skin that takes care about overriding *all* IContainers without having to explicitly register for all sub-interfaces? Or am I wrong in even imagining this would be desirable? Regards, Martijn ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Interface implementation declaration weight (was Re: View lookup changes in Zope 3.2?)
Gary Poster wrote: I'm pretty sure there's a proposal on the wiki somewhere with Jim's full lookup algorithm that you want, but the iro for the pertinent object(s) usually gets me far enough. That might be the proposal you mentioned http://dev.zope.org/Zope3/ComponentArchitectureSimplification Regards, Dominik begin:vcard fn:Dominik Huber n:Huber;Dominik email;internet:[EMAIL PROTECTED] tel;work:++41 56 534 77 30 x-mozilla-html:FALSE version:2.1 end:vcard ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
[Zope3-dev] Certification: Twisted versus Zope / native HTTPS or Apache
Hi, giving recommendations about security, we advice everyone to put their communication on protected lines. E.g. use HTTPS. As we are targetting Zope 3.3, I think twisted can be the recommended configuration option for Zope to run with. How do you feel about the use of the HTTPS server of twisted instead of requiring the user to channel it through an external HTTPS server, e.g. apache? Christian -- gocept gmbh co. kg - schalaunische str. 6 - 06366 koethen - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 3496 30 99 112 - fax +49 3496 30 99 118 - zope and plone consulting and development signature.asc Description: This is a digitally signed message part ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Certification: Twisted versus Zope / native HTTPS or Apache
Christian Theune wrote: giving recommendations about security, we advice everyone to put their communication on protected lines. E.g. use HTTPS. As we are targetting Zope 3.3, I think twisted can be the recommended configuration option for Zope to run with. Agreed. How do you feel about the use of the HTTPS server of twisted instead of requiring the user to channel it through an external HTTPS server, e.g. apache? I wonder how Apache front-ends would work with a HTTPS backend; would that give rise to new issues in configuring Apache and Zope together? There's little experience in this domain, I expect. We'll have to see how things settle, but configuring Apache is familiar to many people and is knowledge that applies far and wide outside Zope, so I expect Apache frontends, also for HTTPS, will continue to be very important in Zope deployments in the forseeable future. Possibly off on a tangent: Twisted gets us out of the server business, but I don't want us to get into a situation where we're saying: Don't use this well-known Apache stuff that half the web is using! Use Twisted, something you never heard of before! Trust us, it's better!. Since we're not in the server business, we don't want to have to convince people that our server is better or whatever, or even make it very visible that it exists (ZServer isn't very visible to the outside as something Zope does, and I like it just fine that way). We use Twisted as it does the job, not because we're advocates that want to convince people to use it. So, I think Apache has its place in front of Twisted, just like Apache now has its place in front of ZServer. Regards, Martijn ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Certification: Twisted versus Zope / native HTTPS or Apache
On Dec 14, 2005, at 6:28 AM, Martijn Faassen wrote: Christian Theune wrote: How do you feel about the use of the HTTPS server of twisted instead of requiring the user to channel it through an external HTTPS server, e.g. apache? [...] So, I think Apache has its place in front of Twisted, just like Apache now has its place in front of ZServer. +1. IIUC, the C2 certification is configuration-dependent suggesting we work to get the most mainstream/popular config certified. -- Rob Page V: 540 361 1710 Zope Corporation F: 703 995 0412 ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Certification: Twisted versus Zope / native HTTPS or Apache
Hi, Am Mittwoch, den 14.12.2005, 06:39 -0500 schrieb Rob Page: On Dec 14, 2005, at 6:28 AM, Martijn Faassen wrote: So, I think Apache has its place in front of Twisted, just like Apache now has its place in front of ZServer. +1. IIUC, the C2 certification is configuration-dependent suggesting we work to get the most mainstream/popular config certified. Ok. So in favor of the mainstream (and trusted!) configuration, I'll go for using the standard Twisted/HTTP server in combination with a local Apache that provides SSL to the web browser. Fine with that. -- gocept gmbh co. kg - schalaunische str. 6 - 06366 koethen - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 3496 30 99 112 - fax +49 3496 30 99 118 - zope and plone consulting and development signature.asc Description: This is a digitally signed message part ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Certification: Twisted versus Zope / native HTTPS or Apache
Hi, Am Mittwoch, den 14.12.2005, 13:03 +0100 schrieb Christian Theune: Ok. So in favor of the mainstream (and trusted!) configuration, I'll go for using the standard Twisted/HTTP server in combination with a local Apache that provides SSL to the web browser. Actually that also means that I only will mention Apache as an additional add-on, because we do not want to certify the Apache setup itself. It will look like this: - Zope is only certified on using the HTTP server - You are required to use an encryption proxy in front of it, to ensure a trusted path to the user. - A famous proxy is Apache with a certain standard configuration. We can even show how the configuration will look like with Apache, but that very likely won't be certified as a secure Apache setup is totally out of our scope. Christian -- gocept gmbh co. kg - schalaunische str. 6 - 06366 koethen - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 3496 30 99 112 - fax +49 3496 30 99 118 - zope and plone consulting and development signature.asc Description: This is a digitally signed message part ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Certification: Support platforms different from Linux?
Hello Christian, Wednesday, December 14, 2005, 10:30:46 AM, you wrote: ... So my question is: Does anybody think it will be a problem for Zope beeing CC certified only on Linux? Cheers, Christian I'll say maybe a small survey should be done how many people are using other OS's. One more thing is that maybe you cannot force your next client to use linux. I think big companies are (were) devoted to M$ or maybe Solaris for high availability. Linux is getting into the picture slowly. This is the same as for the apache/twisted question that Martijn wrote Possibly off on a tangent in a previous mail. To get into the head of the big bosses you have to show them something they know. As I checked on www.commoncriteriaportal.org only the IBM WebSphere Application Server has CC certification. Of course they have a bigger founding to have CC for a lot of OS's. HTH -- Best regards, Adammailto:[EMAIL PROTECTED] -- Quote of the day: We do not err because truth is difficult to see. It is visible at a glance. We err because this is more comfortable. - Alexander Solzhenitsyn ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Certification: Support platforms different from Linux?
On Wed, Dec 14, 2005 at 01:13:04PM +0100, Adam Groszer wrote: One more thing is that maybe you cannot force your next client to use linux. I think big companies are (were) devoted to M$ or maybe Solaris for high availability. Linux is getting into the picture slowly. The company I work for (a major Dutch ISP) uses FreeBSD for high availability (but not yet for Zope hosting... working on that ;-) -- __ Nothing is as subjective as reality Reinoud van Leeuwen[EMAIL PROTECTED] http://www.xs4all.nl/~reinoud __ ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re[2]: [Zope3-dev] how to manipulate interfaces?
Hello Stephan, I'm just thinking about the following: IDocTypeEditForm = copy.deepcopy(IDocType) IDocTypeEditForm.getDescriptionFor('processDef').readonly=True what do you think about that? I'd like to keep it really simple and so reduce the opportunities of errors. Tuesday, December 13, 2005, 2:20:48 PM, you wrote: On Tuesday 13 December 2005 05:41, Adam Groszer wrote: IDocTypeEditForm.getDescriptionFor('processDef').readonly=True IDocType.getDescriptionFor('processDef').readonly True IDocTypeEditForm.getDescriptionFor('processDef').readonly True This is correct Python behavior. :-) If you want a refined field definition, you have to recreate the field. Regards, Stephan -- Best regards, Adammailto:[EMAIL PROTECTED] -- Quote of the day: Weiler's Law: Nothing is impossible for the man who does not have to do it himself. ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Re: rdb: Disappearing Connection
jürgen Kartnaller wrote: Without going much deeper into the way zope uses database connections. Wouldn't MySQL:Ping solve the reconnect Problem. That's what I used in my old C++ projects. Some kind of ensureConnected at the right place. Jürgen Thanks! I'll look into it. -Jim Washington ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Interface implementation declaration weight (was Re: View lookup changes in Zope 3.2?)
On Dec 14, 2005, at 4:56 AM, Dominik Huber wrote: Gary Poster wrote: I'm pretty sure there's a proposal on the wiki somewhere with Jim's full lookup algorithm that you want, but the iro for the pertinent object(s) usually gets me far enough. That might be the proposal you mentioned http://dev.zope.org/Zope3/ ComponentArchitectureSimplification Yes, looks like it. :-) Thanks Gary ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
[Zope3-dev] Re: Interface implementation declaration weight (was Re: View lookup changes in Zope 3.2?)
Jeff Shell wrote: On 12/13/05, Jim Fulton [EMAIL PROTECTED] wrote: Jeff Shell wrote: ... Going through a lot of debugging, it looks as through it has to do with how things are ranked in zope.interface.adapter.AdapterLookup.lookup() for multi-adapters. Yup. I don't know enough about the relationshipd between your content interfaces, to comment directly, but I will note that the intent was that content interface would have precedence over skin. This was not the case before due to a bug in multi-adapter lookup. I'm sure that's the issue here. The software worked fine in 3.1, or basically worked in a way that I assumed was fine. The situations where this is affecting us is in some of our oldest major Zope 3 code, and it's code we've had issues with before. Those issues, and this one, are likely due to it being early code and us (namely me) still learning a lot of core concepts and maybe not applying them so well. So I have a new question: with the different ways that 'implements' and 'provides' may be applied to an object, is there a document that details how those affect the interface/spec resolution order? I'm thinking of things like interface inheritance, class inheritance, ZCML's 'implements' directive, 'zope.interface.implements(IFoo)' in a Python class statement, and any interfaces said to be provided by a particular instance - how much weight does each method provide? I'll write up a discussion of this ans check it in. Feel free to nag me if I don't get this done in a couple of days. :) Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Re: View lookup changes in Zope 3.2?
Martijn Faassen wrote: Jim Fulton wrote: Jeff Shell wrote: I understand why this is happening, but it's (obviously) not what I want to have happen. I want MY skin layer's declaration of 'contents.html' to win out. It actually works for all container types, so maybe I need to declare it for a root Zope container interface for my layer? I don't know enough about the relationshipd between your content interfaces, to comment directly, but I will note that the intent was that content interface would have precedence over skin. This was not the case before due to a bug in multi-adapter lookup. While I probably don't understand some details, this thread rather worries me. Imagine I'm writing my own custom skin 'IFoo', that has a page directive for the page 'index' for Zope's 'IContainer' (say), in a layer that's in the skin 'IFoo'. Now someone whose skin setting is set to IFoo is looking at IFolder, which is an IContainer. Zope registers a 'index' page specific for IFolder. Would now Zope's more specific registration win? Yes. How would I accomplish making a skin that takes care about overriding *all* IContainers without having to explicitly register for all sub-interfaces? You can't currently. Or am I wrong in even imagining this would be desirable? I think so. If there are custom views for more specific interfaces, it is likely those custom views provide features that your generic view doesn't. It would be a bit unkind for your view to override those. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Certification: Support platforms different from Linux?
Christian Theune wrote: Hi, although Zope runs on platforms different than Linux, we'll have a hard time to certify it on multiple platforms. Usually a very specific system configuration is given, like Windows 2003 with Service Pack XY and Hotfixes A, B and C. I think we can get around that by making a small amount of assumptions on the Linux kernel (e.g. large file support, memory, newer than 2.X.Y) and don't go into distribution details. Additionally I'll describe the source installation as the certified way of installing Zope, so we won't be depending on any kind of package machinery. So my question is: Does anybody think it will be a problem for Zope beeing CC certified only on Linux? Yes. The customers of ours most likely to care about this use Windows. I would say in general, for better or worse, the decision makers who would care about CC would also care about Windows. I suspect that the decision makers who care about linux would me likely to understand that the platform doesn't matter that much and that certification for Windows should make them feel warm and fuzzy about their Linux installations. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
[Zope3-dev] Re: Death to IContentContainer
Hi, I've removed the references to IContentContainer within the trunk and deprecate the IContentContainer interface. There's a last reference within /home/zopes/Zope3/src/zope/app/workflow/stateful/browser/configure.zcml There's another important last reference within zope.app.container.browser.configure.zcml view for=zope.app.container.interfaces.IContentContainer name=+ menu=zmi_actions title=Add class=zope.app.container.browser.adding.ContentAdding permission=zope.ManageContent allowed_attributes=addingInfo isSingleMenuItem hasCustomAddView page name=index.html template=add.pt / page name=action.html attribute=action / /view It should be fixed by view for=zope.app.container.interfaces.IWriteContainer Stefan Martin ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Certification: Support platforms different from Linux?
Hi, Am Mittwoch, den 14.12.2005, 10:47 -0500 schrieb Jim Fulton: Yes. The customers of ours most likely to care about this use Windows. I would say in general, for better or worse, the decision makers who would care about CC would also care about Windows. I suspect that the decision makers who care about linux would me likely to understand that the platform doesn't matter that much and that certification for Windows should make them feel warm and fuzzy about their Linux installations. I see that point. As Adam pointed out, there was a certification of websphere last year and the security target is publicly available. I'm currently reading the MS Exchange evaluation and IBM WebSphere evaluation and see that with a certain argumentation about our virtualized platform (Python) we can make the operating system irrelevant. Still, the TUV does have to approve that strategy. (They'll be able to answer in January but that's not a problem right now, as this week I'm still mostly gathering information and preparing the larger changes.) Thank you very much for the input, Christian -- gocept gmbh co. kg - schalaunische str. 6 - 06366 koethen - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 3496 30 99 112 - fax +49 3496 30 99 118 - zope and plone consulting and development signature.asc Description: This is a digitally signed message part ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
[Zope3-dev] File is not Contained
Hi, after having posted this to what I guess is the wrong list (all hail gmane group names...) and having received no answer, I'll repost it here: I noticed that zope.app.file.File does not inherit from zope.app.container.contained.Contained. This does not stop a file from, e.g., getting added to a folder (and the File type does appear in the ZMI add menu). It does, however, stop you from getting at the File's parent. Currently, File cannot be used as a proper content type, though it looks like it is supposed to be one. IMO File should inherit from Contained; am I wrong for some reason, or is this an issue that should be fixed? If the latter, I'd look into it. -- Thomas ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
[Zope3-dev] buildbot failure in Zope3 trunk 2.4 Windows 2000 fred-win
The Buildbot has detected a failed build of Zope3 trunk 2.4 Windows 2000 fred-win. Buildbot URL: http://buildbot.zope.org/ Build Reason: The web-page 'force build' button was pressed by '': Build Source Stamp: None Blamelist: BUILD FAILED: failed test sincerely, -The Buildbot ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
[Zope3-dev] buildbot failure in Zope3 branches Zope-3.1 2.4 Windows 2000 zc-bbwin
The Buildbot has detected a failed build of Zope3 branches Zope-3.1 2.4 Windows 2000 zc-bbwin. Buildbot URL: http://buildbot.zope.org/ Build Reason: The web-page 'force build' button was pressed by '': Build Source Stamp: None Blamelist: BUILD FAILED: failed svn sincerely, -The Buildbot ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
[Zope3-dev] buildbot failure in Zope3 branches 3.2 2.4 Windows 2000 zc-bbwin
The Buildbot has detected a failed build of Zope3 branches 3.2 2.4 Windows 2000 zc-bbwin. Buildbot URL: http://buildbot.zope.org/ Build Reason: The web-page 'force build' button was pressed by '': Build Source Stamp: None Blamelist: BUILD FAILED: failed svn sincerely, -The Buildbot ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com