[Checkins] SVN: zope.cachedescriptors/trunk/ Add more information about removal of ZODB dependency.
Dan Korostelev
nadako at gmail.com
Mon Mar 9 18:56:50 EDT 2009
Log message for revision 97737:
Add more information about removal of ZODB dependency.
Remove zpkg-related stuff.
Clean up package description and documentation a bit.
Change package mailing list address to zope-dev at zope.org.
Changed:
U zope.cachedescriptors/trunk/CHANGES.txt
U zope.cachedescriptors/trunk/README.txt
U zope.cachedescriptors/trunk/buildout.cfg
U zope.cachedescriptors/trunk/setup.py
D zope.cachedescriptors/trunk/src/zope/cachedescriptors/DEPENDENCIES.cfg
U zope.cachedescriptors/trunk/src/zope/cachedescriptors/README.txt
U zope.cachedescriptors/trunk/src/zope/cachedescriptors/method.txt
U zope.cachedescriptors/trunk/src/zope/cachedescriptors/property.txt
-=-
Modified: zope.cachedescriptors/trunk/CHANGES.txt
===================================================================
--- zope.cachedescriptors/trunk/CHANGES.txt 2009-03-09 22:56:48 UTC (rev 97736)
+++ zope.cachedescriptors/trunk/CHANGES.txt 2009-03-09 22:56:50 UTC (rev 97737)
@@ -1,11 +1,22 @@
-Changes for zope.cachedescriptors
-=================================
+=======
+CHANGES
+=======
3.5.0 (unreleased)
------------------
-- Removed dependency on ZODB.
+- Remove dependency on ZODB by allowing to specify storage factory for
+ ``zope.cachedescriptors.method.cachedIn`` which is now `dict` by default.
+ If you need to use BTree instead, you must pass it as `factory` argument
+ to the ``zope.cachedescriptors.method.cachedIn`` decorator.
+- Remove zpkg-related file.
+
+- Clean up package description and documentation a bit.
+
+- Change package mailing list address to zope-dev at zope.org, as
+ zope3-dev at zope.org is now retired.
+
3.4.0 (2007-08-30)
------------------
Modified: zope.cachedescriptors/trunk/README.txt
===================================================================
--- zope.cachedescriptors/trunk/README.txt 2009-03-09 22:56:48 UTC (rev 97736)
+++ zope.cachedescriptors/trunk/README.txt 2009-03-09 22:56:50 UTC (rev 97737)
@@ -1,4 +1 @@
-Cached Descriptors
-******************
-
-.. contents::
+See src/zope/cachedescriptors/README.txt.
Modified: zope.cachedescriptors/trunk/buildout.cfg
===================================================================
--- zope.cachedescriptors/trunk/buildout.cfg 2009-03-09 22:56:48 UTC (rev 97736)
+++ zope.cachedescriptors/trunk/buildout.cfg 2009-03-09 22:56:50 UTC (rev 97737)
@@ -2,8 +2,6 @@
develop = .
parts = test
-find-links = http://download.zope.org/distribution/
-
[test]
recipe = zc.recipe.testrunner
eggs = zope.cachedescriptors
Modified: zope.cachedescriptors/trunk/setup.py
===================================================================
--- zope.cachedescriptors/trunk/setup.py 2009-03-09 22:56:48 UTC (rev 97736)
+++ zope.cachedescriptors/trunk/setup.py 2009-03-09 22:56:50 UTC (rev 97737)
@@ -15,35 +15,18 @@
$Id$
"""
-
import os
-
from setuptools import setup, find_packages
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
-long_description = (
- read('README.txt')
- + '\n' +
- read('CHANGES.txt')
- + '\n' +
- 'Detailed Documentation\n'
- '**********************\n'
- + '\n' +
- read('src', 'zope', 'cachedescriptors', 'README.txt')
- + '\n' +
- read('src', 'zope', 'cachedescriptors', 'property.txt')
- + '\n' +
- read('src', 'zope', 'cachedescriptors', 'method.txt')
- )
-
setup(
name='zope.cachedescriptors',
version='3.5.0dev',
url='http://pypi.python.org/pypi/zope.cachedescriptors',
author='Zope Corporation and Contributors',
- author_email='zope3-dev at zope.org',
+ author_email='zope-dev at zope.org',
license='ZPL 2.1',
classifiers=[
'Development Status :: 5 - Production/Stable',
@@ -54,8 +37,16 @@
'Topic :: Internet :: WWW/HTTP',
'Topic :: Software Development',
],
- description='Zope3 Cached Descriptors',
- long_description=long_description,
+ description='Method and property caching decorators',
+ long_description=\
+ '.. contents::\n\n' +
+ read('src', 'zope', 'cachedescriptors', 'README.txt')
+ + '\n' +
+ read('src', 'zope', 'cachedescriptors', 'property.txt')
+ + '\n' +
+ read('src', 'zope', 'cachedescriptors', 'method.txt')
+ + '\n' +
+ read('CHANGES.txt'),
packages=find_packages('src'),
package_dir={'': 'src'},
Deleted: zope.cachedescriptors/trunk/src/zope/cachedescriptors/DEPENDENCIES.cfg
===================================================================
--- zope.cachedescriptors/trunk/src/zope/cachedescriptors/DEPENDENCIES.cfg 2009-03-09 22:56:48 UTC (rev 97736)
+++ zope.cachedescriptors/trunk/src/zope/cachedescriptors/DEPENDENCIES.cfg 2009-03-09 22:56:50 UTC (rev 97737)
@@ -1 +0,0 @@
-persistent
Modified: zope.cachedescriptors/trunk/src/zope/cachedescriptors/README.txt
===================================================================
--- zope.cachedescriptors/trunk/src/zope/cachedescriptors/README.txt 2009-03-09 22:56:48 UTC (rev 97736)
+++ zope.cachedescriptors/trunk/src/zope/cachedescriptors/README.txt 2009-03-09 22:56:50 UTC (rev 97737)
@@ -1,3 +1,4 @@
+==================
Cached descriptors
==================
@@ -23,3 +24,5 @@
defined to depend on.
**Note**, only a cache based on arguments has been implemented so far.
+
+ See method.txt.
Modified: zope.cachedescriptors/trunk/src/zope/cachedescriptors/method.txt
===================================================================
--- zope.cachedescriptors/trunk/src/zope/cachedescriptors/method.txt 2009-03-09 22:56:48 UTC (rev 97736)
+++ zope.cachedescriptors/trunk/src/zope/cachedescriptors/method.txt 2009-03-09 22:56:50 UTC (rev 97737)
@@ -1,8 +1,8 @@
Method Cache
-============
+------------
cachedIn
---------
+~~~~~~~~
The `cachedIn` property allows to specify the attribute where to store the
computed value:
Modified: zope.cachedescriptors/trunk/src/zope/cachedescriptors/property.txt
===================================================================
--- zope.cachedescriptors/trunk/src/zope/cachedescriptors/property.txt 2009-03-09 22:56:48 UTC (rev 97736)
+++ zope.cachedescriptors/trunk/src/zope/cachedescriptors/property.txt 2009-03-09 22:56:50 UTC (rev 97737)
@@ -1,11 +1,14 @@
Cached Properties
-=================
+-----------------
Cached properties are computed properties that cache their computed
values. They take into account instance attributes that they depend
on, so when the instance attributes change, the properties will change
the values they return.
+CachedProperty
+~~~~~~~~~~~~~~
+
Cached properties cache their data in _v_ attributes, so they are
also useful for managing the computation of volatile attributes for
persistent objects. Let's look at an example::
@@ -59,7 +62,7 @@
Lazy Computed Attributes
-------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~
The `property` module provides another descriptor that supports a
slightly different caching model: lazy attributes. Like cached
@@ -76,10 +79,10 @@
... def __init__(self, x, y):
... self.x, self.y = x, y
...
+ ... @property.Lazy
... def radius(self):
... print 'computing radius'
... return math.sqrt(self.x**2 + self.y**2)
- ... radius = property.Lazy(radius)
>>> point = Point(1.0, 2.0)
@@ -129,8 +132,8 @@
'5.66'
-readproperties
-==============
+readproperty
+~~~~~~~~~~~~
readproperties are like lazy computed attributes except that the
attribute isn't set by the property::
@@ -141,10 +144,10 @@
... def __init__(self, x, y):
... self.x, self.y = x, y
...
+ ... @property.readproperty
... def radius(self):
... print 'computing radius'
... return math.sqrt(self.x**2 + self.y**2)
- ... radius = property.readproperty(radius)
>>> point = Point(1.0, 2.0)
@@ -165,7 +168,7 @@
cachedIn
-========
+~~~~~~~~
The `cachedIn` property allows to specify the attribute where to store the
computed value::
More information about the Checkins
mailing list