BlueBream is based on ZTK, so you can look at the ZTK documentation for major changes and migration issues.
|Package Name||Zope 3.4.0||BlueBream 1.0.0|
While running buildout, you may get module import errors like this:
ConfigurationError: ('Invalid value for', 'package', 'ImportError: Module zope.app has no global authentication') ConfigurationError: ('Invalid value for', 'package', 'ImportError: Module zope.app has no global broken') ConfigurationError: ('Invalid value for', 'package', 'ImportError: Module zope.app has no global error') ConfigurationError: ('Invalid value for', 'package', 'ImportError: Module zope.app has no global i18n') ConfigurationError: ('Invalid value for', 'package', 'ImportError: Module zope.app has no global session') ConfigurationError: ('Invalid value for', 'package', 'ImportError: Module zope.app has no global schema') ConfigurationError: ('Invalid value for', 'package', 'ImportError: Module zope.app has no global zopeappgenerations') ConfigurationError: ('Invalid value for', 'package', 'ImportError: Module zope.app has no global keyreference') ConfigurationError: ('Invalid value for', 'package', 'ImportError: Module zope.app has no global principalannotation')
Add the egg name (Eg:- zope.app.principalannotation) to install_requires inside setup.py as given here. Aftern adding this, you need to run ./bin/buildout command again.
install_requires=['setuptools', ... 'zope.app.authentication', 'zope.app.broken', 'zope.app.error', 'zope.app.i18n', 'zope.app.session', 'zope.app.schema', 'zope.app.zopeappgenerations', 'zope.app.keyreference', 'zope.app.principalannotation', ... ],
Another solution is to inlude egg name (Eg:- zope.app.principalannotation) in the Buildout part where other eggs are listed using``zc.recipe.egg`` recipe as given here:
[app] recipe = zc.recipe.egg eggs = samplproject ... zope.app.authentication zope.app.broken zope.app.error zope.app.i18n zope.app.session zope.app.schema zope.app.zopeappgenerations zope.app.keyreference zope.app.principalannotation interpreter = breampy
Import error: zope.app.folder.interfaces.IFolder
If you get error like this:
ZopeXMLConfigurationError: File "/home/baiju/myapp/src/myapp/browser.zcml", line 21.2-27.8 ConfigurationError: ('Invalid value for', 'for', "ImportError: Couldn't import zope.app.folder.interfaces, No module named folder.interfaces")
Open the browser.zcml file and look at line number 21, inside that ZCML declaration change: zope.app.folder.interfaces.IFolder to zope.site.interfaces.IFolder.
If you get error like this:
raise ValueError("Undefined permission id", permission_id) zope.configuration.config.ConfigurationExecutionError: <type 'exceptions.ValueError'>: ('Undefined permission id', 'zope.ManageApplication')
You need to include zope.applicationcontrol package in your ZCML configuration file (site.zcml) as the permission definition is available there.
If you are getting an error like this when accessing login.html view.
.../eggs/zope.principalregistry-3.7.0-py2.5.egg/zope/principalregistry/principalregistry.py", line 82, in unauthorized a = ILoginPassword(request) TypeError: ('Could not adapt', <zope.publisher.browser.BrowserRequest instance URL=http://localhost:9060/@@login.html>, <InterfaceClass zope.authentication.interfaces.ILoginPassword>)
You need to include zope.login package in your ZCML configuration file (site.zcml) as the adapter registration is available there:
<include package="zope.login" />
LP #506879: debug shell added. Basic usage:
./bin/paster shell debug.ini
Transaction managers and the transaction module can be used with the with statement to define transaction boundaries, as in:
with transaction: ... do some things ...
See transaction/tests/convenience.txt for more details.
There is a new iterator function that automates dealing with transient errors (such as ZODB confict errors). For example, in:
for attempt in transaction.attempts(5): with attempt: ... do some things ..
If the work being done raises transient errors, the transaction will be retried up to 5 times.
See transaction/tests/convenience.txt for more details.
Fixed a bug that caused extra commit calls to be made on data managers under certain special circumstances.
When threads were reused, transaction data could leak accross them, causing subtle application bugs.
- Remove crufty DEPENDENCIES.cfg left over from zpkg.
New set of testfile markers:
marks a testfile as a doctest.
marks a testfile as a regular unittest.
applies the given layer definition to the tests in the doctest file.
sets up a ZCML layer with the given filename and applies this layer to the doctests in the doctest file.
sets up a ZCML layer with the given filename and applies this layer to the doctests in the doctest file. Furthermore the tests are set up as functional doc tests.
applies the setUp function denoted by the dotted name to the tests in the doctest file.
applies the tearDown function denoted by the dotted name to the tests in the doctests file.
See the examples in tests/othercave and README.txt to learn more about using these new directives.
The old :test-layer: marker is still supported but it is deprecated now and will vanish at least with the 0.5 version of z3c.testsetup.
Added Python 2.6 support. Removed Python 2.3 support.
Fixed remaining deprecation warnings under Python 2.6, both when running our tests and when using the package.
Switched from using os.popen* to subprocess.Popen, to avoid a deprecation warning in Python 2.6. See:
Made sure the ‘redo_pyc’ function and the doctest checkers work with Python executable paths containing spaces.
Expand shell patterns when processing the list of paths in develop, e.g:
[buildout] develop = ./local-checkouts/*
Conditionally import and use hashlib.md5 when it’s available instead of md5 module, which is deprecated in Python 2.6.
Added Jython support for bootstrap, development bootstrap and zc.buildout support on Jython
Fixed a bug that would cause buildout to break while computing a directory hash if it found a broken symlink (Launchpad #250573)
Fixed bug in cPickleCache’s byte size estimation logic. (https://bugs.launchpad.net/zodb/+bug/533015)
Fixed a serious bug that caused cache failures when run with Python optimization turned on.
Fixed a bug that caused savepoint rollback to not properly set object state when objects implemented _p_invalidate methods that reloaded ther state (unghostifiable objects).
cross-database wekrefs weren’t handled correctly.
The mkzeoinst script was fixed to tell people to install and use the mkzeoinstance script. :)
The Database class now has an xrefs keyword argument and a corresponding allow-implicit-cross-references configuration option. which default to true. When set to false, cross-database references are disallowed.
Added support for RelStorage.
As a convenience, the connection root method for returning the root object can now also be used as an object with attributes mapped to the root-object keys.
Databases have a new method, transaction, that can be used with the Python (2.5 and later) with statement:
db = ZODB.DB(...) with db.transaction() as conn: # ... do stuff with conn
This uses a private transaction manager for the connection. If control exits the block without an error, the transaction is committed, otherwise, it is aborted.
Convenience functions ZODB.connection and ZEO.connection provide a convenient way to open a connection to a database. They open a database and return a connection to it. When the connection is closed, the database is closed as well.
The ZODB.config databaseFrom... methods now support multi-databases. If multiple zodb sections are used to define multiple databases, the databases are connected in a multi-database arrangement and the first of the defined databases is returned.
The zeopack script has gotten a number of improvements:
The connection now estimates the object size based on its pickle size and informs the cache about size changes.
The database got additional configurations options (cache-size-bytes and historical-cache-size-bytes) to limit the cache size based on the estimated total size of cached objects. The default values are 0 which has the interpretation “do not limit based on the total estimated size”. There are corresponding methods to read and set the new configuration parameters.
Connections now have a public opened attribute that is true when the connection is open, and false otherwise. When true, it is the seconds since the epoch (time.time()) when the connection was opened. This is a renaming of the previous _opened private variable.
FileStorage now supports blobs directly.
You can now control whether FileStorages keep .old files when packing.
POSKeyErrors are no longer logged by ZEO servers, because they are really client errors.
A new storage interface, IExternalGC, to support external garbage collection, http://wiki.zope.org/ZODB/ExternalGC, has been defined and implemented for FileStorage and ClientStorage.
As a small convenience (mainly for tests), you can now specify initial data as a string argument to the Blob constructor.
ZEO Servers now provide an option, invalidation-age, that allows quick verification of ZEO clients have been disconnected for less than a given time even if the number of transactions the client hasn’t seen exceeds the invalidation queue size. This is only recommended if the storage being served supports efficient iteration from a point near the end of the transaction history.
The FileStorage iterator now handles large files better. When iterating from a starting transaction near the end of the file, the iterator will scan backward from the end of the file to find the starting point. This enhancement makes it practical to take advantage of the new storage server invalidation-age option.
Previously, database connections were managed as a stack. This tended to cause the same connection(s) to be used over and over. For example, the most used connection would typically be the only connection used. In some rare situations, extra connections could be opened and end up on the top of the stack, causing extreme memory wastage. Now, when connections are placed on the stack, they sink below existing connections that have more active objects.
There is a new pool-timeout database configuration option to specify that connections unused after the given time interval should be garbage collection. This will provide a means of dealing with extra connections that are created in rare circumstances and that would consume an unreasonable amount of memory.
The Blob open method now supports a new mode, ‘c’, to open committed data for reading as an ordinary file, rather than as a blob file. The ordinary file may be used outside the current transaction and even after the blob’s database connection has been closed.
ClientStorage now provides blob cache management. When using non-shared blob directories, you can set a target cache size and the cache will periodically be reduced try to keep it below the target size.
The client blob directory layout has changed. If you have existing non-shared blob directories, you will have to remove them.
ZODB 3.9 ZEO clients can connect to ZODB 3.8 servers. ZODB ZEO clients from ZODB 3.2 on can connect to ZODB 3.9 servers.
When a ZEO cache is stale and would need verification, a ZEO.interfaces.StaleCache event is published (to zope.event). Applications may handle this event and take action such as exiting the application without verifying the cache or starting cold.
There’s a new convenience function, ZEO.DB, for creating databases using ZEO Client Storages. Just call ZEO.DB with the same arguments you would otherwise pass to ZEO.ClientStorage.ClientStorage:
import ZEO db = ZEO.DB(('some_host', 8200))
Object saves are a little faster
When configuring storages in a storage server, the storage name now defaults to “1”. In the overwhelmingly common case that a single storage, the name can now be omitted.
FileStorage now provides optional garbage collection. A ‘gc’ keyword option can be passed to the pack method. A false value prevents garbage collection.
The FileStorage constructor now provides a boolean pack_gc option, which defaults to True, to control whether garbage collection is performed when packing by default. This can be overridden with the gc option to the pack method.
The ZConfig configuration for FileStorage now includes a pack-gc option, corresponding to the pack_gc constructor argument.
The FileStorage constructor now has a packer keyword argument that allows an alternative packer to be supplied.
The ZConfig configuration for FileStorage now includes a packer option, corresponding to the packer constructor argument.
MappingStorage now supports multi-version concurrency control and iteration and provides a better storage implementation example.
DemoStorage has a number of new features:
Wen calling ZODB.DB to create a database, you can now pass a file name, rather than a storage to use a file storage.
Added support for copying and recovery of blob storages:
Added a helper function, ZODB.blob.is_blob_record for testing whether a data record is for a blob. This can be used when iterating over a storage to detect blob records so that blob data can be copied.
In the future, we may want to build this into a blob-aware iteration interface, so that records get blob file attributes automatically.
Added the IBlobStorageRestoreable interfaces for blob storages that support recovery via a restoreBlob method.
Updated ZODB.blob.BlobStorage to implement IBlobStorageRestoreable and to have a copyTransactionsFrom method that also copies blob data.
New ClientStorage configuration option drop_cache_rather_verify. If this option is true then the ZEO client cache is dropped instead of the long (unoptimized) verification. For large caches, setting this option can avoid effective down times in the order of hours when the connection to the ZEO server was interrupted for a longer time.
Cleaned-up the storage iteration API and provided an iterator implementation for ZEO.
Versions are no-longer supported.
Document conflict resolution (see ZODB/ConflictResolution.txt).
Support multi-database references in conflict resolution.
Make it possible to examine oid and (in some situations) database name of persistent object references during conflict resolution.
Moved the ‘transaction’ module out of ZODB. ZODB depends upon this module, but it must be installed separately.
ZODB installation now requires setuptools.
Added offset information to output of fstail script. Added test harness for this script.
Added support for read-only, historical connections based on datetimes or serials (TIDs). See src/ZODB/historical_connections.txt.
Removed the ThreadedAsync module.
Now depend on zc.lockfile
CVE-2009-2701: Fixed a vulnerability in ZEO storage servers when blobs are available. Someone with write access to a ZEO server configured to support blobs could read any file on the system readable by the server process and remove any file removable by the server process.
BTrees (and TreeSets) kept references to internal keys. https://bugs.launchpad.net/zope3/+bug/294788
BTree Sets and TreeSets don’t support the standard set add method. (Now either add or the original insert method can be used to add an object to a BTree-based set.)
The runzeo script didn’t work without a configuration file. (https://bugs.launchpad.net/zodb/+bug/410571)
Officially deprecated PersistentDict (https://bugs.launchpad.net/zodb/+bug/400775)
Calling __setstate__ on a persistent object could under certain uncommon cause the process to crash.
When committing transactions involving blobs to ClientStorages with non-shared blob directories, a failure could occur in tpc_finish if there was insufficient disk space to copy the blob file or if the file wasn’t available. https://bugs.launchpad.net/zodb/+bug/224169
Savepoint blob data wasn’t properly isolated. If multiple simultaneous savepoints in separate transactions modified the same blob, data from one savepoint would overwrite data for another.
Savepoint blob data wasn’t cleaned up after a transaction abort. https://bugs.launchpad.net/zodb/+bug/323067
Opening a blob with modes ‘r+’ or ‘a’ would fail when the blob had no committed changes.
PersistentList’s sort method did not allow passing of keyword parameters. Changed its sort parameter list to match that of its (Python 2.4+) UserList base class.
Certain ZEO server errors could cause a client to get into a state where it couldn’t commit transactions. https://bugs.launchpad.net/zodb/+bug/374737
Fixed vulnerabilities in the ZEO network protocol that allow:
The vulnerabilities only apply if you are using ZEO to share a database among multiple applications or application instances and if untrusted clients are able to connect to your ZEO servers.
Fixed the setup test command. It previously depended on private functions in zope.testing.testrunner that don’t exist any more.
ZEO client threads were unnamed, making it hard to debug thread management.
ZEO protocol 2 support was broken. This caused very old clients to be unable to use new servers.
zeopack was less flexible than it was before. -h should default to local host.
The “lawn” layout was being selected by default if the root of the blob directory happened to contain a hidden file or directory such as ”.svn”. Now hidden files and directories are ignored when choosing the default layout.
BlobStorage was not compatible with MVCC storages because the wrappers were being removed by each database connection. Fixed.
Saving indexes for large file storages failed (with the error: RuntimeError: maximum recursion depth exceeded). This can cause a FileStorage to fail to start because it gets an error trying to save its index.
Sizes of new objects weren’t added to the object cache size estimation, causing the object-cache size limiting feature to let the cache grow too large when many objects were added.
Deleted records weren’t removed when packing file storages.
Fixed analyze.py and added test.
fixed Python 2.6 compatibility issue with ZEO/zeoserverlog.py
using hashlib.sha1 if available in order to avoid DeprecationWarning under Python 2.6
made runzeo -h work
The monitor server didn’t correctly report the actual number of clients.
Packing could return spurious errors due to errors notifying disconnected clients of new database size statistics.
Undo sometimes failed for FileStorages configured to support blobs.
Starting ClientStorages sometimes failed with non-new but empty cache files.
The history method on ZEO clients failed.
Fix for bug #251037: Make packing of blob storages non-blocking.
Fix for bug #220856: Completed implementation of ZEO authentication.
Fix for bug #184057: Make initialisation of small ZEO client file cache sizes not fail.
Fix for bug #184054: MappingStorage used to raise a KeyError during load instead of a POSKeyError.
Fixed bug in Connection.TmpStore: load() would not defer to the backend storage for loading blobs.
Fix for bug #181712: Make ClientStorage update lastTransaction directly after connecting to a server, even when no cache verification is necessary.
Fixed bug in blob filesystem helper: the isSecure check was inverted.
Fixed bug in transaction buffer: a tuple was unpacked incorrectly in clear.
Bugfix the situation in which comparing persistent objects (for instance, as members in BTree set or keys of BTree) might cause data inconsistency during conflict resolution.
Fixed bug 153316: persistent and BTrees were using int for memory sizes which caused errors on x86_64 Intel Xeon machines (using 64-bit Linux).
Fixed small bug that the Connection.isReadOnly method didn’t work after a savepoint.
Bug #98275: Made ZEO cache more tolerant when invalidating current versions of objects.
Fixed a serious bug that could cause client I/O to stop (hang). This was accompanied by a critical log message along the lines of: “RuntimeError: dictionary changed size during iteration”.
Fixed bug #127182: Blobs were subclassable which was not desired.
Fixed bug #126007: tpc_abort had untested code path that was broken.
Fixed bug #129921: getSize() function in BlobStorage could not deal with garbage files
Fixed bug in which MVCC would not work for blobs.
Fixed bug in ClientCache that occurred with objects larger than the total cache size.
When an error occured attempting to lock a file and logging of said error was enabled.
FileStorages previously saved indexes after a certain number of writes. This was done during the last phase of two-phase commit, which made this critical phase more subject to errors than it should have been. Also, for large databases, saves were done so infrequently as to be useless. The feature was removed to reduce the chance for errors during the last phase of two-phase commit.
File storages previously kept an internal object id to transaction id mapping as an optimization. This mapping caused excessive memory usage and failures during the last phase of two-phase commit. This optimization has been removed.
Refactored handling of invalidations on ZEO clients to fix a possible ordering problem for invalidation messages.
On many systems, it was impossible to create more than 32K blobs. Added a new blob-directory layout to work around this limitation.
Fixed bug that could lead to memory errors due to the use of a Python dictionary for a mapping that can grow large.
Fixed bug #251037: Made packing of blob storages non-blocking.
Fixed a bug that could cause InvalidObjectReference errors for objects that were explicitly added to a database if the object was modified after a savepoint that added the object.
Fixed several bugs that caused ZEO cache corruption when connecting to servers. These bugs affected both persistent and non-persistent caches.
Improved the the ZEO client shutdown support to try to avoid spurious errors on exit, especially for scripts, such as zeopack.
Packing failed for databases containing cross-database references.
Cross-database references to databases with empty names weren’t constructed properly.
The zeo client cache used an excessive amount of memory, causing applications with large caches to exhaust available memory.
Fixed a number of bugs in the handling of persistent ZEO caches:
When using ZEO Client Storages, Errors occured when trying to store objects too big to fit in the ZEO cache file.
Fixed bug in blob filesystem helper: the isSecure check was inverted.
Fixed bug in transaction buffer: a tuple was unpacked incorrectly in clear.
Fixed bug in Connection.TmpStore: load() would not defer to the back-end storage for loading blobs.
Fixed bug #190884: Wrong reference to POSKeyError caused NameError.
Completed implementation of ZEO authentication. This fixes issue 220856.
Remove long-time deprecated IContentContainer class.
We now rely on a new package called zope.container, which contains the basic implementation of zope.container and is intended to have less dependencies. We have gone through a wide range of packages and updated their dependencies to point to zope.container so that they will also have less indirect dependencies.
For backwards compatibility we have left the original modules in zope.app.container in place and have placed imports to make sure the symbols exist in their original locations.
Reimplemented the BTreeContainer so that it directly accesses the btree methods (removed an old #TODO)
Removed usage of deprecated LayerField.
Made C code compatible with Python 2.5 on 64bit architectures.
Fixed bug: Error thrown during __setitem__ for an ordered container leaves bad key in order
Fixed https://bugs.launchpad.net/zope3/+bug/221025: The Adding menu is sorted with translated item by using a collator (better localized sorting)
Fixed https://bugs.launchpad.net/zope3/+bug/175388: The setitem’s size modification is now done in setitemf: setting an existing item does not change the size, and the event subscribers should see the new size instead of the old size.
(3.6.1 skipped due to a typo)
Remove dependency on zope.app.testing by using the zope.app.wsgi.testlayer support instead.
At the time of this writing the test dependency on zope.app.zcmlfiles cannot be removed however, because there is a dependency on zope.app.file for testing, which pulls in the world.
Some of ZCML configuration was moved into another packages:
- The global INegotiator utility registration was moved into zope.i18n.
- The include of zope.i18n.locales was also moved into zope.i18n.
- The registration of IModifiableUserPreferredLanguages adapter was moved into zope.app.publisher.
- The IAttributeAnnotation implementation statement for HTTPRequest was moved into zope.publisher and will only apply if zope.annotation is available.
- The IUserPreferredCharsets adapter registration was also moved into zope.publisher.
Depend on zope.component >= 3.6 instead of zope.app.component as the queryNextUtility function was moved there.
Remove the old zope.app.i18n.metadirectives module as the directive was moved to zope.i18n ages ago.
Move core functionality to new zope.intid package, leaving only ZMI-related browser views here.
Note, that if you used the exclude directive from zc.configuration package to exclude the subscribers.zcml file from zope.app.intid, you need to change the directive to exclude it from zope.intid now.
Initial release. This package was extracted from zope.app.security to separate the functionality without additional dependencies.
Refactor package, spliting it to several new packages:
- zope.browserresource - the resources mechanism was moved here, see its CHANGES.txt for more information about changes during move.
- zope.ptresource - the page template resource was moved into another package so zope.browserresource doesn’t depend on any templating system. See zope.ptresource’s CHANGES.txt for more information.
- zope.browsermenu - the menu mechanism was moved here completely.
- zope.browserpage - the browser:page directive and friends were moved here. Also, these directives don’t depend hardly on menu system anymore, so they simply ignore the “menu” argument when zope.browsermenu is not available.
Backward-compatibility imports are provided, so there should not be much impact for those who uses old imports.
The CacheableBrowserLanguages and ModifiableBrowserLanguages adapters were moved into zope.publisher package, as well as browser:defaultSkin and browser:defaultView ZCML directives and ZCML class configuration for zope.publisher classes.
ZCML registrations of IXMLRPCPublisher adapters for zope.container were moved into zope.container for now.
Changed globalmodules.zcml to avoid making declarations for deprecated standard modules, to avoid deprecation warnings.
Note that globalmodules.zcml should be avoided. It’s better to make declarations for only what you actually need to use.
Rewrite tests in order not to dependent on zope.app.testing and zope.app.zcmlfiles.
zope.app.wsgi.testlayer introduces new testing functionality that can replace the old functionality in zope.app.testing. In addition, it supports using zope.testbrowser with WSGI directly (instead of relying on zope.app.testing, which pulls in a lot of dependencies).
The interesting parts are:
Make devmode warning message more generic. We don’t nesessary have the etc/zope.conf file nowadays when using buildout-based setups.
Add an application factory for Paste. So Zope application can now be easily deployed with Paste .ini configuration like this:
[app:main] use = egg:zope.app.wsgi config_file = %(here)s/zope.conf handle_errors = false
The config_file is a required argument, however the handle_errors defaults to True if not specified. Setting it to False allows you to make WSGIPublisherApplication not handle exceptions itself but propagate them to an upper middleware, like WebError or something.
The WSGIPublisherApplication constructor and getWSGIApplication function now accept optional handle_errors argument, described above.
Change mailing list address to zope-dev at zope.org instead of retired one.
Initial release. This package was splitted off from zope.app.security to provide a separate common interface definition for authentication utilities without extra dependencies.
Initial release. This package was splitted off zope.app.publisher as a part of refactoring process.
Additional changes that are made during refactoring:
Resource class for file resources are now selected the pluggable way. The resource directory publisher and browser:resource ZCML directive now creating file resources using factory utility lookup based on the file extension, so it’s now possible to add new resource types without introducing new ZCML directives and they will work inside resource directories as well.
NOTE: the “resource_factories” attribute from the DirectoryResource was removed, so if you were using this attribute for changing resource classes for some file extensions, you need to migrate your code to new utility-based mechanism.
See zope.browserresource.interfaces.IResourceFactoryFactory interface.
The Image resource class was removed, as they are actually simple files. To migrate, simply rename the “image” argument in browser:resource and browser:i18n-resource directives to “file”, if you don’t do this, resouces will work, but you’ll get deprecation warnings.
If you need custom behaviour for images, you can register a resource factory utility for needed file extensions.
The PageTemplateResource was moved into a separate package, “zope.ptresource”, which is a plugin for this package now. Because of that, the “template” argument of browser:resource directive was deprecated and you should rename it to “file” to migrate. The PageTemplateResource will be created for “pt”, “zpt” and “html” files automatically, if zope.ptresource package is included in your configuration.
Fix stripping the “I” from an interface name for icon title, if no title is specified.
When publishing a resource via Resources view, set resource parent to an ISite object, not to current site manager.
Clean up code and improve test coverage.
Initial release as an independent package
Fixed a problem, where queryNextUtility could fail if the context could not be adapted to a IComponentLookup.
Fixed 2 related bugs:
When a utility is registered and there was previously a utility registered for the same interface and name, then the old utility is unregistered. The 2 bugs related to this:
IMPORTANT: the interfaces that were defined in the zope.component.bbb.interfaces and deprecated for years are now (re)moved. However, some packages, including part of zope framework were still using those interfaces. They will be adapted for this change. If you were using some of those interfaces, you need to adapt your code as well:
The IView and IDefaultViewName were moved to zope.publisher.interfaces.
The IResource was moved to zope.app.publisher.interfaces.
IContextDependent, IPresentation, IPresentationRequest, IResourceFactory, IViewFactory were removed completely.
If you used IViewFactory in context of zope.app.form, there’s now IWidgetFactory in the zope.app.form.interfaces instead.
Add getNextUtility/queryNextUtility functions that used to be in zope.site earlier (and in zope.app.component even more earlier).
Added a pure-Python ‘hookable’ implementation, for use when ‘zope.hookable’ is not present.
Removed use of ‘zope.deferredimport’ by breaking import cycles.
Cleanup package documentation and changelog a bit. Add sphinx-based documentation building command to the buildout.
Remove deprecated code.
Change package’s mailing list address to zope-dev at zope.org, because zope3-dev at zope.org is now retired.
Previous releases should be versioned 3.9.0 as they are not pure bugfix releases and worth a “feature” release, increasing feature version.
Packages that depend on any changes introduced in version 3.8.2 or 3.8.3 should depend on version 3.9 or greater.
Raise more “Pythonic” errors from __setitem__, losing the dependency on zope.exceptions:
o zope.exceptions.DuplicationError -> KeyError
o zope.exceptions.UserError -> ValueError
Moved import of IBroken interface to use new zope.broken package, which has no dependencies beyond zope.interface.
Made test part pull in the extra test requirements of this package.
Split the z3c.recipe.compattest configuration out into a new file, compat.cfg, to reduce the burden of doing standard unit tests.
Stripped out bogus develop eggs from buildout.cfg.
Widget implementation and all widgets from zope.app.form have been moved into zope.formlib, breaking zope.formlib’s dependency on zope.app.form (instead zope.app.form now depends on zope.formlib).
Widgets can all be imported from zope.formlib.widgets.
Widget base classes and render functionality is in zope.formlib.widget.
All relevant widget interfaces are now in zope.formlib.interfaces.
Test dependencies are declared in a test extra now.
Introduced zope.formlib.form.applyData which works like applyChanges but returns a dictionary with information about which attribute of which schema changed. This information is then sent along with the IObjectModifiedEvent.
This fixes https://bugs.launchpad.net/zope3/+bug/98483.
Remove zope.testing from dependencies, as it’s not really needed.
Define IIndexSort interface for indexes that support sorting.
Implement sorting for FieldIndex (adapted from repoze.catalog/ZCatalog).
Add an apply method for KeywordIndex/TopicIndex, making them implement IIndexSearch that can be useful in catalog.
Optimize the search method of KeywordIndex/TopicIndex by using multiunion for the or operator and sorting before intersection for and.
IMPORTANT: KeywordIndex/TopicIndex now use IFSets instead of IISets. This makes it more compatible with other indexes (for example, when using in catalog). This change can lead to problems, if your code somehow depends on the II nature of sets, as it was before.
Also, FilteredSets used to use IFSets as well, if you have any FilteredSets pickled in the database, you need to migrate them to IFSets yourself. You can do it like that:
filter._ids = filter.family.IF.Set(filter._ids)
Where filter is an instance of FilteredSet.
IMPORTANT: KeywordIndex are now non-normalizing. Because it can be useful for non-string keywords, where case-normalizing doesn’t make any sense. Instead, it provides the normalize method that can be overriden by subclasses to provide some normalization.
The CaseInsensitiveKeywordIndex class is now provided that do case-normalization for string-based keywords. The old CaseSensitiveKeywordIndex is gone, applications should use KeywordIndex for that.
Looks like the KeywordIndex/TopicIndex was sort of abadonware and wasn’t used by application developers, so after some discussion we decided to refactor them to make them more usable, optimal and compatible with other indexes and catalog.
Porting application from old KeywordIndex/TopicIndex to new ones are rather easy and explained above, so we believe that it isn’t a problem. Please, use firstname.lastname@example.org or email@example.com mailing lists, if you have any problems with migration.
Thanks Chris McDonough of repoze for supporting and useful code.
LP #185974: Clear the cache used by Specificaton.get inside Specification.changed. Thanks to Jacob Holm for the patch.
Added support for Python 3.1. Contributors:
Lennart Regebro Martin v Loewis Thomas Lotze Wolfgang Schnerring
The 3.1 support is completely backwards compatible. However, the implements syntax used under Python 2.X does not work under 3.X, since it depends on how metaclasses are implemented and this has changed. Instead it now supports a decorator syntax (also under Python 2.X):
class Foo: implements(IFoo) ...
can now also be written:
@implementor(IFoo): class Foo: ...
There are 2to3 fixers available to do this change automatically in the zope.fixers package.
Python 2.3 is no longer supported.
Use new zope.copy package for implementing location copying. Thus there’s changes in the zope.locaton.pickling module:
- The locationCopy and CopyPersistent was removed in prefer to their equivalents in zope.copy. Deprecated backward-compatibility imports provided.
- The module now provides a zope.copy.interfaces.ICopyHook adapter for ILocation objects that replaces the old CopyPersistent functionality of checking for the need to clone objects based on their location.
First release. This package was splitted off from zope.app.authentication to separate password manager functionality that is greatly re-usable without any bit of zope.app.authentication and to reduce its dependencies.
Initial release. This package was splitted off zope.app.principalannotation to remove its dependencies on “zope 3 application server” components.
In addition, the following changes were made after split off:
- The IAnnotations implementation was fixed to look in the higher-level utility not only on __getitem__, but also on get and __nonzero.
- Tests was reworked into the README.txt doctest.
- Added a buildout part that generates Sphinx documentation from the README.txt
Remove zope.container dependency, as contained principals didn’t make any sense, since PrincipalRegistry never provided IContainer. Also, zope.container pulls a number dependencies, that are not needed for non-persistent principal registry (like, ZODB, for example).
Set __name__ and __parent__ by hand to provide some backward-compatibility and to save a pointer to registry from principal objects.
Initial release. This package was splitted from zope.app.security as a part of the refactoring process to provide global principal registry without extra dependencies.
Initial release. This package was splitted off zope.app.publisher as a part of refactoring process. It’s now a plugin for another package that was refactored from zope.app.publisher - zope.browserresource. See its documentation for more details.
- Don’t render PageTemplateResource when called as the IResource interface requires that __call__ method should return an absolute URL. When accessed by browser, it still will be rendered, because “browserDefault” method now returns a callable that will render the template to browser.
Some parts of zope.app.publisher packages was moved into this package during zope.app.publisher refactoring:
- IModifiableUserPreferredLanguages adapter for requests
- browser:defaultView and browser:defaultSkin ZCML directives
- IHTTPView, IXMLRPCView and like interfaces
- security ZCML declarations for some of zope.publisher classes
Introduced IReRaiseException interface. If during publishing an exception occurs and for this exception an adapter is available that returns False on being called, the exception won’t be reraised by the publisher. This happens only if handle_errors parameter of the publish() method is set to False. Fixes problems when acting in a WSGI pipeline with a debugger middleware enabled.
See https://bugs.launchpad.net/grok/+bug/332061 for details.
Fix #98471: Restrict redirects to current host. This causes a ValueError to be raised in the case of redirecting to a different host. If this is intentional, the parameter trusted can be given.
Moved dependency on zope.testing from install_requires to tests_require.
Removed behavior of doing a time.sleep in the supportsRetry http request.
Add a fix for Internet Explorer versions that upload files will full filesystem paths as filenames.
Add an adapter from zope.security.interfaces.IPrincipal to zope.publisher.interfaces.logginginfo.ILoggingInfo. It was moved from zope.app.security as a part of refactoring process.
Add adapters from HTTP and FTP request to zope.authentication.ILoginPassword interface. They are moved from zope.app.security as a part of refactoring process. This change adds a dependency on the zope.authentication package, but it’s okay, since it’s a tiny contract definition-only package.
See http://mail.zope.org/pipermail/zope-dev/2009-March/035325.html for reasoning.
Clean-up: Move skin related code from zope.publisher.interfaces.browser and zope.publisher.browser to zope.publihser.interfaces and zope.publisher.skinnable and provide BBB imports. See skinnable.txt for more information.
Fix: ensure that we only apply skin interface in setDefaultSkin which also provide IBrowserSkinType. This will ensure that we find a skin if the applySkin method will lookup for a skin based on this type interface.
Fix: Make it possible to use adapters and not only interfaces as skins from the adapter registry. Right now the defaultSkin directive registers simple interfaces as skin adapters which will run into a TypeError if someone tries to adapter such a skin adapter. Probably we should change the defaultSkin directive and register real adapters instead of using the interfaces as fake adapters where we expect adapter factories.
Feature: allow to use applySkin with different skin types using the optional argument skinType which is by default set to IBrowserSkinType
Feature: implemented the default skin pattern within adapters. This allows us to register default skins for other requests then only IBrowserRequest using IDefaultSkin adapters.
Note, ISkinnable and ISkinType and the skin implementation should be moved out of the browser request modules. Packages like z3c.jsonrpc do not depend on IBrowserRequest but they are skinnable.
Feature: added ISkinnable interface which allows us to implement the apply skin pattern not only for IBrowserRequest
Fix: Don’t cause warnings on Python 2.6
Fix: Make IBrowserPage inherit IBrowserView.
Move IView and IDefaultViewName from zope.component.interfaces to zope.publisher.interfaces. Stop inheriting from deprecated (for years) interfaces defined in zope.component.
Remove deprecated code.
Clean-up: Move “zope.testing” from extras to dependencies, per Zope Framework policy. Remove zope.app.testing as a dependency: tests run fine without it.
A previous fix to handle posting of non-form data broke handling of form data with extra information in the content type, as in:
When posting non-form (and non-multipart) data, the request body was consumed and discarded. This makes it impossible to deal with other post types, like xml-rpc or json without resorting to overly complex “request factory” contortions.
The zope.publisher.http.HTTPCharsets was confused by the Zope 2 publisher, which gives missleading information about which headers it has.
No changes since 3.4.1b2.
Initial release as a separate project, corresponds to zope.publisher from Zope 3.4.0a1
Note: The releases between 3.2.0 and 3.4.0b1 where not tracked as an individual package and have been documented in the Zope 3 changelog.
Made WSGI server really WSGI-compliant by adding variables to the environment that are required by the spec.
Added a factory and entry point for PasteDeploy.
Added a ‘secure’ option on CookieClientIdManagers to cause the secure set-cookie option to be used, which tells the browser not to send the cookie over http.
This provides enhanced security for ssl-only applications.
Only set the client-id cookie if it isn’t already set and try to prevent the header from being cached. This is to minimize risk from broken caches handing the same client id out to multiple users.
LP #560259: Fix subunit output formatter to handle layer setup errors.
LP #399394: Added a --stop-on-error / --stop / -x option to the testrunner.
LP #498162: Added a --pdb alias for the existing --post-mortem / -D option to the testrunner.
LP #547023: Added a --version option to the testrunner.
Added tests for LP #144569 and #69988.
When a __parent__ attribute is available on an object, it is always used for absolute URL construction, and no ILocation adapter lookup is performed for it. This was the previous behavior but was broken (around 3.5?) due to dependency refactoring.
If the object provides no __parent__ then an ILocation adapter lookup will be performed. This will always succeed as zope.location provides a default LocationProxy for everything, but more specific ILocation adapters can also be provided.
The RootPhysicallyLocatable adapter has been superseded by the refactored zope.location.traversing.LocationPhysicallyLocatable that we depend on since 3.5.0a4.
Remove the adapter and its registration, and making its import place pointing to zope.location.traversing.LocationPhysicallyLocatable to maintain backward-compatibility.
This also fixes a bug introduced in version 3.5.0a4 when trying to call getParents function for the root object.
Use direct imports instead of compatibility ones for things that were moved to zope.location.
Remove the zope.traversing.interfaces.INamespaceHandler interface, as it seems not to be used for years.
Change package’s mailing list address to zope-dev at zope.org instead of retired zope3-dev at zope.org
Do not use unicode strings to set the application server in the virtual host namespace. This caused absolute_url to create unicode URL’s.
No further changes since 3.4.0a1.
Initial release as a separate project, corresponds to zope.traversing from Zope 3.4.0a1