Storm 0.18

Milestone information

Project:
Storm
Series:
trunk
Version:
0.18
Released:
2010-10-25  
Registrant:
Gary Poster
Release registered:
2010-10-25
Active:
No. Drivers cannot target bugs and blueprints to this milestone.  

Download RDF metadata

Activities

Assigned to you:
No blueprints or bugs assigned to you.
Assignees:
2 Free Ekanayaka, 1 Gavin Panella, 1 Gustavo Niemeyer, 1 James Henstridge, 1 Jamu Kakar, 1 Jeroen T. Vermeulen, 2 Thomas Herve
Blueprints:
No blueprints are targeted to this milestone.
Bugs:
9 Fix Released

Download files for this release

After you've downloaded a file, you can verify its authenticity using its MD5 sum or signature. (How do I verify a download?)

File Description Downloads
download icon storm-0.18.tar.bz2 (md5, sig) Storm 0.18 bz2 7,890
last downloaded 24 hours ago
Total downloads: 7,890

Release notes 

The Storm team is proud to announce Storm 0.18!

The new release includes a number of new features:

 * Storm includes (optional) code to manage and migrate database schemas
 * storm.zope.testing added testresources
   (https://edge.launchpad.net/testresources) support
 * TimeoutErrors include messages to describe why the Timeout was raised

This release includes official packages for all supported releases
of Ubuntu except 10.10. 10.10 packages will be added after problems with
Storm's release machinery are sorted out. The packages are available in the
Storm team's PPA:

 https://edge.launchpad.net/~storm/+archive/ppa

You can find the release files at:

 https://launchpad.net/storm/+download

You can always get the latest source code from Launchpad:

 bzr branch lp:storm

Finally, you can join us in the #storm channel on irc.freenode.net
and on the Storm mailing list:

 https://lists.canonical.com/mailman/listinfo/storm

Read on for more...

Code to manage and migrate database schemas
-------------------------------------------

The new ``storm.schema`` package includes a generalized version of the code
used by the Landscape team for their schemas.

The ``Schema`` class can be used to ``create``, ``drop``, ``delete`` and
``upgrade`` database schemas. A ``Store`` may have a single schema. The
schema is defined by the series of SQL statements that should be used to
create, drop and clear the schema, respectively; and by a patch package used
to upgrade it.

A patch package is simply a Python package that contains files for each patch
level in the series. Each file must be named ``patch_N.py``, where ``N`` is
the numeric version of the patch in the series (using ascending natural
numbers). The patch files must define an ``apply`` callable taking a
``Store`` instance as its only argument. This will be called when the patch
gets applied.

Here's an example, where ``patch_package`` is a Python module
containing database patches used to upgrade the schema over time, and
``store`` is a Storm ``Store``:

>>> from storm.schema import Schema
>>> creates = ['CREATE TABLE person (id INTEGER, name TEXT)']
>>> drops = ['DROP TABLE person']
>>> deletes = ['DELETE FROM person']
>>> import patch_package
>>> schema = Schema(creates, drops, deletes, patch_package)
>>> schema.upgrade(store)

While you can use the schema's ``create`` method separately, ``upgrade`` is
sufficient alone. It will create the schema if it does not exist, and
otherwise will run unapplyed patches to an existing schema. Note that this
approach therefore expects the "creates" SQL (that is, the second line of the
example above) to be maintained alongside patches--it should be *equivalent*
to running all patches.

storm.zope.testing added testresources support
----------------------------------------------

If you would like to use testresources
(https://edge.launchpad.net/testresources) with your Storm tests, a
storm.zope.testing.ZStormResourceManager class to manage a set of stores
registered with ZStorm is now available. It can be used roughly like this::

    from testresources import ResourcedTestCase
    from storm.zope.testing import ZStormResourceManager
    from storm.schema import Schema

    name = "test"
    uri = "sqlite:"
    schema = Schema(...)
    manager = ZStormResourceManager({name: (uri, schema)})

    class MyTest(ResourcedTestCase):

        resources = [("zstorm", manager)]

        def test_stuff(self):
            store = self.zstorm.get("test")
            store.execute(...)

Comparable expressions (such as Column and Alias) provide new
startswith(), endswith() and contains_string() methods. These
methods perform prefix, suffix and substring comparisons using LIKE.
Strings used with these methods are automatically escaped.

Changelog 

View the full changelog

Improvements
------------
 - Include code to manage and migrate database schemas. See the
   storm.schema sub-package (bug #250412).
 - Added a storm.zope.testing.ZStormResourceManager class to manage a
   set of stores registered with ZStorm (bug #618704).
 - When a TimeoutError is raised it includes a description about why
   the exception was raised, to help make it easier to reason about
   timeout-related issues (bug #617973).
 - Improved the IResultSet interface to document the rationale of why some
   attributes are not included (bug #659883).

Bug fixes
---------
 - Make storm compatible with psycopg2 2.2 (bug #585704).
 - Fix bug #620615, which caused lazy expressions to cause subsequent
   loading of objects to explode if unflushed.
 - Fix bug #620508, which caused slicing a ResultSet to break subsequent
   count() calls.
 - Fix bug #659708, correcting the behavior of the sqlobject is_empty
   and __nonzero__ methods.
 - Fix bug #619017, which caused __storm_loaded__ to be called without
   its object's variables defined if the object were in the alive cache but
   disappeared.

0 blueprints and 9 bugs targeted

Bug report Importance Assignee Status
620508 #620508 Slicing a ResultSet breaks subsequent count() calls. 3 High Thomas Herve  10 Fix Released
620615 #620615 please contact the developers 3 High Gustavo Niemeyer  10 Fix Released
659078 #659078 sqlobject is_empty and __nonzero__ are incorrect 3 High Jeroen T. Vermeulen  10 Fix Released
585704 #585704 Storm test suite fails when using psycopg2 2.2 4 Medium James Henstridge  10 Fix Released
619017 #619017 __storm_loaded__ called on empty object 4 Medium Thomas Herve  10 Fix Released
250412 #250412 Provide a way to manage and migrate database schemas 5 Low Free Ekanayaka  10 Fix Released
617973 #617973 timeouterror could be more clear about the implications 5 Low Jamu Kakar  10 Fix Released
659883 #659883 IResultSet is missing several methods that exist on ResultSet 5 Low Gavin Panella  10 Fix Released
618704 #618704 Add a storm testresource to manage stores in unit tests 1 Undecided Free Ekanayaka  10 Fix Released
This milestone contains Public information
Everyone can see this information.