[Zope-Checkins] SVN: Zope/trunk/src/ZPublisher/BaseResponse.py Replace a left-over has_key with in operator.
Log message for revision 122165: Replace a left-over has_key with in operator. Changed: U Zope/trunk/src/ZPublisher/BaseResponse.py -=- Modified: Zope/trunk/src/ZPublisher/BaseResponse.py === --- Zope/trunk/src/ZPublisher/BaseResponse.py 2011-07-13 08:40:38 UTC (rev 122164) +++ Zope/trunk/src/ZPublisher/BaseResponse.py 2011-07-13 09:20:32 UTC (rev 122165) @@ -69,7 +69,7 @@ cookie in the Response object. ''' cookies = self.cookies -if cookies.has_key(name): +if name in cookies: cookie = cookies[name] else: cookie = cookies[name] = {} ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.13/ Restore ability to undo multiple transactions from the ZMI.
Log message for revision 122167: Restore ability to undo multiple transactions from the ZMI. Changed: U Zope/branches/2.13/doc/CHANGES.rst U Zope/branches/2.13/src/App/Undo.py -=- Modified: Zope/branches/2.13/doc/CHANGES.rst === --- Zope/branches/2.13/doc/CHANGES.rst 2011-07-13 09:28:26 UTC (rev 122166) +++ Zope/branches/2.13/doc/CHANGES.rst 2011-07-13 09:31:48 UTC (rev 122167) @@ -8,6 +8,15 @@ 2.13.9 (unreleased) --- +Bugs Fixed +++ + +- Restore ability to undo multiple transactions from the ZMI by using the + `undoMultiple` API. Backported from trunk (r122087). + +Features Added +++ + - Updated distributions: - Products.ZCatalog = 2.13.15 Modified: Zope/branches/2.13/src/App/Undo.py === --- Zope/branches/2.13/src/App/Undo.py 2011-07-13 09:28:26 UTC (rev 122166) +++ Zope/branches/2.13/src/App/Undo.py 2011-07-13 09:31:48 UTC (rev 122167) @@ -132,15 +132,16 @@ def manage_undo_transactions(self, transaction_info=(), REQUEST=None): -undo=self._p_jar.db().undo - +tids = {} for tid in transaction_info: -tid=tid.split() +tid = tid.split() if tid: -transaction.get().note(Undo %s % ' '.join(tid[1:])) -tid=decode64(tid[0]) -undo(tid) +tids[decode64(tid[0])] = tid[-1] +if tids: +transaction.get().note(Undo %s % ' '.join(tids.values())) +self._p_jar.db().undoMultiple(tids.keys()) + if REQUEST is None: return REQUEST['RESPONSE'].redirect(%s/manage_UndoForm % REQUEST['URL1']) ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/src/OFS/ Stop using id() methods and define proper getId methods
Log message for revision 122198: Stop using id() methods and define proper getId methods Changed: U Zope/trunk/src/OFS/Application.py U Zope/trunk/src/OFS/Image.py U Zope/trunk/src/OFS/SimpleItem.py U Zope/trunk/src/OFS/tests/testApplication.py -=- Modified: Zope/trunk/src/OFS/Application.py === --- Zope/trunk/src/OFS/Application.py 2011-07-13 18:28:45 UTC (rev 122197) +++ Zope/trunk/src/OFS/Application.py 2011-07-13 18:32:05 UTC (rev 122198) @@ -82,7 +82,7 @@ self.__allow_groups__ = uf self._setObject('acl_users', uf) -def id(self): +def getId(self): try: return self.REQUEST['SCRIPT_NAME'][1:] except (KeyError, TypeError): Modified: Zope/trunk/src/OFS/Image.py === --- Zope/trunk/src/OFS/Image.py 2011-07-13 18:28:45 UTC (rev 122197) +++ Zope/trunk/src/OFS/Image.py 2011-07-13 18:32:05 UTC (rev 122198) @@ -141,9 +141,6 @@ content_type=self._get_content_type(file, data, id, content_type) self.update_data(data, content_type, size) -def id(self): -return self.__name__ - def _if_modified_since_request_handler(self, REQUEST, RESPONSE): # HTTP If-Modified-Since header handling: return True if # we can handle this request by returning a 304 response Modified: Zope/trunk/src/OFS/SimpleItem.py === --- Zope/trunk/src/OFS/SimpleItem.py2011-07-13 18:28:45 UTC (rev 122197) +++ Zope/trunk/src/OFS/SimpleItem.py2011-07-13 18:32:05 UTC (rev 122198) @@ -91,7 +91,7 @@ manage_afterClone.__five_method__ = True # Direct use of the 'id' attribute is deprecated - use getId() -id='' +id = '' security.declarePublic('getId') def getId(self): @@ -100,17 +100,13 @@ This method should be used in preference to accessing an id attribute of an object directly. The getId method is public. -name=getattr(self, 'id', None) -if callable(name): -return name() +name = self.id if name is not None: return name -if hasattr(self, '__name__'): -return self.__name__ -raise AttributeError, 'This object has no id' +return self.__name__ # Alias id to __name__, which will make tracebacks a good bit nicer: -__name__=ComputedAttribute(lambda self: self.getId()) +__name__ = ComputedAttribute(lambda self: self.id) # Meta type used for selecting all objects of a given type. meta_type='simple item' @@ -377,7 +373,6 @@ class Item_w__name__(Item): - Mixin class to support common name/id functions implements(IItemWithName) @@ -411,12 +406,10 @@ getPhysicalRoot() and getPhysicalPath() are designed to operate together. -path = (self.__name__,) - +path = (self.__name__, ) p = aq_parent(aq_inner(self)) if p is not None: path = p.getPhysicalPath() + path - return path Modified: Zope/trunk/src/OFS/tests/testApplication.py === --- Zope/trunk/src/OFS/tests/testApplication.py 2011-07-13 18:28:45 UTC (rev 122197) +++ Zope/trunk/src/OFS/tests/testApplication.py 2011-07-13 18:32:05 UTC (rev 122198) @@ -29,17 +29,17 @@ def test_id_no_request(self): app = self._makeOne() -self.assertEqual(app.id(), 'Zope') +self.assertEqual(app.getId(), 'Zope') def test_id_w_request_no_SCRIPT_NAME(self): app = self._makeOne() app.REQUEST = {} -self.assertEqual(app.id(), 'Zope') +self.assertEqual(app.getId(), 'Zope') def test_id_w_request_w_SCRIPT_NAME(self): app = self._makeOne() app.REQUEST = {'SCRIPT_NAME': '/Dummy'} -self.assertEqual(app.id(), 'Dummy') +self.assertEqual(app.getId(), 'Dummy') def test_title_and_id_plus_title_or_id(self): app = self._makeOne() ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
Re: [Zope-dev] z3c.form missing *.mo files?
Hi, You have http://pypi.python.org/pypi/zest.pocompile which work with zest.releaser to compile mo before doing the sdist. Vincent Fretin ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] zope-tests - FAILED: 11, OK: 88
This is the summary for test reports received on the zope-tests list between 2011-07-12 00:00:00 UTC and 2011-07-13 00:00:00 UTC: See the footnotes for test reports of unsuccessful builds. An up-to date view of the builders is also available in our buildbot documentation: http://docs.zope.org/zopetoolkit/process/buildbots.html#the-nightly-builds Reports received Bluebream / Python2.4.6 64bit linux Bluebream / Python2.5.5 64bit linux Bluebream / Python2.6.5 64bit linux ZTK 1.0 / Python2.4.6 Linux 64bit ZTK 1.0 / Python2.5.5 Linux 64bit ZTK 1.0 / Python2.6.5 Linux 64bit [1]ZTK 1.0dev / Python2.4.6 Linux 64bit [2]ZTK 1.0dev / Python2.5.5 Linux 64bit [3]ZTK 1.0dev / Python2.6.5 Linux 64bit Zope 3.4 KGS / Python2.4.6 64bit linux Zope 3.4 KGS / Python2.5.5 64bit linux Zope 3.4 Known Good Set / py2.4-32bit-linux Zope 3.4 Known Good Set / py2.4-64bit-linux Zope 3.4 Known Good Set / py2.5-32bit-linux Zope 3.4 Known Good Set / py2.5-64bit-linux Zope Buildbot / zope2.12-py2.6 slave-osx Zope Buildbot / zope2.12-py2.6 slave-ubuntu32 [4]Zope Buildbot / zope2.12-py2.6 slave-ubuntu64 Zope Buildbot / zope2.13-py2.6 slave-osx Zope Buildbot / zope2.13-py2.6 slave-ubuntu32 Zope Buildbot / zope2.13-py2.6 slave-ubuntu64 Zope Buildbot / zope2.13-py2.7 slave-osx Zope Buildbot / zope2.13-py2.7 slave-ubuntu32 Zope Buildbot / zope2.13-py2.7 slave-ubuntu64 [5]Zope Buildbot / zope2.13_win-py2.6 slave-win [6]Zope Buildbot / zope2.13_win-py2.7 slave-win Zope Buildbot / zope2.14-py2.6 slave-osx Zope Buildbot / zope2.14-py2.6 slave-osx Zope Buildbot / zope2.14-py2.6 slave-osx Zope Buildbot / zope2.14-py2.6 slave-ubuntu32 Zope Buildbot / zope2.14-py2.6 slave-ubuntu32 Zope Buildbot / zope2.14-py2.6 slave-ubuntu32 Zope Buildbot / zope2.14-py2.6 slave-ubuntu64 Zope Buildbot / zope2.14-py2.6 slave-ubuntu64 Zope Buildbot / zope2.14-py2.6 slave-ubuntu64 Zope Buildbot / zope2.14-py2.7 slave-osx Zope Buildbot / zope2.14-py2.7 slave-osx Zope Buildbot / zope2.14-py2.7 slave-osx Zope Buildbot / zope2.14-py2.7 slave-ubuntu32 Zope Buildbot / zope2.14-py2.7 slave-ubuntu32 Zope Buildbot / zope2.14-py2.7 slave-ubuntu32 Zope Buildbot / zope2.14-py2.7 slave-ubuntu64 Zope Buildbot / zope2.14-py2.7 slave-ubuntu64 Zope Buildbot / zope2.14-py2.7 slave-ubuntu64 Zope Buildbot / zopetoolkit-1.0-py2.4 slave-osx Zope Buildbot / zopetoolkit-1.0-py2.4 slave-ubuntu32 Zope Buildbot / zopetoolkit-1.0-py2.4 slave-ubuntu64 Zope Buildbot / zopetoolkit-1.0-py2.5 slave-osx Zope Buildbot / zopetoolkit-1.0-py2.5 slave-ubuntu32 Zope Buildbot / zopetoolkit-1.0-py2.5 slave-ubuntu64 Zope Buildbot / zopetoolkit-1.0-py2.6 slave-osx Zope Buildbot / zopetoolkit-1.0-py2.6 slave-ubuntu32 Zope Buildbot / zopetoolkit-1.0-py2.6 slave-ubuntu64 Zope Buildbot / zopetoolkit-1.0_win-py2.4 slave-win Zope Buildbot / zopetoolkit-1.0_win-py2.5 slave-win Zope Buildbot / zopetoolkit-1.0_win-py2.6 slave-win Zope Buildbot / zopetoolkit-1.1-py2.5 slave-osx Zope Buildbot / zopetoolkit-1.1-py2.5 slave-ubuntu32 Zope Buildbot / zopetoolkit-1.1-py2.5 slave-ubuntu64 Zope Buildbot / zopetoolkit-1.1-py2.6 slave-osx Zope Buildbot / zopetoolkit-1.1-py2.6 slave-ubuntu32 Zope Buildbot / zopetoolkit-1.1-py2.6 slave-ubuntu64 [7]Zope Buildbot / zopetoolkit-1.1_win-py2.5 slave-win [8]Zope Buildbot / zopetoolkit-1.1_win-py2.6 slave-win Zope Buildbot / zopetoolkit-py2.5 slave-osx Zope Buildbot / zopetoolkit-py2.5 slave-ubuntu32 Zope Buildbot / zopetoolkit-py2.5 slave-ubuntu64 Zope Buildbot / zopetoolkit-py2.6 slave-osx Zope Buildbot / zopetoolkit-py2.6 slave-ubuntu32 Zope Buildbot / zopetoolkit-py2.6 slave-ubuntu64 [9]Zope Buildbot / zopetoolkit_win-py2.5 slave-win [10] Zope Buildbot / zopetoolkit_win-py2.6 slave-win Zope-2.10 Python-2.4.6 : Linux Zope-2.11 Python-2.4.6 : Linux Zope-2.12 Python-2.6.6 : Linux Zope-2.12-alltests Python-2.6.6 : Linux Zope-2.13 Python-2.6.6 : Linux Zope-2.13-alltests Python-2.6.6 : Linux Zope-trunk Python-2.6.6 : Linux Zope-trunk-alltests Python-2.6.6 : Linux winbot / ZODB_dev py_254_win32 winbot / ZODB_dev py_265_win32 winbot / ZODB_dev py_265_win64 winbot / ZODB_dev py_270_win32 winbot / ZODB_dev py_270_win64 [11] winbot / zope.app.interface_py_265_32 winbot / ztk_10 py_254_win32 winbot / ztk_10 py_265_win32 winbot / ztk_10 py_265_win64 winbot / ztk_11 py_254_win32 winbot / ztk_11 py_265_win32 winbot / ztk_11 py_265_win64 winbot / ztk_11 py_270_win32 winbot
[Zope] Tag BASE without port number
Hi all, is it possible to hide port bumber in case of reverse proxy redirecting? I have POUND as reverse proxy and Zope 2.10.13 on port 930, but html BASE tag contain this port number, which I does not want to have there. I do not want to explicit specify base tag at all pages. I prepare new installation, but I cannot remember nor find what I was make before at my old installation, it is 5 years ago. Google does not help me. Many thanks, J. Lukesh ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Tag BASE without port number
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/13/2011 08:37 AM, Jaroslav Lukesh wrote: Hi all, is it possible to hide port bumber in case of reverse proxy redirecting? I have POUND as reverse proxy and Zope 2.10.13 on port 930, but html BASE tag contain this port number, which I does not want to have there. I do not want to explicit specify base tag at all pages. I prepare new installation, but I cannot remember nor find what I was make before at my old installation, it is 5 years ago. Google does not help me. Configure pound to rewrite onto a Virtual Host Monster URL, which will make all the URLs generated by Zope code match the public URL space. See http://docs.zope.org/zope2/zope2book/VirtualHosting.html Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4duecACgkQ+gerLs4ltQ4B9QCguS04sQPrWnZ045l5+zs27TJm BJMAn3Kr6LlztG7r+EWnD1uHnQUp4NzI =ZYA7 -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Tag BASE without port number
- Puvodní zpráva - Od: Tres Seaver tsea...@palladion.com -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/13/2011 08:37 AM, Jaroslav Lukesh wrote: Hi all, is it possible to hide port bumber in case of reverse proxy redirecting? I have POUND as reverse proxy and Zope 2.10.13 on port 930, but html BASE tag contain this port number, which I does not want to have there. I do not want to explicit specify base tag at all pages. I prepare new installation, but I cannot remember nor find what I was make before at my old installation, it is 5 years ago. Google does not help me. Configure pound to rewrite onto a Virtual Host Monster URL, which will make all the URLs generated by Zope code match the public URL space. See http://docs.zope.org/zope2/zope2book/VirtualHosting.html Thanks, it worked. I use VHM already, but I dont know why it does not work before and worked now. I was try to change ZPublisher/HTTPResponse.py without success, but after putting original unchanged file back, it worked now. I prepare zope in virtual machine now, but it is not just first case when the whole system is unpredictablethinking about physical hardware, but management want virtuals. Regards, J. Lukesh ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )