[Zope-dev] Adding resource in z3c.pt
Hi all, Can anybody tell me how can i add resource by using z3c.pt. i know how to add it by using zope.pagetemplate, i tried it and it was working well. The following is the code i am working with and it was not working with z3c.pt *configure.zcml:- . . *adapter factory=.resizing_font.form_template for=.resizing_font.ResizingFont name=tatr_css_js.form / * *browser:resourceDirectory name=tatr_js directory=tatr_resource_js / * . . . resizing_font.pt :- *html* * head script type=text/javascript src=jquery-1.2.6.js tal:attributes=src context/++resource++tatr_js/jquery-1.2.6.js /script /head body This is a test :) /body /html* resizing_font.py :- *from z3c.pt.pagetemplate import ViewPageTemplateFile* *class ResizingFont(FormBase): template = NamedTemplate('tatr_css_js.form') form_fields=[] def __init__(self,context,request): self.request=request self.context=context form_template = NamedTemplateImplementation( ViewPageTemplateFile('resizing_font.pt')) *While running with this code i am getting the error *2008-10-14T06:14:36 ERROR SiteError http://192.168.0.43:8080/resizing_font.html Traceback (most recent call last): File /home/z3.4/lib/python/zope/publisher/publish.py, line 133, in publish result = publication.callObject(request, obj) File /home/z3.4/lib/python/zope/app/publication/zopepublication.py, line 167, in callObject return mapply(ob, request.getPositionalArguments(), request) File /home/z3.4/lib/python/zope/publisher/publish.py, line 108, in mapply return debug_call(obj, args) - __traceback_info__: security proxied zope.app.publisher.browser.viewmeta.ResizingFont instance at 0x98deeac File /home/z3.4/lib/python/zope/publisher/publish.py, line 114, in debug_call return obj(*args) File /home/z3.4/lib/python/zope/formlib/form.py, line 774, in __call__ return self.render() File /home/z3.4/lib/python/zope/formlib/form.py, line 768, in render self.form_result = self.template() File /home/z3.4/lib/python/z3c/pt/pagetemplate.py, line 40, in render return template.render(**parameters) File /home/z3.4/lib/python/chameleon/zpt/template.py, line 51, in render return super(PageTemplateFile, self).render(**kwargs) File /home/z3.4/lib/python/chameleon/core/template.py, line 156, in render return super(TemplateFile, self).render(**kwargs) File /home/z3.4/lib/python/chameleon/core/template.py, line 62, in render template = self.cook_check(parameters=kwargs) File /home/z3.4/lib/python/chameleon/core/template.py, line 152, in cook_check return Template.cook_check(self, **kwargs) File /home/z3.4/lib/python/chameleon/core/template.py, line 57, in cook_check template = self.cook(parameters=parameters, **kwargs) File /home/z3.4/lib/python/chameleon/core/template.py, line 138, in cook template = self.compiler(**kwargs) File /home/z3.4/lib/python/chameleon/core/translation.py, line 597, in __call__ self.root.start(stream) File /home/z3.4/lib/python/chameleon/core/translation.py, line 438, in startself.node.visit() File /home/z3.4/lib/python/chameleon/core/translation.py, line 107, in visitself.body() File /home/z3.4/lib/python/chameleon/core/translation.py, line 92, in body element.node.visit() File /home/z3.4/lib/python/chameleon/core/translation.py, line 107, in visitself.body() File /home/z3.4/lib/python/chameleon/core/translation.py, line 92, in body element.node.visit() File /home/z3.4/lib/python/chameleon/core/translation.py, line 107, in visitself.body() File /home/z3.4/lib/python/chameleon/core/translation.py, line 92, in body element.node.visit() File /home/z3.4/lib/python/chameleon/core/translation.py, line 106, in visitself.begin() File /home/z3.4/lib/python/chameleon/core/translation.py, line 72, in begin self.stream.begin(self.serialize()) File /home/z3.4/lib/python/chameleon/core/translation.py, line 174, in serialize dynamic_attrs = self.dynamic_attributes or () File /home/z3.4/lib/python/chameleon/zpt/language.py, line 74, in dynamic_attributes if self.element.tal_attributes is not None: File /home/z3.4/lib/python/chameleon/core/utils.py, line 52, in get return f(value) File /home/z3.4/lib/python/chameleon/zpt/expressions.py, line 236, in definitions raise e SyntaxError: Not a valid path-expression. 192.168.0.43 - - [14/Oct/2008:06:14:36 +] GET /resizing_font.html HTTP/1.1 500 84 http://192.168.0.43:8080/; Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16) Gecko/20080702 Iceweasel/2.0.0.16(Debian-2.0.0.16-0etch1) Thanks in advance :) * * ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
Re: [Zope-dev] Adding resource in z3c.pt
Previously Binseer N wrote: Hi all, Can anybody tell me how can i add resource by using z3c.pt. i know how to add it by using zope.pagetemplate, i tried it and it was working well. The following is the code i am working with and it was not working with z3c.pt *configure.zcml:- . . *adapter factory=.resizing_font.form_template for=.resizing_font.ResizingFont name=tatr_css_js.form / * *browser:resourceDirectory name=tatr_js directory=tatr_resource_js / * . . . resizing_font.pt :- *html* * head script type=text/javascript src=jquery-1.2.6.js tal:attributes=src context/++resource++tatr_js/jquery-1.2.6.js /script /head body This is a test :) /body /html* Try adding a trailing ; after your TALES expression. Wichert. -- Wichert Akkerman [EMAIL PROTECTED]It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Adding resource in z3c.pt
2008/10/14 Wichert Akkerman [EMAIL PROTECTED] Previously Binseer N wrote: Hi all, Can anybody tell me how can i add resource by using z3c.pt. i know how to add it by using zope.pagetemplate, i tried it and it was working well. The following is the code i am working with and it was not working with z3c.pt *configure.zcml:- . . *adapter factory=.resizing_font.form_template for=.resizing_font.ResizingFont name=tatr_css_js.form / * *browser:resourceDirectory name=tatr_js directory=tatr_resource_js / * . . . resizing_font.pt :- *html* * head script type=text/javascript src=jquery-1.2.6.js tal:attributes=src context/++resource++tatr_js/jquery-1.2.6.js /script /head body This is a test :) /body /html* Try adding a trailing ; after your TALES expression. Wichert. -- Wichert Akkerman [EMAIL PROTECTED]It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. Thank you for the reply Wichert. Do you mean i have to add ; after the TAL expression . I tried so but the result is same . Initially i tried with the following code , but it fired the same error ie script type=text/javascript src=jquery-1.2.6.js tal:attributes=src context/++resource++tatr_js/jquery-1.2.6.js; then i tried with the following script type=text/javascript src=jquery-1.2.6.js tal:attributes=src context++resource++tatr_jsjquery-1.2.6.js; /script it fired the error 2008-10-14T11:45:52 ERROR SiteError http://192.168.0.43:8080/resizing_font.html Traceback (most recent call last): File /home/z3.4/lib/python/zope/publisher/publish.py, line 133, in publish result = publication.callObject(request, obj) File /home/z3.4/lib/python/zope/app/publication/zopepublication.py, line 167, in callObject return mapply(ob, request.getPositionalArguments(), request) File /home/z3.4/lib/python/zope/publisher/publish.py, line 108, in mapply return debug_call(obj, args) - __traceback_info__: security proxied zope.app.publisher.browser.viewmeta.ResizingFont instance at 0x9913d6c File /home/z3.4/lib/python/zope/publisher/publish.py, line 114, in debug_call return obj(*args) File /home/z3.4/lib/python/zope/formlib/form.py, line 774, in __call__ return self.render() File /home/z3.4/lib/python/zope/formlib/form.py, line 768, in render self.form_result = self.template() File /home/z3.4/lib/python/z3c/pt/pagetemplate.py, line 40, in render return template.render(**parameters) File /home/z3.4/lib/python/chameleon/zpt/template.py, line 51, in render return super(PageTemplateFile, self).render(**kwargs) File /home/z3.4/lib/python/chameleon/core/template.py, line 156, in render return super(TemplateFile, self).render(**kwargs) File /home/z3.4/lib/python/chameleon/core/template.py, line 62, in render template = self.cook_check(parameters=kwargs) File /home/z3.4/lib/python/chameleon/core/template.py, line 152, in cook_check return Template.cook_check(self, **kwargs) File /home/z3.4/lib/python/chameleon/core/template.py, line 57, in cook_check template = self.cook(parameters=parameters, **kwargs) File /home/z3.4/lib/python/chameleon/core/template.py, line 138, in cook template = self.compiler(**kwargs) File /home/z3.4/lib/python/chameleon/core/template.py, line 46, in compiler encoding=self.encoding) File /home/z3.4/lib/python/chameleon/core/translation.py, line 517, in __init__ self.root, parsed_doctype = parser.parse(body) File /home/z3.4/lib/python/chameleon/zpt/language.py, line 250, in parse root, doctype = super(Parser, self).parse(body) File /home/z3.4/lib/python/chameleon/core/etree.py, line 39, in parse return parse(body, self.element_mapping) File /home/z3.4/lib/python/chameleon/core/etree.py, line 202, in parse tree = lxml.etree.parse(StringIO(body), parser) File lxml.etree.pyx, line 2576, in lxml.etree.parse (src/lxml/lxml.etree.c:22796) File parser.pxi, line 1483, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:60359) File parser.pxi, line 1511, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:60613) File parser.pxi, line 1390, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:59530) File parser.pxi, line 932, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:56815) File parser.pxi, line 538, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:53512) File parser.pxi, line 624, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:54372) File parser.pxi, line 564, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:53770) XMLSyntaxError: attributes construct error, line 12, column 16 ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev **
[Zope-dev] Zope3 tree not buildable with Python 2.4?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 In a fresh checkout of the Zope3 tree: $ make clean $ make fails with a compile error in src/zope/app/container/_zope_app_container.c: - -- gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall - -Wstrict-prototypes -fPIC -Isrc/zope/app/container -Ibuild/include-2.4 - -I/home/tseaver/projects/Zope-CVS/include/python2.4 -c src/zope/app/container/_zope_app_container_contained.c -o build/temp.linux-i686-2.4/src/zope/app/container/_zope_app_container_contained.o In file included from src/zope/app/container/_zope_app_container_contained.c:64: src/zope/app/container/_zope_proxy_proxy.c:616: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wrap_length’ src/zope/app/container/_zope_proxy_proxy.c:622: error: expected declaration specifiers or ‘...’ before ‘Py_ssize_t’ src/zope/app/container/_zope_proxy_proxy.c:622: error: expected declaration specifiers or ‘...’ before ‘Py_ssize_t’ ... - -- It appears to be a bug in the way the Python 2.5 compatibility was added: if I revert _zope_proxy_proxy.c to the prior revision, it then builds with python2.4, and the tests run (but blow up later): - $ cd src/zope/app/container/ $ svn merge -c -88350 _zope_proxy_proxy.c U_zope_proxy_proxy.c $ cd - $ make test_inplace ftest_inplace ... Running zope.app.http.testing.AppHttpLayer tests: Tear down zope.app.generations.testing.GenerationsLayer Traceback (most recent call last): File test.py, line 61, in ? result = testrunner.run(defaults) File /home/tseaver/projects/Zope-CVS/Zope3-trunk/src/zope/testing/testrunner/__init__.py, line 33, in run runner.run() File /home/tseaver/projects/Zope-CVS/Zope3-trunk/src/zope/testing/testrunner/runner.py, line 134, in run self.run_tests() File /home/tseaver/projects/Zope-CVS/Zope3-trunk/src/zope/testing/testrunner/runner.py, line 214, in run_tests setup_layers, self.failures, self.errors) File /home/tseaver/projects/Zope-CVS/Zope3-trunk/src/zope/testing/testrunner/runner.py, line 354, in run_layer tear_down_unneeded(options, needed, setup_layers) File /home/tseaver/projects/Zope-CVS/Zope3-trunk/src/zope/testing/testrunner/runner.py, line 510, in tear_down_unneeded l.tearDown() File /home/tseaver/projects/Zope-CVS/Zope3-trunk/src/zope/app/testing/functional.py, line 340, in tearDown self.setup.tearDownCompletely() File /home/tseaver/projects/Zope-CVS/Zope3-trunk/src/zope/app/testing/functional.py, line 300, in tearDownCompletely assert self.dbstack == [] AssertionError make: *** [test_inplace] Error 1 - - Where is this supposed to be tested? If the tree is no longer supposed to be buildable, then let's change the docs and setup.py to point that out. Tres. - -- === Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFI9JjV+gerLs4ltQ4RArBsAKCTVtPrpk7MZPbGQRSOd5Tq9+X0CQCeNxY4 WfEMKccymSaHa2BM+T3T68Y= =bEHb -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] SVN: Zope/branches/gsoc-python-2.5/utilities/mkzopeinstance.py sha - hashlib
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andreas Jung wrote: Log message for revision 92197: sha - hashlib That needs to be a conditional import, with a fallback to the old sha module: hashlib is not present in python 2.4. E.g.: try: import hashlib except ImportError: # Python 2.5 import sha _sha = sha.new else: _sha = hashlib.sha1 and then use '_sha' in the code. Tres. - -- === Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFI9NDv+gerLs4ltQ4RAuAuAJ9KX9WaftLbd1rQwCJ+JVNnA5QAeQCfTNjw cq+cees5SixBxFY5J2SS3FI= =PmQk -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] SVN: Zope/branches/gsoc-python-2.5/utilities/mkzopeinstance.py sha - hashlib
On 14.10.2008 19:03 Uhr, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andreas Jung wrote: Log message for revision 92197: sha - hashlib That needs to be a conditional import, with a fallback to the old sha module: hashlib is not present in python 2.4. E.g.: try: import hashlib except ImportError: # Python 2.5 import sha _sha = sha.new else: _sha = hashlib.sha1 and then use '_sha' in the code. Depends on which Python versions we want/must support for the future. One option would to jump on Python 2.6 for the next releases (skipping Python 2.5 and dropping Python 2.4 support). Andreas begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:[EMAIL PROTECTED] title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Upcoming Zope 2.9-2.11 release
Hi there, I intended to work on new releases for Zope 2.9 - 2.11 starting next weekend. If there are any pending fixes I am not aware of, please let me know. Andreas begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:[EMAIL PROTECTED] title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Zope 2.12 - supported Python versions
Andreas Jung wrote: Depends on which Python versions we want/must support for the future. One option would to jump on Python 2.6 for the next releases (skipping Python 2.5 and dropping Python 2.4 support). Just as a voice from the Plone crowd. With our current planned roadmap we won't move to Zope 2.12 / trunk until sometime next year at the earliest. A hard requirement of Python 2.6 would be fine with us. Hanno ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Zope 2.12 - supported Python versions
On 14.10.2008 19:12 Uhr, Hanno Schlichting wrote: Andreas Jung wrote: Depends on which Python versions we want/must support for the future. One option would to jump on Python 2.6 for the next releases (skipping Python 2.5 and dropping Python 2.4 support). Just as a voice from the Plone crowd. With our current planned roadmap we won't move to Zope 2.12 / trunk until sometime next year at the earliest. A hard requirement of Python 2.6 would be fine with us. Thanks for starting the discussion. Going for Python 2.6 also requires that we get the ZCA running on top of Python 2.6 until some time next year. Andreas begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:[EMAIL PROTECTED] title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Zope 2.12 - supported Python versions
On Tue, Oct 14, 2008 at 2:16 PM, Andreas Jung [EMAIL PROTECTED] wrote: Thanks for starting the discussion. Going for Python 2.6 also requires that we get the ZCA running on top of Python 2.6 until some time next year. FWIW, that's what I've been working on. There's enough of the the ZCA working on Python 2.6 to run Zope 2. Would anything else be needed? I would say we are pretty much done as far as Zope 2 is concerned. -- Sidnei da Silva Enfold Systemshttp://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214 ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Zope 2.12 - supported Python versions
On 14.10.2008 19:56 Uhr, Sidnei da Silva wrote: On Tue, Oct 14, 2008 at 2:16 PM, Andreas Jung[EMAIL PROTECTED] wrote: Thanks for starting the discussion. Going for Python 2.6 also requires that we get the ZCA running on top of Python 2.6 until some time next year. FWIW, that's what I've been working on. There's enough of the the ZCA working on Python 2.6 to run Zope 2. Would anything else be needed? not sure I would say we are pretty much done as far as Zope 2 is concerned. Cool. Thanks for your efforts and the guys working on this GSOC project. Andreas -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535 Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK E-Publishing, Python, Zope Plone development, Consulting begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:[EMAIL PROTECTED] title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] [z3c_pt] Adding resource in z3c.pt
2008/10/14 Binseer N [EMAIL PROTECTED]: Hi all, Can anybody tell me how can i add resource by using z3c.pt. i know how to add it by using zope.pagetemplate, i tried it and it was working well. The following is the code i am working with and it was not working with z3c.pt There is a bug in z3c.pt that disallows '+' in a path-expression. I'll fix that. \malthe ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Zope Tests: 3 OK, 2 Unknown
Summary of messages to the zope-tests list. Period Mon Oct 13 11:00:00 2008 UTC to Tue Oct 14 11:00:00 2008 UTC. There were 5 messages: 5 from Zope Tests. Unknown --- Subject: UNKNOWN : Zope-2.11 Python-2.4.4 : Linux From: Zope Tests Date: Mon Oct 13 20:56:33 EDT 2008 URL: http://mail.zope.org/pipermail/zope-tests/2008-October/010313.html Subject: UNKNOWN : Zope-trunk Python-2.4.4 : Linux From: Zope Tests Date: Mon Oct 13 20:58:03 EDT 2008 URL: http://mail.zope.org/pipermail/zope-tests/2008-October/010314.html Tests passed OK --- Subject: OK : Zope-2.8 Python-2.3.6 : Linux From: Zope Tests Date: Mon Oct 13 20:52:02 EDT 2008 URL: http://mail.zope.org/pipermail/zope-tests/2008-October/010310.html Subject: OK : Zope-2.9 Python-2.4.4 : Linux From: Zope Tests Date: Mon Oct 13 20:53:33 EDT 2008 URL: http://mail.zope.org/pipermail/zope-tests/2008-October/010311.html Subject: OK : Zope-2.10 Python-2.4.4 : Linux From: Zope Tests Date: Mon Oct 13 20:55:03 EDT 2008 URL: http://mail.zope.org/pipermail/zope-tests/2008-October/010312.html ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Relative Imports: PEP-328
FWIW, I've done that now. On Wed, Oct 8, 2008 at 9:43 AM, Philipp von Weitershausen [EMAIL PROTECTED] wrote: El 8 Oct 2008, a las 14:23 , Sidnei da Silva escribió: On Wed, Oct 8, 2008 at 8:53 AM, Philipp von Weitershausen [EMAIL PROTECTED] wrote: Sidnei da Silva wrote: I'm trying to fix some import errors, which seem to be related to PEP-328. I'm fixing those errors this way, though I don't know if that's the recommended way of fixing it. Thoughts? try: from DT_Util import parse_params, name_param except ImportError: # See PEP-328 from .DT_Util import parse_params, name_param This will generate a SyntaxError in Python 2.4. So unless we *require* Python = 2.5, this won't work. Yuck. I hadn't thought of that. Any other suggestions? Like, using zope.documenttemplate? :) zope.documenttemplate is a crippled version of DocumentTemplate. It doesn't have all features (e.g. it lacks the C extension module) and hasn't been kept up-to-date with respect to bugfixes. So it seems like a good idea to put this clone out of its misery and retire it. I ultimately suggest going to absolute imports everywhere (at least as long as we have to maintain Python 2.4 compatibility). I realize that DocumentTemplate/DocumentTemplate.py creates a problem. So here's what I suggest: 1. Rename DocumentTemplate/DocumentTemplate.py to, say, DocumentTemplate/DocTemplate.py (feel free to come up with a better name) 2. Introduce absolute imports to DocumentTemplate.DocTemplate everywhere 3. Ensure backwards compatibility by adding the following lines to DocumentTemplate/__init__.py:: import DocumentTemplate.DocTemplate import sys sys.modules['DocumentTemplate.DocumentTemplate'] = DocumentTemplate.DocTemplate I *think* this should work. -- Sidnei da Silva Enfold Systemshttp://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214 ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )