[Zope3-dev] METAL 1.1 implemented, specification updated
The METAL 1.1 specification has been updated (though it's still marked as a draft, pending review), and the implementation has been completed on the Zope 3 trunk and backported to the Zope 3.1 branch. This would be a good time to review the specification and ask any questions that come up. I hope there's nothing outstanding that can't be handled by improving the documentation! -Fred -- Fred L. Drake, Jr.fdrake at gmail.com Zope Corporation ___ 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: [Zope3-checkins] SVN: Zope3/branches/tlotze/src/zope/interface/interface.py Simplifying some idioms, coding style.
Benji York wrote: Thomas Lotze wrote: Log message for revision 37985: Simplifying some idioms, coding style. Changed: U Zope3/branches/tlotze/src/zope/interface/interface.py -=- Modified: Zope3/branches/tlotze/src/zope/interface/interface.py === --- Zope3/branches/tlotze/src/zope/interface/interface.py 2005-08-18 07:12:23 UTC (rev 37984) +++ Zope3/branches/tlotze/src/zope/interface/interface.py 2005-08-18 07:57:37 UTC (rev 37985) @@ -33,12 +33,8 @@ def invariant(call): f_locals = sys._getframe(1).f_locals -tags = f_locals.get(TAGGED_DATA) -if tags is None: -tags = f_locals[TAGGED_DATA] = {} -invariants = tags.get('invariants') -if invariants is None: -invariants = tags['invariants'] = [] +tags = f_locals.setdefault(TAGGED_DATA, {}) +invariants = tags.setdefault('invariants', []) invariants.append(call) return _decorator_non_return I didn't review your entire check in (and I realize that this is on a branch), but the non-use of setdefault there was probably intentional to keep from constructing empty dicts and lists when they may not be used. Yup, although I doubt it matters much one way or the other. This function isn't called alot and setdefault is probably a little easier to read. 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] typos, English and German
Here are some typos I found during translating to Hungarian. There are some typos and also some logical errors: - zope.schema.Int field with default = *u'default'*. that should be I think zope.schema.Int field with default = *10*. - No interpreter named \${*lang_name*}\ was found. Ein Interpreter mit Namen \${*name*}\ wurde nicht gefunden. As I am not a native German, please don't blame me if the German ones are not OK. Some were picked by me, some by M$ Word. Please correct 'em as I don't have svn access. UTF-8 encoded file is attached. -- Best regards, Adam mailto:[EMAIL PROTECTED] -- Quote of the day: No matter what accomplishments you achieve, somebody helps you. - Althea Gibson English: #: src/zope/app/apidoc/ifacemodule/index.pt:297 A list of utilities that *are are* registered to provide this interface. #: src/zope/app/component/metadirectives.py:179 #: src/zope/app/component/metadirectives.py:252 This attribute *specifes* the interface the adapter instance must provide. #: src/zope/app/component/metadirectives.py:462 \n This argument says that this content class should be configured in the\n same way the specified class' security is. If this argument is\n *specifed*, no other argument can be used. #: src/zope/app/demo/widget/interfaces/intwidget.py:59 zope.schema.Int field with default = *u'default'*. #: src/zope/app/demo/widget/interfaces/textareawidget.py:74 zope.schema.Text field with *min_length* = 5 and max_length = 10 #: src/zope/app/dtmlpage/interfaces.py:35 The source of the *dtml* page. #: src/zope/app/exception/browser/notfound.pt:14 You might have misspelled the *url* #: src/zope/app/form/browser/add.py:65 #: src/zope/app/form/browser/editview.py:106 #: src/zope/app/form/browser/formview.py:75 #: src/zope/app/schema/browser/__init__.py:53 #: src/zope/app/schema/browser/__init__.py:64 #: src/zope/app/schema/browser/__init__.py:70 An error *occurred*. #: src/zope/app/pagelet/interfaces.py:150 Pagelets *registred* for context, request, view and slot. #: src/zope/app/pagelet/interfaces.py:169 Pagelet *registred* for context, request, view and slot. #: src/zope/app/pagelet/interfaces.py:185 Page data adapter *registred* for context, request and view. #: src/zope/app/pythonpage/browser.py:43 A syntax error *occurred*. #: src/zope/app/rdb/interfaces.py:390 Specify the DSN (Data Source Name) of the database. Examples include:\n \n dbi://dbname\n dbi://dbname;param1=value...\n dbi://user:passwd/dbname\n dbi://user:passwd/dbname;param1=value...\n dbi://user:[EMAIL PROTECTED]:port/dbname\n dbi://user:[EMAIL PROTECTED]:port/dbname;param1=value...\n \n All values should be *properlu* URL-encoded. #: src/zope/app/schemacontent/interfaces.py:52 If set to True, the system will create a local browser menu for you. If this option is set to False, the system will try to find the next site manager that has a menu with the *specifed* id. If no menu was found or the menu is a global menu, then an error is occurred. #: src/zope/app/security/browser/redirect.pt:15 If *you you* see this screen for more than 5 seconds, click here. #: src/zope/app/sqlscript/configure.zcml:23 #: src/zope/app/sqlscript/browser/configure.zcml:7 A content-based script to execute *dyanmic* SQL. #: src/zope/app/workflow/browser/importexport_index.pt:7 Import was *successfull*! English and German: #: src/zope/app/publisher/interfaces/browser.py:52 The id *uniquly* identifies this menu. Die *eineindeutige* Identifikation des Menüs. German: #: src/zope/app/authentication/browser/configure.zcml:37 New Pluggable Authentication Utility Registration Registrieren eines *Utlity* für die neue einhängbare Authentifizierung #: src/zope/app/component/browser/site_management.pt:18 Unique Utilities *Eineindeutige* Utilities #: src/zope/app/component/browser/site_management.pt:20 Unique utilities can only exist once per site manager and have no name. *Eineindeutige* Utilities können pro Webplatz-Verwalter nur einmal vorhanden sein und haben keinen Namen. #: src/zope/app/component/metadirectives.py:246 A callable object that handles events. Ein aufrufbares *Objekts*, das Ereignisse bearbeitet. #: src/zope/app/component/metadirectives.py:268 This subscriber is only available, if the principal has this permission. Der *Abonennt* ist nur verfügbar, wenn der Nutzungsberechtigte diese Berechtigung hat. #: src/zope/app/component/metadirectives.py:275 Make the subscriber a trusted subscriber\n \n Trusted subscribers have unfettered access to the objects they\n adapt. If asked to adapt security-proxied objects, then,\n rather than getting an unproxied subscriber of security-proxied\n objects, you get a security-proxied subscriber of unproxied\n objects.\n Macht den *Abonennten* zu einem vertrauenswürdigen Abonnenten\n \n Vertrauenswürdige Abonennten haben unbegrenzten
Re: [Zope3-dev] [i18n] help for 2 translations
On Aug 20, 2005, at 7:26 PM, Sebastien Douche wrote: Hi again, I will appreciate any help for these 2 msgids. Can somebody explain me ? - Food For Thought Another way of writing this idiom might be 'Things We Ought to Think About' or 'Questions for Later'. - Zope Stub Server Controller Let's see--grep tells me that the string is in ./src/zope/app/ applicationcontrol/browser/server-control.pt. A stub in this context is a short, incomplete version of something. Stub implies we need more. A similar title that does not have the same implication would be Zope Basic Server Controller. A server controller let's you control a server. In this case, the page lets you shut down or restart the Zope server. HTH Gary ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
[Zope3-dev] Iterating over InternalPrincipal results in an infinite loop.
Perhaps this is intended behaviour, but if you create an instance of InternalPrincipal, and then attempt to iterate over it, it will infinitely return None. The following code does the trick: from zope.app.authentication.principalfolder import InternalPrincipal joe = InternalPrincipal(joe, 123, Joe) for key in joe: print key It took me a while to track this down, and now that I know what it is, I'm sure I can work around it, but I thought it would be worth bringing up. Here is InternalPrincipal's __getitem__ def __getitem__(self, attr): if attr in ('title', 'description'): return getattr(self, attr) Alec Munro ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] XML Schema support on Zope3
Julien Anguenot wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I started to add an XML Schema suppport on Zope3. It's within the z3ecm repository there : http://svn.nuxeo.org/trac/pub/browser/z3lab/zope/xmlschema/trunk/ You may check my related blog entry there : http://blogs.nuxeo.com/sections/blogs/julien_anguenot/2005_08_12_xml_schema_support_for Note it's using lxml as well (I love lxml :)) Having XForms support after this will be a lot easier ;) Comments / help are welcome. This looks very interesting. Good work! Could you elaborate a bit on how you see this fitting in with XForms? Could you tell a bit of a story of how these schemas would be useful for XForms and for other forms processing? How hard do you think it will be to handle more complex constraints. You can express constraints in XSD beyond simple data types. (I'm not very knowledgeable about XSD, but I believe you can express the same sorts of constraints you can express with regular expressions in Python or, for numbers use expressions involving comparisons. These would have to be converted to Python. How will you deal with complex schemas? For example, can you imagine using something like the xpdl XSD as a schema? 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