このファイルには現在の Zope リリースでの変更点を記載しています。 これ以前の変更については HISTORY.txt を参照してください。
Zope 3 をバグ修正版の 3.3.1 リリースにアップデート。
Webdav 経由でオブジェクトを作成したときの獲得の問題を修正。
ZPT を FTP で操作ができなくなっていた問題を修正。
zope.security.management.checkPermission 呼び出しが Zope 2 のセキュリティーポリシーに迂回されていなかった。
注意: もしあなたがすでに Zope 2.10 のインスタンスを使用しているなら、 インスタンスを作り直すか、以下の数行を etc/site.zcml ファイルに追加する必要がある:
<securityPolicy
component="Products.Five.security.FiveSecurityPolicy" />
TALES における boolean 評価時の default の扱いについて。
DateTime について、後方互換性が無くなっていた変更を元に戻した。
lib/python/Zope2/version.txt が同梱されていなかった問題を修正
最適な Python のバージョンとして Python-2.4.4 を configure に追加。
ZopePageTemplate の実装は、文字列を内部で unicode で保持するようになった。 非 unicode の instance は自動的に on-the-fly で unicode に変換される。 しかしながら、この変換は utf-8 と ISO-8859-15 でエンコードされた ZPT インスタンスでのみ正しく働くだろう。あなたは他のエンコーディングを 扱うために環境変数 ZPT_REFERRED_ENCODING に他のエンコーディングを utf-8 や ISO-8859-15 よりも先に設定することができる。さらに、新しい output_encodings プロパティーは WebDAV/FTP 経由の入出力の unicode 変換をコントロールしてくれる効果がある。
ZPT の実装は UnicodeDecodeError の発生時の挙動を設定可能となった。 カスタム UnicodeEncodingConflictResolver は ZCML で設定することが出来る。 (参照: Products/PageTemplates/(configure.zcml, unicodeconflictresolver.py, interfaces.py)
Collector #2155: Fix wrong parameter being passed to logger’s error() method, with tests.
Updated Five to stable 1.5 release.
Traversal order changes were causing WebDAV requests which used acquisition to fail.
Collector #2157: Expose name of broken class in SystemError raised from ‘__getstate__’ of a broken instance.
Usage of ‘urljoin’ in ‘webdav.davcmds’ could lead to wrongly constructed urls.
Fix #2141: TALES doesn’t traverse correctly over ‘repeat’ variable
reStructuredText/ZReST: setting raw_enabled to 0 for security reasons
Collector #2113: ‘zopectl test’ masked Ctrl-C.
OFS Image: Image and File updated to use isinstance(data, str) and raises TypeError upon encountering unicode objects.
OFS Application: Updated deprecation warnings. Support for ‘__ac_permissions__’ and ‘meta_types’ will be removed in Zope 2.11, ‘methods’ support might remain longer.
Collector #2136: Map ResourceLockedError to the correct response code.
an ‘_oid’ attribute.
Collector #2118: Empty TALES path expressions are allowed in Zope 2.
Acquisition wrappers now correctly proxy __contains__.
Collector #2116: sequence.sort() did not work properly locale related comparison methods
Collector #2122: fixed missing is_proxying_match definition in ZServer/HTTPServer
Collector 2077: fixed problem with ACTUAL_URL and SiteRoot
Collector #2073: fixed misbehaviour of OFS.Owned.changeOwnership
Collector #2063: cleaned up some mess in MailHost.sendTemplate()
View and attribute lookup order was changed to the following:
- Unacquired attributes
- Views
- Acquired attributes
According to consensus in z3-five mailing list:
The defaultView directive now only looks up views, not attributes.
Collector #2178: Fix ZopeTestCase doctest support for layers
Zope 2.10+ now includes site.zcml as part of its instance creation skel directory. As a consequence Five now requires this file to exist in every instance. If upgrading a site from Zope 2.9 to 2.10, you will need to copy site.zcml and package-includes/ from your installed Zope installation location (skel/etc/) into the etc/ directory of your upgraded instance.
The rationale for requiring this new file is to bring Zope 2 instances closer in consistency to Zope 3 instances. It also eases use of Zope 3 coding techniques in Zope 2 and removes some confusion when trying to run pure Zope 3 applications on Zope 2.
Products.PageTemplates now uses the Zope 3 ZPT implementation in zope.pagetemplate.
The TAL package has been deprecated in favour of the TAL engine from zope.tal.
Products.PageTemplates.TALES has been deprecated in favour of the TALES engine from zope.tales.
ZTUtils.Iterator has been deprecated in favour of the TALES iterator implementation in zope.tales.tales.
ZCatalog: removed manage_deleteIndex(), manage_delColumns() which were deprecated since Zope 2.4
deprecated the zLOG module. Use Pythons ‘logging’ module instead.
replaced all zLOG occurences (expect the zLOG module itself) with the ‘logging’ module
PluginIndexes/TextIndex is deprecated. Use ZCTextIndex instead
the ‘StructuredText’ module is deprecated. Use zope.structuredtext instead
removed ZopeTutorial (Elvis is now really dead)
ZClasses are deprecated and should no longer be used. In addition any code related to the ZClasses (re)distribution mechanism is removed.
ZGadyFlyDA/Gadfly is deprecated
deprecated OFS.content_types (to be removed in Zope 2.11) and replaced all occurences with zope.app.content_types
OFS.content_types: moved code to zope.app.content_types and added method aliases
Using FastCGI is offically deprecated.
Included Zope 3.3 and corresponding Five 1.5 release.
There is now a default favicon.ico.
Experimental WSGI and Twisted support for http. Zope now has a WSGI interface for integration with other web-servers than ZServer. Most notably Twisted is supported. The WSGI application is ZPublisher.WSGIPublisher.publish_module
You can make ZServer use the twisted interface with the “use-wsgi on” keyword in the http-server section in zope.conf.
You can run Twisted by installing Twisted (2.1 recommended) and replacing the http-server section with a server section in zope.conf. It is not possible to run a Twisted server together with a ZServer at the same time:
<server>
address 8080
type Zope2-HTTP
</server>
WSGI: http://www.python.org/dev/peps/pep-0333/ Twisted: http://twistedmatrix.com/
The traversal has been refactored to take heed of Zope3s IPublishTraverse adapter interfaces. The ZCML directives five:traversable and five:defaultViewable are therefore no longer needed, as everything now is five:traversable and five:defaultViewable.
There was a bug in earlier versions of Five that allowed you to do custom publishing traversal with ITraversable adapters. This bug has been corrected. Anybody using ITraversable adapters need to convert them to IPublishTraversal adapters.
Testing.makerequest: Added an ‘environ’ argument so clients can use mappings other than os.environ.
Updated to Docutils 0.4.0
reStructuredText: The default value for the ‘stylesheet’ property has been changed from ‘default.css’ to None because there is no ‘default.css’ file by default.
ZReST: rewritten render() method to integrate it smoothly with Docutils 0.4.0. The default value for the ‘stylesheet’ property has been changed from ‘default.css’ to None because there is no ‘default.css’ file by default.
Added a “clock server” servertype which allows users to configure methods that should be called periodically as if they were being called by a remote user agent on one of Zope’s HTTP ports. This is meant to replace wget+cron for some class of periodic callables.
To use, create a “clock-server” directive section anywhere in your zope.conf file, like so:
<clock-server>
method /do_stuff
period 60
user admin
password 123
host localhost
</clock-server>
Any number of clock-server sections may be defined within a single zope.conf. Note that you must specify a username/password combination with the appropriate level of access to call the method you’ve defined. You can omit the username and password if the method is anonymously callable. Obviously the password is stored in the clear in the config file, so you need to protect the config file with filesystem security if the Zope account is privileged and those who have filesystem access should not see the password.
Descriptions of the values within the clock-server section follow:
method -- the traversal path (from the Zope root) to an
executable Zope method (Python Script, external method,
product method, etc). The method must take no arguments or
must obtain its arguments from a query string.
period -- the number of seconds between each clock "tick" (and
thus each call to the above "method"). The lowest number
providable here is typically 30 (this is the asyncore mainloop
"timeout" value).
user -- a zope username.
password -- the password for the zope username provided above.
host -- the hostname passed in via the "Host:" header in the
faux request. Could be useful if you have virtual host rules
set up inside Zope itself.
To make sure the clock is working, examine your Z2.log file. It should show requests incoming via a “Zope Clock Server” useragent.
Added a ‘conflict-error-log-level’ directive to zope.conf, to set the level at which conflict errors (which are normally retried automatically) are logged. The default is ‘info’.
The SiteErrorLog now copies exceptions to the event log by default.
ObjectManager now has an hasObject method to test presence. This brings it in line with BTreeFolder.
Improved logging of ConflictErrors. All conflict errors are logged at INFO, with counts of how many occurred and how many were resolved. Tracebacks for all conflicts are logged a DEBUG level, although these won’t help anyone much. If a conflict error is unresolved, it will now bubble up to error_log and standard_error_message.
Use new-style security declarations everywhere possible. This means remove the use of __ac_permissions__, foo__roles__ and default__class_init__. A few corner cases can’t be converted because of circular imports.
Fixed unclear security declarations. Warn when an attempt is made to have a security declaration on a nonexistent method.
updated to ZPL 2.1
interfaces: Added ‘Interfaces’ tab to basic core objects. This is a Five feature and only available if the classes are made five:traversable. It allows to inspect interfaces and to assign marker interfaces through the ZMI.
webdav: Added support for the z3 WriteLock interface. It is no longer necessary to have the WriteLockInterface in the __implements__ list of lockable objects. All classes inheriting from LockableItem inherit also the IWriteLock interface. Note that this enables webdav locking for all subclasses by default even if they don’t specify the WriteLockInterface explicitly.
App ProductContext: Made registerClass aware of z3 interfaces. Z2 and z3 interfaces are registered side by side in the same tuple in Products.meta_types. IFAwareObjectManagers like the ZCatalog work now with z3 interfaces as well.
Zope now sends Zope 3 events when objects are added or removed from standard containers. manage_afterAdd, manage_beforeDelete and manage_afterClone are now deprecated. See lib/python/Products/Five/tests/event.txt for details.
Zope now utilizes ZODB 3.6. It had previously used ZODB 3.4. As a result, the DBTab package was removed, as ZODB 3.6 has multidatabase support that makes DBTab unnecessary.
Added a ‘product-config’ section type to zope.conf, allowing arbitrary key-value mappings. Products can look for such confgiurations to set product-specific options. Products mwy also register their own section types, extending the ‘zope.product.base’ type. (see the example ‘<product-config>’ section in skel/etc/zope.conf.in for sample usage).
Collector #1490: Added a new zope.conf option to control the character set used to encode unicode data that reaches ZPublisher without any specified encoding.
AccessControl, Acquisition, App, OFS, webdav, PluginIndexes, ZCatalog and ZCTextIndex: Added some Zope 3 style interfaces. This makes the bridged interfaces shipped with Five obsolete.
ZConfig extension, address now also accepts symbolic port names from etc/services (unix) or etcservices (win32)
ZPublisher.HTTPRequest.FileUpload now supports full file object interface. This means Iterator support was added. (for line in fileobject: ..., as well as fileobject.next() and fileobject.xreadlines() ) Collector #1837
Switched the bundled Zope 3 to release 3.2 and upgraded the Five product to version 1.3 (see Products/Five/CHANGES.txt).
The PageTemplate implementation now uses Zope 3 message catalogs by default for translation. Old-style translation services such as Localizer or PlacelessTranslationService are still supported as fall-backs. See Products/Five/doc/i18n.txt for more information.
Switched to the new improved test runner from Zope 3. Run test.py with -h to find out more.
lib/python/docutils is now a reference to docutils package from the Zope 3 source tree (to get rid of redundant packages)
Collector #1447: When editing content on a virtual-hosted zope, AcceleratedHTTPCacheManager now purges the correct URL.
When you add roles in manage_access, roles are now stripped of any leading or trailing spaces.
Collector #2062: Fix manage_historyCopy, which was broken, and write tests for it.
Collector #2061: Fix problems where windows line endings are passed to restricted code compilers.
Collector #2051: Applied patch by Yoshinori Okuji to fix some XML export/import problems, including tests for that feature.
Collector #2037: fixed broken ACTUAL_URL for ‘/’
Missing import of NotFound in webdav.Resource
Collector #1819: fixed method signature of MountedObject.SimpleTrailblazer._construct()
Collector #2019: removed validateValue() from cAccessControl (already removed in former Zope versions from the AccessControl Python implementation)
Collector #1991: ZPublisher did not deal properly with a trailing %20 in the URL
zope.app.introspector was not included with the source archive
Collector #2013: improved XHTML conformance of error messages, some of which did not close ‘<p>’ tags.
Collector #2002: fixed broken ‘ls -R’ functionality (didn’t recurse properly subclasses of OFS.Folder)
Collector #1992: unified the visible hostnames of the FTP and HTTP servers
Collector #1999: fixed broken FTP rename functionality (RNFR now returns 350 as status code instead 250)
HTTPResponse: for XML content the encoding specified within the XML preamble is adjusted to the real encoding of the content as specified through the ‘charset’ within the content-type property.
Collector #1939: When running as a service, Zope could potentially collect too much log output filling the NT Event Log. When that happened, a ‘print’ during exception handling would cause an IOError in the restart code causing the service not to restart automatically.
Problem is that a service/pythonw.exe process always has an invalid sys.stdout. But due to the magic of buffering, small “print” statements would not fail - but once the file actually got written to, the error happened. Never a problem when debugging, as the process has a console, and hence a valid stdout.
For content-type HTTP headers starting with ‘text/’ or ‘application/’ the ‘charset’ field is automatically if not specified by the application. The ‘charset’ is determined by the content-type header specified by the application (if available) or from the zpublisher_default_encoding value as configured in etc/zope.conf
Collector #1976: FTP STOR command would load the file being uploaded in memory. Changed to use a TemporaryFile.
OFS ObjectManager: Fixed list_imports() to tolerate missing import directories.
Collector #1621, 1894: Removed support for use of long-deprecated ‘whrandom’ module.
OFS PropertySheets / webdav: Fixed dav__resourcetype. __dav_collection__ with a false value was overridden by isAnObjectManager.
added missing Zope 3 imports: zope.app.intid, zope.app.keyreference, zope.app.session, zope.contentprovider, zope.viewlet
ZCatalog.CatalogBrains: ‘getObject’ now raises errors, rather than returning None, in cases where the path points either to a nonexistent object (in which case it raises NotFound) or to one which the user cannot access (raising Unauthorized). Sites which rely on the old behavior can restore setting a new zope.conf option, ‘catalog-getObject-raises’, to “off”.
This compatibility option will be removed in Zope 2.10.
PluginIndexes: the ZCatalog’s “Indexes” tab now show the number of distinct values indexed by each index instead of a mixture of indexed objects versus number of distinct values. Indexes derived from UnIndex show both values within their own ZMI screen. In addition most indexes have now a “Browse” tab to browse through the list of indexed values and their occurrences.
FTPServer: a RNFR (rename from) request is now being responded with a 550 error code if the source file does not exist
Fixed ObjectManager to not swallow exceptions during object deletion (in debug mode and if the user is not Manager). This allows for better debugging, while still keeping the possibility for a Manager to delete buggy objects.
Added a ZConfig directive ‘large-file-threshold’ to control the request content-size threshold at which a temporary file gets created. Use the same value for deciding between reading the whole request in memory or just a chunk inside webdav.NullResource.PUT().
RAMCacheManager: Allow invalidation of a cache entry from the Statistics view in the ZMI
Collector #1454/OFS.File: Accept content types ending with “javascript” as editable through the File edit form, just like text/<foo> types
Zope X3 3.0.0’s ‘src/zope’ package is included now.
Five (Zope 3 integration technology for Zope 2) is included now in Products/Five.
Included Stefan Holek’s ZopeTestCase 0.9
The SiteErrorLog allows you to acknowledge (or delete) exceptions, so you can reduce or clear the list without restarting your Zope server. Additionally the SiteErrorLog is covered by unit tests now.
Unit tests added for the SiteErrorLog.
UI improvement for the ZCatalog. The “catalog contents” allow you to filter the cataloged objects by path now.
Made test.py follow symbolic links on POSIX systems.
added utilities/reindex_catalog.py to perform ZCatalog maintenance operations from the command line (through zopectl)
RESPONSE.setBody and RESPONSE.setStatus now accept lock parameters in the same way as RESPONSE.redirect. These prevent further calls to the methods from overwriting the previous value. This is useful when writing http proxies.
DateTime: new DateTime instance can be constructed from a given DateTime instance: d_new = DateTime(d_old)
The DateTime parser now throws a SyntaxError upon any parsing errors.
ZCatalog: added a new configuration option in the “Advanced” tab to provide optional logging of the progress of long running reindexing or recataloging operations.
made Zope.configure return the starter instance to enable other methods to be called, such as starter.setupConfiguredLoggers()
Improved Unicode handling in Page Templates. Template contents and title will now be saved as a Unicode string if the management_page_charset variable can be acquired and is true. The character set of an uploaded file can now be specified.
zopectl now accepts the -m argument to set a umask for files created by the managed process (e.g. -m 002 or –umask 002).
AccessControl/permission_settings() now has a new optional parameter ‘permission’ to retrieve the permission settings for a particular permission.
The obsolete ‘SearchIndex’ package has been removed
Traversal now supports a “post traversal hook” that get’s run after traversal finished and the security context is established.
Using “_usage” parameters in a ZCatalog query is deprecated and logged as DeprecationWarning.
MailHost now has two additional properties, a user id and a password. These are used to attempt ESMTP authentication before sending a mail.
Folder listings in FTP now include ”.” as well as ”..”.
When a VHM is activated, it adds the mapping ‘VIRTUAL_URL_PARTS’: (SERVER_URL, BASEPATH1, virtual_url_path) to the request’s ‘other’ dictionary. If BASEPATH1 is empty, it is omitted from the tuple. The joined parts are also added under the key ‘VIRTUAL_URL’. Since the parts are evaluated before traversal continues, they will not reflect modifications to the path during traversal or by the addition of a default method such as ‘index_html’.
Extension Classes, a key Zope foundation, have been totally rewritten based on Python new-style classes.
This change provides a number of advantages:
etc.) in Zope objects. Support for object protocols (special __ methods) added since Python 1.4.
o Support for cyclic garbage collection.
o Ability to use new-style classes as base classes of Zope objects.
o Pave the way for sharing code between Zope 2 and Zope 3.
Python read descriptors.
If an extension classes is used to implement a descriptor, indirectly by implementing __of__ or directly by implementing __get__, the behavior of the descriptor will differ from ordinary descriptors in an important way. The descriptors __get__ method will be called even if the descriptor is stored on an instance of an extension class. Normally descritor __get__ methods are called only of the descriptor is stored in a class.
ZODB 3.3
This is the first version of ZODB that does not require ExtensionClass.
Add ‘parity’ method to ZTUtils Iterators.
Allow untrusted code to mutate ZPublisher record objects.
Added a “mime-types” configuration value which names a file giving additional MIME type to filename extension mappings. The “mime-types” setting may be given more than once in the configuration file; the files have the same format at the mime.types file distributed with Apache.
Changed the ZEO server and control process to work with a single configuration file; this is now the default way to configure these processes. (It’s still possible to use separate configuration files.) The ZEO configuration file can now include a “runner” section used by the control process and ignored by the ZEO server process itself. If present, the control process can use the same configuration file.
ZConfig was updated to version 2.0. The new version includes two new ways to perform schema extension; of particular interest in Zope is the ability for a configuration file to “import” new schema components to allow 3rd-party components (such as storages, databases, or logging handlers) to be used.
The testrunner.py script has been replaced with test.py which is now installed into the ‘bin’ folder.
(Translated by Shimizukawa, r104364)