Merge r40576 through r40592 from 2.9 branch:

Log message for revision 40576:
  No longer use the defaultLayer directive.  It didn't do anything anyway.

Log message for revision 40587:
  Update Five to 1.3c.

Log message for revision 40588:
  Fred fix a speling error in Zope 3.2.

Log message for revision 40590:
  sync with five repo

Log message for revision 40592:
  Zope 2's version.txt will from now on reside on the Zope2 package.
  The reason for that is because zpkg and distutils can't deal with arbitrary
  data files that don't belong to a certain package.
parent 537596ee
...@@ -11,23 +11,19 @@ ...@@ -11,23 +11,19 @@
# FOR A PARTICULAR PURPOSE. # FOR A PARTICULAR PURPOSE.
# #
############################################################################## ##############################################################################
"""Tests of the version number extraction.
"""Tests of the version number extraction.""" $Id$
"""
import os import os
import unittest import unittest
import Zope2
import App.config
import App.version_txt import App.version_txt
class VersionTextTestCase(unittest.TestCase): class VersionTextTestCase(unittest.TestCase):
def setUp(self): def setUp(self):
self.cfg = App.config.getConfiguration() self.fn = os.path.join(os.path.dirname(Zope2.__file__), "version.txt")
self.old_swhome = self.cfg.softwarehome
self.cfg.softwarehome = os.path.dirname(__file__)
self.fn = os.path.join(self.cfg.softwarehome, "version.txt")
App.version_txt._test_reset() App.version_txt._test_reset()
def tearDown(self): def tearDown(self):
...@@ -35,8 +31,6 @@ class VersionTextTestCase(unittest.TestCase): ...@@ -35,8 +31,6 @@ class VersionTextTestCase(unittest.TestCase):
os.unlink(self.fn) os.unlink(self.fn)
except OSError: except OSError:
pass pass
self.cfg.softwarehome = self.old_swhome
App.config.setConfiguration(self.cfg)
def writeVersion(self, s): def writeVersion(self, s):
f = open(self.fn, 'w') f = open(self.fn, 'w')
......
...@@ -10,10 +10,12 @@ ...@@ -10,10 +10,12 @@
# FOR A PARTICULAR PURPOSE # FOR A PARTICULAR PURPOSE
# #
############################################################################## ##############################################################################
"""Extract Zope 2 version information
import os,sys,re $id$
"""
from App.config import getConfiguration import os, sys, re
import Zope2
_version_string = None _version_string = None
_zope_version = None _zope_version = None
...@@ -29,8 +31,7 @@ def _prep_version_data(): ...@@ -29,8 +31,7 @@ def _prep_version_data():
if _version_string is None: if _version_string is None:
v = sys.version_info v = sys.version_info
pyver = "python %d.%d.%d, %s" % (v[0], v[1], v[2], sys.platform) pyver = "python %d.%d.%d, %s" % (v[0], v[1], v[2], sys.platform)
cfg = getConfiguration() fn = os.path.join(os.path.dirname(Zope2.__file__), 'version.txt')
fn = os.path.join(cfg.softwarehome, 'version.txt')
expr = re.compile( expr = re.compile(
r'(?P<product>[A-Za-z0-9]+) +(?P<major>[0-9]+)' r'(?P<product>[A-Za-z0-9]+) +(?P<major>[0-9]+)'
'\.(?P<minor>[0-9]+)\.(?P<micro>[0-9]+)' '\.(?P<minor>[0-9]+)\.(?P<micro>[0-9]+)'
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Five Changes Five Changes
============ ============
Five 1.3c (unreleased) Five 1.3c (2005-12-06)
====================== ======================
This version is also included in Zope 2.9b1. This version is also included in Zope 2.9b1.
...@@ -10,6 +10,8 @@ This version is also included in Zope 2.9b1. ...@@ -10,6 +10,8 @@ This version is also included in Zope 2.9b1.
Restructuring Restructuring
------------- -------------
* (b6) No longer use the ``defaultLayer`` directive, it's been deprecated.
* (b4) Cleaned up security test. * (b4) Cleaned up security test.
* (b4) Made Five send a ContainerModifiedEvent when appropriate. * (b4) Made Five send a ContainerModifiedEvent when appropriate.
...@@ -17,6 +19,8 @@ Restructuring ...@@ -17,6 +19,8 @@ Restructuring
Bugfixes Bugfixes
-------- --------
* (b6) Fixed the form i18n messages to work with Zope 3.2 beta 1.
* (b3) Made the creation of custom skins work again. It was broken in * (b3) Made the creation of custom skins work again. It was broken in
the port to Zope 3.2. the port to Zope 3.2.
......
...@@ -20,11 +20,6 @@ ...@@ -20,11 +20,6 @@
interface="zope.publisher.interfaces.browser.IDefaultBrowserLayer" interface="zope.publisher.interfaces.browser.IDefaultBrowserLayer"
/> />
<defaultLayer
type="zope.publisher.interfaces.browser.IBrowserRequest"
layer="zope.publisher.interfaces.browser.IDefaultBrowserLayer"
/>
<browser:page <browser:page
for="*" for="*"
name="absolute_url" name="absolute_url"
......
...@@ -135,7 +135,7 @@ class EditView(BrowserView): ...@@ -135,7 +135,7 @@ class EditView(BrowserView):
notify(ObjectModifiedEvent(content)) notify(ObjectModifiedEvent(content))
except WidgetsError, errors: except WidgetsError, errors:
self.errors = errors self.errors = errors
status = _("An error occured.") status = _("An error occurred.")
transaction.abort() transaction.abort()
else: else:
setUpEditWidgets(self, self.schema, source=self.adapted, setUpEditWidgets(self, self.schema, source=self.adapted,
...@@ -178,7 +178,7 @@ class AddView(EditView): ...@@ -178,7 +178,7 @@ class AddView(EditView):
self.createAndAdd(data) self.createAndAdd(data)
except WidgetsError, errors: except WidgetsError, errors:
self.errors = errors self.errors = errors
self.update_status = _("An error occured.") self.update_status = _("An error occurred.")
return self.update_status return self.update_status
self.request.response.redirect(self.nextURL()) self.request.response.redirect(self.nextURL())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment