Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
243c4e27
Commit
243c4e27
authored
Oct 05, 2002
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge changes from release branch into trunk.
parent
29f4cd3f
Changes
81
Hide whitespace changes
Inline
Side-by-side
Showing
81 changed files
with
2130 additions
and
2045 deletions
+2130
-2045
doc/ZEO/ClientStorage.txt
doc/ZEO/ClientStorage.txt
+9
-2
doc/ZEO/NonZopeREADME.txt
doc/ZEO/NonZopeREADME.txt
+4
-4
doc/ZEO/ZopeREADME.txt
doc/ZEO/ZopeREADME.txt
+3
-3
doc/guide/TODO
doc/guide/TODO
+0
-2
doc/guide/links.tex
doc/guide/links.tex
+8
-0
doc/guide/modules.tex
doc/guide/modules.tex
+80
-40
doc/guide/prog-zodb.tex
doc/guide/prog-zodb.tex
+24
-151
doc/guide/transactions.tex
doc/guide/transactions.tex
+11
-4
doc/guide/zeo.tex
doc/guide/zeo.tex
+33
-51
doc/guide/zodb.dvi
doc/guide/zodb.dvi
+0
-0
doc/guide/zodb.tex
doc/guide/zodb.tex
+1
-1
doc/guide/zodb/about.html
doc/guide/zodb/about.html
+10
-9
doc/guide/zodb/contents.html
doc/guide/zodb/contents.html
+33
-33
doc/guide/zodb/images.tex
doc/guide/zodb/images.tex
+2
-4
doc/guide/zodb/index.html
doc/guide/zodb/index.html
+39
-40
doc/guide/zodb/node10.html
doc/guide/zodb/node10.html
+8
-28
doc/guide/zodb/node11.html
doc/guide/zodb/node11.html
+7
-35
doc/guide/zodb/node12.html
doc/guide/zodb/node12.html
+14
-7
doc/guide/zodb/node13.html
doc/guide/zodb/node13.html
+8
-7
doc/guide/zodb/node14.html
doc/guide/zodb/node14.html
+17
-11
doc/guide/zodb/node15.html
doc/guide/zodb/node15.html
+6
-13
doc/guide/zodb/node16.html
doc/guide/zodb/node16.html
+8
-7
doc/guide/zodb/node17.html
doc/guide/zodb/node17.html
+8
-7
doc/guide/zodb/node18.html
doc/guide/zodb/node18.html
+17
-105
doc/guide/zodb/node19.html
doc/guide/zodb/node19.html
+31
-26
doc/guide/zodb/node2.html
doc/guide/zodb/node2.html
+4
-3
doc/guide/zodb/node20.html
doc/guide/zodb/node20.html
+64
-31
doc/guide/zodb/node22.html
doc/guide/zodb/node22.html
+156
-0
doc/guide/zodb/node23.html
doc/guide/zodb/node23.html
+26
-70
doc/guide/zodb/node24.html
doc/guide/zodb/node24.html
+21
-30
doc/guide/zodb/node25.html
doc/guide/zodb/node25.html
+22
-29
doc/guide/zodb/node26.html
doc/guide/zodb/node26.html
+56
-24
doc/guide/zodb/node27.html
doc/guide/zodb/node27.html
+22
-17
doc/guide/zodb/node28.html
doc/guide/zodb/node28.html
+139
-39
doc/guide/zodb/node29.html
doc/guide/zodb/node29.html
+31
-21
doc/guide/zodb/node3.html
doc/guide/zodb/node3.html
+4
-3
doc/guide/zodb/node30.html
doc/guide/zodb/node30.html
+43
-143
doc/guide/zodb/node31.html
doc/guide/zodb/node31.html
+98
-29
doc/guide/zodb/node32.html
doc/guide/zodb/node32.html
+63
-41
doc/guide/zodb/node33.html
doc/guide/zodb/node33.html
+21
-77
doc/guide/zodb/node34.html
doc/guide/zodb/node34.html
+31
-72
doc/guide/zodb/node35.html
doc/guide/zodb/node35.html
+31
-22
doc/guide/zodb/node36.html
doc/guide/zodb/node36.html
+32
-30
doc/guide/zodb/node37.html
doc/guide/zodb/node37.html
+109
-28
doc/guide/zodb/node38.html
doc/guide/zodb/node38.html
+42
-28
doc/guide/zodb/node39.html
doc/guide/zodb/node39.html
+48
-69
doc/guide/zodb/node4.html
doc/guide/zodb/node4.html
+6
-5
doc/guide/zodb/node40.html
doc/guide/zodb/node40.html
+37
-32
doc/guide/zodb/node41.html
doc/guide/zodb/node41.html
+80
-47
doc/guide/zodb/node42.html
doc/guide/zodb/node42.html
+28
-36
doc/guide/zodb/node43.html
doc/guide/zodb/node43.html
+48
-74
doc/guide/zodb/node44.html
doc/guide/zodb/node44.html
+118
-27
doc/guide/zodb/node45.html
doc/guide/zodb/node45.html
+36
-49
doc/guide/zodb/node46.html
doc/guide/zodb/node46.html
+26
-117
doc/guide/zodb/node47.html
doc/guide/zodb/node47.html
+30
-37
doc/guide/zodb/node48.html
doc/guide/zodb/node48.html
+27
-27
doc/guide/zodb/node49.html
doc/guide/zodb/node49.html
+24
-31
doc/guide/zodb/node5.html
doc/guide/zodb/node5.html
+4
-3
doc/guide/zodb/node50.html
doc/guide/zodb/node50.html
+32
-26
doc/guide/zodb/node51.html
doc/guide/zodb/node51.html
+51
-27
doc/guide/zodb/node6.html
doc/guide/zodb/node6.html
+4
-3
doc/guide/zodb/node7.html
doc/guide/zodb/node7.html
+4
-3
doc/guide/zodb/node8.html
doc/guide/zodb/node8.html
+7
-7
doc/guide/zodb/node9.html
doc/guide/zodb/node9.html
+4
-3
doc/guide/zodb/zeo.html
doc/guide/zodb/zeo.html
+21
-21
doc/guide/zodb/zodb.css
doc/guide/zodb/zodb.css
+15
-2
doc/guide/zodb/zodb.html
doc/guide/zodb/zodb.html
+39
-40
src/BTrees/BTreeTemplate.c
src/BTrees/BTreeTemplate.c
+3
-3
src/BTrees/BucketTemplate.c
src/BTrees/BucketTemplate.c
+3
-3
src/BTrees/SetTemplate.c
src/BTrees/SetTemplate.c
+3
-3
src/BTrees/TreeSetTemplate.c
src/BTrees/TreeSetTemplate.c
+3
-3
src/ZEO/ClientStorage.py
src/ZEO/ClientStorage.py
+12
-10
src/ZEO/StorageServer.py
src/ZEO/StorageServer.py
+1
-1
src/ZEO/__init__.py
src/ZEO/__init__.py
+1
-1
src/ZEO/simul.py
src/ZEO/simul.py
+1
-1
src/ZEO/tests/ConnectionTests.py
src/ZEO/tests/ConnectionTests.py
+2
-2
src/ZEO/tests/testConnection.py
src/ZEO/tests/testConnection.py
+1
-1
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+12
-1
src/ZEO/version.txt
src/ZEO/version.txt
+1
-1
src/ZEO/zrpc/client.py
src/ZEO/zrpc/client.py
+1
-1
src/ZODB/__init__.py
src/ZODB/__init__.py
+1
-1
No files found.
doc/ZEO/ClientStorage.txt
View file @
243c4e27
...
@@ -23,7 +23,9 @@ ClientStorage
...
@@ -23,7 +23,9 @@ ClientStorage
- a sequence of the previous two
- a sequence of the previous two
If a sequence of addresses is specified, the client will use the
If a sequence of addresses is specified, the client will use the
first server from the list that it can connect to.
first server from the list that it can connect to, subject to the
constraints imposed by the optional read_only and
read_only_fallback keyword arguments.
The ClientStorage constructor provides a number of additional
The ClientStorage constructor provides a number of additional
options (arguments). The full list of arguments is:
options (arguments). The full list of arguments is:
...
@@ -36,7 +38,7 @@ ClientStorage
...
@@ -36,7 +38,7 @@ ClientStorage
default name for both the server and client is '1'.
default name for both the server and client is '1'.
cache_size -- The number of bytes to allow for the client cache.
cache_size -- The number of bytes to allow for the client cache.
The default is 20
,000,000
. A large cache can significantly
The default is 20
MB
. A large cache can significantly
increase the performance of a ZEO system. For applications that
increase the performance of a ZEO system. For applications that
have a large database, the default size may be too small.
have a large database, the default size may be too small.
...
@@ -93,3 +95,8 @@ ClientStorage
...
@@ -93,3 +95,8 @@ ClientStorage
Each storage served by a ZEO server can be configured as either
Each storage served by a ZEO server can be configured as either
read-write or read-only.
read-write or read-only.
read_only_fallback -- A flag indicating whether a read-only
remote storage should be acceptable as a fallback when no
writable storages are available. Defaults to false. At most
one of read_only and read_only_fallback should be true.
doc/ZEO/NonZopeREADME.txt
View file @
243c4e27
...
@@ -20,7 +20,7 @@ Zope Enterprize Objects
...
@@ -20,7 +20,7 @@ Zope Enterprize Objects
python test.py -v
python test.py -v
Run the script with the -h option for a full list of options. The
Run the script with the -h option for a full list of options. The
ZEO 2.0
a1 release contains 87
unit tests on Unix.
ZEO 2.0
b2 release contains 122
unit tests on Unix.
Starting (and configuring) the ZEO Server
Starting (and configuring) the ZEO Server
...
@@ -75,6 +75,6 @@ Zope Enterprize Objects
...
@@ -75,6 +75,6 @@ Zope Enterprize Objects
Dependencies on other modules
Dependencies on other modules
ZEO depends on other modules that are distributed with
ZEO depends on other modules that are distributed with
ZODB3 and
StandaloneZODB and with Zope. You can download StandaloneZODB
with Zope. You can download ZODB3 from
from
http://www.zope.org/Products/StandaloneZODB.
http://www.zope.org/Products/StandaloneZODB.
doc/ZEO/ZopeREADME.txt
View file @
243c4e27
Zope Enterprise Objects
Zope Enterprise Objects
(ZEO)
Installation
Installation
...
@@ -19,7 +19,7 @@ Zope Enterprise Objects
...
@@ -19,7 +19,7 @@ Zope Enterprise Objects
python test.py -v
python test.py -v
Run the script with the -h option for a full list of options. The
Run the script with the -h option for a full list of options. The
ZEO 2.0
a1 release contains 87
unit tests on Unix.
ZEO 2.0
b2 release contains 122
unit tests on Unix.
Starting (and configuring) the ZEO Server
Starting (and configuring) the ZEO Server
...
@@ -93,4 +93,4 @@ Zope Enterprise Objects
...
@@ -93,4 +93,4 @@ Zope Enterprise Objects
once with the environment variable FORCE_PRODUCT_LOAD set.
once with the environment variable FORCE_PRODUCT_LOAD set.
The interaction between ZEO and Zope product installation is
The interaction between ZEO and Zope product installation is
unfortunate.
In the future, this interaction will be removed by
unfortunate.
doc/guide/TODO
View file @
243c4e27
Update text to use BTrees, not BTree
Write section on __setstate__
Write section on __setstate__
Connection.sync seems to work now; note this
Continue working on it
Continue working on it
Suppress the full GFDL text in the PDF/PS versions
Suppress the full GFDL text in the PDF/PS versions
doc/guide/links.tex
View file @
243c4e27
...
@@ -17,6 +17,14 @@ how it's actually implemented. A definitive reference, and highly recommended.
...
@@ -17,6 +17,14 @@ how it's actually implemented. A definitive reference, and highly recommended.
\\
\\
\url
{
http://www.python.org/workshops/2000-01/proceedings/papers/fulton/zodb3.html
}
\url
{
http://www.python.org/workshops/2000-01/proceedings/papers/fulton/zodb3.html
}
Persistent Programing with ZODB, by Jeremy Hylton and Barry Warsaw:
\\
Slides for a tutorial presented at the 10th Python conference. Covers
much of the same ground as this guide, with more details in some areas
and less in others.
\\
\url
{
http://www.zope.org/Members/bwarsaw/ipc10-slides
}
Download link for ZEO:
\\
Download link for ZEO:
\\
\url
{
http://www.zope.org/Products/ZEO/
}
\url
{
http://www.zope.org/Products/ZEO/
}
...
...
doc/guide/modules.tex
View file @
243c4e27
...
@@ -2,13 +2,12 @@
...
@@ -2,13 +2,12 @@
% Related Modules
% Related Modules
% PersistentMapping
% PersistentMapping
% PersistentList
% PersistentList
% BTree
% BTrees
% Catalog
\section
{
Related Modules
}
\section
{
Related Modules
}
The ZODB package includes a number of related modules that provide
The ZODB package includes a number of related modules that provide
useful data types such as BTrees
or full-text indexes
.
useful data types such as BTrees.
\subsection
{
\module
{
ZODB.PersistentMapping
}}
\subsection
{
\module
{
ZODB.PersistentMapping
}}
...
@@ -40,51 +39,92 @@ value for \var{initlist}, a regular Python list is used.
...
@@ -40,51 +39,92 @@ value for \var{initlist}, a regular Python list is used.
Python lists do.
Python lists do.
\subsection
{
B-tree Modules
}
\subsection
{
BTrees Package
}
%here's one: how does one implement searching? i would have expected the
%btree objects to have ``find key nearest to this'' and ``next'' methods,
%(like bsddb's set_location)...
%
% -- erno
When programming with the ZODB, Python dictionaries aren't always what
When programming with the ZODB, Python dictionaries aren't always what
you need. The most important case is where you want to store a very
you need. The most important case is where you want to store a very
large mapping. When a Python dictionary is accessed in a ZODB, the
large mapping. When a Python dictionary is accessed in a ZODB, the
whole dictionary has to be unpickled and brought into memory. If
whole dictionary has to be unpickled and brought into memory. If
you're storing something very large, such as a 100,000-entry user
you're storing something very large, such as a 100,000-entry user
database, unpickling such a large object will be slow. B
-t
rees are a
database, unpickling such a large object will be slow. B
T
rees are a
balanced tree data structure that behave like a mapping but distribute
balanced tree data structure that behave like a mapping but distribute
keys throughout a number of tree nodes. Nodes are then only unpickled
keys throughout a number of tree nodes. The nodes are stored in
and brought into memory as they're accessed, so the entire tree
sorted order. Nodes are then only unpickled and brought into memory
doesn't have to occupy memory (unless you really are touching every
as they're accessed, so the entire tree doesn't have to occupy memory
single key).
(unless you really are touching every single key).
There are four different BTree modules provided. One of them, the
The BTrees package provides a large collection of related data
\module
{
BTree
}
module, provides the most general data type; the keys
structures. There are variants of the data structures specialized to
and values in the B-tree can be any Python object. Some specialized B-tree
handle integer values, which are faster and use less memory. There
modules require that the keys, and perhaps even the values, to be of a
are four modules that handle the different variants. The first two
certain type, and provide faster performance because of this limitation.
letters of the module name specify the types of the keys and values in
mappings -- O for any object and I for integer. The
\begin{itemize}
\module
{
BTrees.IOBTree
}
module provides a mapping that accepts integer
\item
[ \module{IOBTree} ]
requires the keys to be integers.
keys and arbitrary objects as values.
The module name reminds you of this; the
\module
{
IOBTree
}
module
maps Integers to Objects.
The four data structures provide by each module are a btree, a bucket,
a tree set, and a set. The btree and bucket types are mappings and
\item
[ \module{OIBTree} ]
requires the values to be integers,
support all the usual mapping methods, e.g.
\function
{
update()
}
and
mapping Objects to Integers.
\function
{
keys()
}
. The tree set and set types are similar to mappings
but they have no values; they support the methods that make sense for
\item
[ \module{IIBTree} ]
is strictest, requiring that both keys and values must be integers.
a mapping with no keys, e.g.
\function
{
keys()
}
but not
\function
{
items()
}
. The bucket and set types are the individual
\end{itemize}
building blocks for btrees and tree sets, respectively. A bucket or
set can be used when you are sure that it will have few elements. If
To use a B-tree, simply import the desired module and call the
the data structure will grow large, you should use a btree or tree
constructor, always named
\function
{
BTree()
}
, to get a B-tree
set.
instance, and then use it like any other mapping:
The four modules are named
\module
{
OOBTree
}
,
\module
{
IOBTree
}
,
\module
{
OIBTree
}
, and
\module
{
IIBTree
}
. The two letter prefixes are
repeated in the data types names. The
\module
{
BTrees.OOBTree
}
module
defines the following types:
\class
{
OOBTree
}
,
\class
{
OOBucket
}
,
\class
{
OOSet
}
, and
\class
{
OOTreeSet
}
.
The
\function
{
keys()
}
,
\function
{
values()
}
, and
\function
{
items()
}
methods do not materialize a list with all of the data. Instead, they
return lazy sequences that fetch data from the BTree as needed. They
also support optional arguments to specify the minium and maximum
values to return.
A BTree object supports all the methods you would expect of a mapping
with a few extensions that exploit the fact that the keys are sorted.
The example below demonstrates how some of the methods work. The
extra methods re
\function
{
minKey()
}
and
\function
{
maxKey()
}
, which
find the minimum and maximum key value subject to an optional bound
argument, and
\function
{
byValue()
}
, which returns value, key pairs
in reversed sorted order subject to an optional minimum bound argument.
\begin{verbatim}
\begin{verbatim}
import IIBTree
>>> from BTrees.OOBTree import OOBTree
iimap = IIBTree.BTree()
>>> t = OOBTree()
iimap[1972] = 27
>>> t.update(
{
1: "red", 2: "green", 3: "blue", 4: "spades"
}
)
>>> len(t)
4
>>> t[2]
'green'
>>> t.keys()
<OOBTreeItems object at 0x40269098>
>>> [k for k in t.keys()] # use a listcomp to get a printable sequence
[1, 2, 3, 4]
>>> [k for k in t.values()]
['red', 'green', 'blue', 'spades']
>>> [k for k in t.values(1, 2)]
['red', 'green']
>>> [k for k in t.values(2)]
['green', 'blue', 'spades']
>>> t.byValue("glue") # all values > "glue"
[('spades', 4), ('red', 1), ('green', 2)]
>>> t.minKey(1.5)
2
\end{verbatim}
\end{verbatim}
Each of the modules also defines some functions that operate on
BTrees --
\function
{
difference()
}
,
\function
{
union()
}
, and
\function
{
difference()
}
. The
\function
{
difference()
}
function returns
a bucket, while the other two methods return a set.
If the keys are integers, then the module also defines
\function
{
multiunion()
}
. If the values are integers, then the module
also defines
\function
{
weightedIntersection()
}
and
\function
{
weighterUnion()
}
. The function doc strings describe each
function briefly.
doc/guide/prog-zodb.tex
View file @
243c4e27
...
@@ -23,59 +23,21 @@ difficulties you encounter.
...
@@ -23,59 +23,21 @@ difficulties you encounter.
\subsubsection
{
Requirements
}
\subsubsection
{
Requirements
}
You'll need Python, of course; version 1.5.2 works with some fixes,
You will need Python 2.1 or higher. The code is packaged using
and it also works with Python 2.0, which is what I primarily use.
Distutils. So it is simply a matter of untarring or unzipping the
The code is packaged using Distutils, the new distribution tools for
Python introduced in Python 2.0. If you're using 1.5.2, first you'll
have to get the latest Distutils release from the Distutils SIG page
at
\url
{
http://www.python.org/sigs/distutils-sig/download.html
}
and
install it. This is simply a matter of untarring or unzipping the
release package, and then running
\code
{
python setup.py install
}
.
release package, and then running
\code
{
python setup.py install
}
.
If you're using 1.5.2 and have installed previous versions of the
Distutils, be sure to get the very latest version, since developing
the ZODB distribution turned up some bugs along the way. If you
encounter problems compiling
\file
{
ZODB/TimeStamp.c
}
or your compiler reports
an error like ``Can't create build/temp.linux2/ExtensionClass.o: No
such file or directory'', you need an updated version. Old versions of
Distutils have two bugs which affect the setup scripts. First, for a
long time the
\code
{
define
_
macros
}
keyword in setup.py files didn't work due
to a Distutils bug, so I hacked TimeStamp.c in earlier releases. The
Distutils have since been fixed, and the hack became unnecessary, so I
removed it. Second, the code that creates directories tries to be
smart and caches them to save time by not trying to create a directory
twice, but this code was broken in old versions.
You'll need a C compiler to build the packages, because there are
You'll need a C compiler to build the packages, because there are
various C extension modules. At the moment no one is making Windows
various C extension modules. At the moment no one is making Windows
binaries available, so you'll need a Windows development environment to use the
binaries available, so you'll need a Windows development environment
to build ZODB.
\subsubsection
{
Installing the Packages
}
\subsubsection
{
Installing the Packages
}
Download the ZODB tarball containing all the packages for both ZODB
Download the ZODB tarball containing all the packages for both ZODB
and ZEO from
\url
{
http://www.amk.ca/files/zodb/
}
.
and ZEO from
\url
{
http://www.zope.org/Products/StandaloneZODB
}
. See
the
\file
{
README.txt
}
file in the top level of the release directory
To build the packages, you must go into the individual directories and
for details on building, testing, and installing.
build and install them one by one. They should be built and installed
in this order:
\begin{enumerate}
\item
\code
{
zodb-basic
}
\item
ExtensionClass
\item
ZODB
\item
\code
{
BTree
}
and
\code
{
BTrees
}
\item
ZEO
\end{enumerate}
In particular, you must install ExtensionClass before building the
ZODB package; otherwise, the compilation in the ZODB package will die
complaining that it can't find ExtensionClass.h. You can manually
hack the
\#
include path to make it work without installing
ExtensionClass first, but that's a bit hackish.
If you encounter any problems, please let me know at
\email
{
akuchlin@mems-exchange.org
}
.
\subsection
{
How ZODB Works
}
\subsection
{
How ZODB Works
}
...
@@ -113,10 +75,16 @@ state.
...
@@ -113,10 +75,16 @@ state.
\item
[Consistency]
means that the data cannot be placed into a
\item
[Consistency]
means that the data cannot be placed into a
logically invalid state; sanity checks can be written and enforced.
logically invalid state; sanity checks can be written and enforced.
Usually this is done by defining a database schema, and requiring the
Usually this is done by defining a database schema, and requiring
data always matches the schema. For example, this might enforce that
the data always matches the schema. There are two typical
the
\code
{
order
_
number
}
attribute is always an integer, and not a
approaches to consistency. One is to enforce rules about the types
string, tuple, or other object.
of objects and attribute; for example, enforce that the
\code
{
order
_
number
}
attribute is always an integer, and not a
string, tuple, or other object. Another is to guarantee consistency
across data structures; for example, that any object with an
\code
{
order
_
number
}
attribute must also appear in the
\code
{
orders
_
table
}
object. In general, atomicity and isolation make
it possible for applications to provide consistency.
\item
[Isolation]
means that two programs or threads running in two
\item
[Isolation]
means that two programs or threads running in two
different transactions cannot see each other's changes until they
different transactions cannot see each other's changes until they
...
@@ -144,7 +112,7 @@ implement the \class{Storage} interface.
...
@@ -144,7 +112,7 @@ implement the \class{Storage} interface.
storing and retrieving objects from some form of long-term storage.
storing and retrieving objects from some form of long-term storage.
A few different types of Storage have been written, such as
A few different types of Storage have been written, such as
\class
{
FileStorage
}
, which uses regular disk files, and
\class
{
FileStorage
}
, which uses regular disk files, and
\class
{
Berkeley
Storage
}
, which uses Sleepycat Software's BerkeleyDB
\class
{
bsddb3
Storage
}
, which uses Sleepycat Software's BerkeleyDB
database. You could write a new Storage that stored objects in a
database. You could write a new Storage that stored objects in a
relational database or Metakit file, for example, if that would
relational database or Metakit file, for example, if that would
better suit your application. Two example storages,
better suit your application. Two example storages,
...
@@ -156,7 +124,7 @@ implement the \class{Storage} interface.
...
@@ -156,7 +124,7 @@ implement the \class{Storage} interface.
created per process.
created per process.
\item
Finally, the
\class
{
Connection
}
class caches objects, and moves
\item
Finally, the
\class
{
Connection
}
class caches objects, and moves
them into and out of object storage. A multi-threaded program
can
them into and out of object storage. A multi-threaded program
should
open a separate
\class
{
Connection
}
instance for each thread.
open a separate
\class
{
Connection
}
instance for each thread.
Different threads can then modify objects and commit their
Different threads can then modify objects and commit their
modifications independently.
modifications independently.
...
@@ -199,6 +167,10 @@ needed for the following \code{from...import} statement to work
...
@@ -199,6 +167,10 @@ needed for the following \code{from...import} statement to work
correctly, since the ZODB code does some magical tricks with
correctly, since the ZODB code does some magical tricks with
importing.
importing.
The
\class
{
Persistent
}
base class is an
\module
{
ExtensionClass
}
class. As a result, it not compatible with new-style classes or types
in Python 2.2 and up.
For simplicity, in the examples the
\class
{
User
}
class will
For simplicity, in the examples the
\class
{
User
}
class will
simply be used as a holder for a bunch of attributes. Normally the
simply be used as a holder for a bunch of attributes. Normally the
class would define various methods that add functionality, but that
class would define various methods that add functionality, but that
...
@@ -304,11 +276,6 @@ defined on ExtensionClasses. The most important ones are the
...
@@ -304,11 +276,6 @@ defined on ExtensionClasses. The most important ones are the
arithmetic operations:
\method
{__
radd
__}
,
\method
{__
rsub
__}
, and so
arithmetic operations:
\method
{__
radd
__}
,
\method
{__
rsub
__}
, and so
forth.
forth.
\item
Python's built-in
\function
{
isinstance()
}
and
\function
{
issubclass()
}
functions don't work properly on ExtensionClasses. Solution: use
custom
\function
{
isinstance()
}
and
\function
{
issubclass()
}
functions
that handle ExtensionClasses correctly.
\item
Recent versions of the ZODB allow writing a class with
\item
Recent versions of the ZODB allow writing a class with
\method
{__
setattr
__}
,
\method
{__
getattr
__}
, or
\method
{__
delattr
__}
methods. (Older versions didn't support this at all.)
\method
{__
setattr
__}
,
\method
{__
getattr
__}
, or
\method
{__
delattr
__}
methods. (Older versions didn't support this at all.)
If you write such a
\method
{__
setattr
__}
or
\method
{__
delattr
__}
method,
If you write such a
\method
{__
setattr
__}
or
\method
{__
delattr
__}
method,
...
@@ -414,100 +381,6 @@ instances as possible, they are still not instances, and
...
@@ -414,100 +381,6 @@ instances as possible, they are still not instances, and
no attempt is ever made to call
\method
{__
cmp
__}
. Perhaps Python 2.2
no attempt is ever made to call
\method
{__
cmp
__}
. Perhaps Python 2.2
will repair this.
will repair this.
\subsubsection
{
Fixing
\function
{
isinstance
}
and
\function
{
issubclass
}}
Python's built-in functions
\function
{
isinstance()
}
and
\function
{
issubclass
}
don't
work on ExtensionClass instances, for much the same reason that
\method
{__
cmp
__}
is never called; in some bits of the Python core code,
branches are taken only if an object is of the
\class
{
InstanceType
}
type, and this can never be true for an ExtensionClass instance.
Python 2.1 tried to fix this, and changed these functions slightly in
an effort to make them work for ExtensionClasses; unfortunately, the
changes didn't work.
The solution is to use customized versions of these functions that
handle ExtensionClasses specially and fall back to the built-in
version otherwise. Here are the versions we've written at the MEMS Exchange:
\begin{verbatim}
# The built-in 'isinstance()' and 'issubclass()' won't work on
# ExtensionClasses, so you have to use the versions supplied here.
# (But those versions work fine on regular instances and classes too,
# so you should *always* use them.)
def issubclass (class1, class2):
"""A version of 'issubclass' that works with extension classes
as well as regular Python classes.
"""
# Both class objects are regular Python classes, so use the
# built-in 'issubclass()'.
if type(class1) is ClassType and type(class2) is ClassType:
return
__
builtin
__
.issubclass(class1, class2)
# Both so-called class objects have a '
__
bases
__
' attribute: ie.,
# they aren't regular Python classes, but they sure look like them.
# Assume they are extension classes and reimplement what the builtin
# 'issubclass()' does behind the scenes.
elif hasattr(class1, '
__
bases
__
') and hasattr(class2, '
__
bases
__
'):
# XXX it appears that "ec.
__
class
__
is type(ec)" for an
# extension class 'ec': could we/should we use this as an
# additional check for extension classes?
# Breadth-first traversal of class1's superclass tree. Order
# doesn't matter because we're just looking for a "yes/no"
# answer from the tree; if we were trying to resolve a name,
# order would be important!
stack = [class1]
while stack:
if stack[0] is class2:
return 1
stack.extend(list(stack[0].
__
bases
__
))
del stack[0]
else:
return 0
# Not a regular class, not an extension class: blow up for consistency
# with builtin 'issubclass()"
else:
raise TypeError, "arguments must be class or ExtensionClass objects"
# issubclass ()
def isinstance (object, klass):
"""A version of 'isinstance' that works with extension classes
as well as regular Python classes."""
if type(klass) is TypeType:
return
__
builtin
__
.isinstance(object, klass)
elif hasattr(object, '
__
class
__
'):
return issubclass(object.
__
class
__
, klass)
else:
return 0
\end{verbatim}
I'd recommend putting these functions in a module that always gets
imported. The convention on my work project is to put them in
\file
{
mems/lib/base.py
}
, which contains various fundamental classes
and functions for our system, and access them like this:
\begin{verbatim}
from mems.lib import base
...
if base.isinstance(object, Class): ...
\end{verbatim}
Don't insert the modified functions into Python's
\module
{__
builtin
__}
module, or import just the
\function
{
isinstance()
}
and
\function
{
issubclass
}
functions.
If you consistently use
\function
{
base.isinstance()
}
, then forgetting
to import the
\module
{
base
}
module will result in a
\exception
{
NameError
}
exception. In the
case of a forgotten import, calling the functions directly would use
Python's built-in versions, leading to subtle bugs that might not be
noticed for some time.
\subsubsection
{
\method
{__
getattr
__}
,
\method
{__
delattr
__}
, and
\method
{__
setattr
__}}
\subsubsection
{
\method
{__
getattr
__}
,
\method
{__
delattr
__}
, and
\method
{__
setattr
__}}
Recent versions of ZODB allow writing persistent classes that have
Recent versions of ZODB allow writing persistent classes that have
...
@@ -545,7 +418,7 @@ update them to match the new schema. This can be easy if your network
...
@@ -545,7 +418,7 @@ update them to match the new schema. This can be easy if your network
of object references is quite structured, making it easy to find all
of object references is quite structured, making it easy to find all
the instances of the class being modified. For example, if all
the instances of the class being modified. For example, if all
\class
{
User
}
objects can be found inside a single dictionary or
\class
{
User
}
objects can be found inside a single dictionary or
B
-t
ree, then it would be a simple matter to loop over every
B
T
ree, then it would be a simple matter to loop over every
\class
{
User
}
instance with a
\keyword
{
for
}
statement.
\class
{
User
}
instance with a
\keyword
{
for
}
statement.
This is more difficult if your object graph is less structured; if
This is more difficult if your object graph is less structured; if
\class
{
User
}
objects can be found as attributes of any number of
\class
{
User
}
objects can be found as attributes of any number of
...
...
doc/guide/transactions.tex
View file @
243c4e27
...
@@ -35,7 +35,7 @@ or \method{abort()} method of the \class{Transaction} object.
...
@@ -35,7 +35,7 @@ or \method{abort()} method of the \class{Transaction} object.
\begin{verbatim}
\begin{verbatim}
# Commit a subtransaction
# Commit a subtransaction
get
_
transaction().commit(1)
get
_
transaction().commit(1)
# Abort a subtransaction
# Abort a subtransaction
get
_
transaction().abort(1)
get
_
transaction().abort(1)
...
@@ -103,6 +103,16 @@ transaction''. Usually this will happen because later transactions
...
@@ -103,6 +103,16 @@ transaction''. Usually this will happen because later transactions
modified the objects affected by the transaction you're trying to
modified the objects affected by the transaction you're trying to
undo.
undo.
After you call
\method
{
undo()
}
you must commit the transaction for the
undo to actually be applied.
\footnote
{
There are actually two different ways a storage can
implement the undo feature. Most of the storages that ship with ZODB
use the transactional form of undo described in the main text. Some
storages may use a non-transactional undo makes changes visible
immediately.
}
There is one glitch in the undo process. The thread
that calls undo may not see the changes to the object until it calls
\method
{
Connection.sync()
}
or commits another transaction.
\subsection
{
Versions
}
\subsection
{
Versions
}
While many subtransactions can be contained within a single regular
While many subtransactions can be contained within a single regular
...
@@ -161,6 +171,3 @@ The \class{Storage} and \class{DB} instances can be shared among
...
@@ -161,6 +171,3 @@ The \class{Storage} and \class{DB} instances can be shared among
several threads, as long as individual
\class
{
Connection
}
instances
several threads, as long as individual
\class
{
Connection
}
instances
are created for each thread.
are created for each thread.
XXX I can't think of anything else to say about multithreaded ZODB
programs. Suggestions? An example program?
doc/guide/zeo.tex
View file @
243c4e27
...
@@ -18,22 +18,21 @@ them in a distributed fashion without Zope ever entering the picture.
...
@@ -18,22 +18,21 @@ them in a distributed fashion without Zope ever entering the picture.
The combination of ZEO and ZODB is essentially a Python-specific
The combination of ZEO and ZODB is essentially a Python-specific
object database.
object database.
ZEO consists of about 1400 lines of Python code. The code is
ZEO consists of about 6000 lines of Python code, excluding tests. The
relatively small because it contains only code for a TCP/IP server,
code is relatively small because it contains only code for a TCP/IP
and for a new type of Storage,
\class
{
ClientStorage
}
.
server, and for a new type of Storage,
\class
{
ClientStorage
}
.
\class
{
ClientStorage
}
doesn't use disk files at all; it simply
\class
{
ClientStorage
}
simply makes remote procedure calls to the
makes remote procedure calls to the server, which then passes them on
server, which then passes them on a regular
\class
{
Storage
}
class such
a regular
\class
{
Storage
}
class such as
\class
{
FileStorage
}
. The
as
\class
{
FileStorage
}
. The following diagram lays out the system:
following diagram lays out the system:
XXX insert diagram here later
XXX insert diagram here later
Any number of processes can create a
\class
{
ClientStorage
}
Any number of processes can create a
\class
{
ClientStorage
}
instance, and any number of threads in each process can be using that
instance, and any number of threads in each process can be using that
instance.
\class
{
ClientStorage
}
aggressively caches objects
instance.
\class
{
ClientStorage
}
aggressively caches objects
locally, so in order to avoid using stale data
, t
he ZEO server sends
locally, so in order to avoid using stale data
. T
he ZEO server sends
an invalidat
e
message to all the connected
\class
{
ClientStorage
}
an invalidat
ion
message to all the connected
\class
{
ClientStorage
}
instances on every write operation. The invalidat
e
message contains
instances on every write operation. The invalidat
ion
message contains
the object ID for each object that's been modified, letting the
the object ID for each object that's been modified, letting the
\class
{
ClientStorage
}
instances delete the old data for the
\class
{
ClientStorage
}
instances delete the old data for the
given object from their caches.
given object from their caches.
...
@@ -46,7 +45,9 @@ writes, and ZEO is therefore better suited for read-intensive
...
@@ -46,7 +45,9 @@ writes, and ZEO is therefore better suited for read-intensive
applications. If every
\class
{
ClientStorage
}
is writing to the
applications. If every
\class
{
ClientStorage
}
is writing to the
database all the time, this will result in a storm of invalidate
database all the time, this will result in a storm of invalidate
messages being sent, and this might take up more processing time than
messages being sent, and this might take up more processing time than
the actual database operations themselves.
the actual database operations themselves.
\footnote
{
These messages are
small and sent in batches, so there would need to be a lot of writes
before it became a problem.
}
On the other hand, for applications that have few writes in comparison
On the other hand, for applications that have few writes in comparison
to the number of read accesses, this aggressive caching can be a major
to the number of read accesses, this aggressive caching can be a major
...
@@ -69,36 +70,17 @@ configure and run a ZEO Storage Server on a machine.
...
@@ -69,36 +70,17 @@ configure and run a ZEO Storage Server on a machine.
\subsubsection
{
Requirements
}
\subsubsection
{
Requirements
}
To run a ZEO server, you'll need Python 1.5.2 or 2.0, and the ZODB
The ZEO server software is included in ZODB3. As with the rest of
packages from
\url
{
http://www.amk.ca/files/zodb/
}
ZODB3, you'll need Python 2.1 or higher.
have to be installed.
\subsubsection
{
Running a server
}
\emph
{
Note for Python 1.5.2 users
}
: ZEO requires updated versions
of the
\module
{
asyncore.py
}
and
\module
{
asynchat.py
}
modules that are
The start.py script in the ZEO directory can be used to start a
included in 1.5.2's standard library. Current versions of the ZODB
server. Run it with the -h option to see the various values. If
distribution install private versions of these modules, so you
you're just experimenting, a good choise is to use
shouldn't need to grab updated versions yourself. (The symptom of
\code
{
python ZEO/start.py -D -U /tmp/zeosocket
}
to run ZEO in
this problem is a traceback on attempting to run a ZEO client program:
debug mode and with a Unix domain socket.
the traceback is ``TypeError: too many arguments; expected 2, got 3''
around line 100 of
\file
{
smac.py
}
.
\subsubsection
{
Installation
}
Installing the ZEO package is easy. Just run
\code
{
python setup.py
install
}
. This will install the ZEO/ package into your Python
installation, and copy various files into their proper locations:
\file
{
zeo.conf
}
will be put into
\file
{
/usr/local/etc/
}
, a
\file
{
zeo
}
startup
script will be put in
\file
{
/etc/rc.d/init.d/
}
, and the
\file
{
zeod
}
daemon program will be placed in
\file
{
/usr/local/bin
}
.
\subsection
{
Configuring and Running a ZEO Server
}
Edit
\code
{
/usr/local/etc/zeo.conf
}
appropriately for your desired
setup. This configuration file controls the port on which ZEO will
listen for connections, the user and group IDs under which the server
will be executed, and the location of the concrete
\class
{
Storage
}
object that will be made network-accessible.
\subsection
{
Testing the ZEO Installation
}
\subsection
{
Testing the ZEO Installation
}
Once a ZEO server is up and running, using it is just like using ZODB
Once a ZEO server is up and running, using it is just like using ZODB
...
@@ -137,15 +119,15 @@ If this code runs properly, then your ZEO server is working correctly.
...
@@ -137,15 +119,15 @@ If this code runs properly, then your ZEO server is working correctly.
\subsection
{
ZEO Programming Notes
}
\subsection
{
ZEO Programming Notes
}
XXX The Connection.sync() method and its necessity (if it works at all!)
ZEO is written using
\module
{
asyncore
}
, from the Python standard
library. It assumes that some part of the user application is running
% That doesn't work. I tested it. sync() doesn't seem to get into
an
\module
{
asyncore
}
mainloop. For example, Zope run the loop in a
% the asyncore loop. One of us should probably look into adding an
separate thread and ZEO uses that. If your application does not have
% API for this when we have some free time. It would be a nice
a mainloop, ZEO will not process incoming invalidation messages until
% small project that would get into ZODB's guts.
you make some call into ZEO. The
\method
{
Connection.sync
}
method can
be used to process pending invalidation messages. You can call it
when you want to make sure the
\class
{
Connection
}
has the most recent
version of every object, but you don't have any other work for ZEO to do.
\subsection
{
Sample Application: chatter.py
}
\subsection
{
Sample Application: chatter.py
}
...
@@ -174,7 +156,7 @@ class ChatSession(Persistent):
...
@@ -174,7 +156,7 @@ class ChatSession(Persistent):
def
__
init
__
(self, name):
def
__
init
__
(self, name):
self.name = name
self.name = name
# Internal attribute:
_
messages holds all the chat messages.
# Internal attribute:
_
messages holds all the chat messages.
self.
_
messages = BTree
.
BTree()
self.
_
messages = BTree
s.OOBTree.OO
BTree()
\end{verbatim}
\end{verbatim}
\method
{
add
_
message()
}
has to add a message to the
\method
{
add
_
message()
}
has to add a message to the
...
...
doc/guide/zodb.dvi
View file @
243c4e27
No preview for this file type
doc/guide/zodb.tex
View file @
243c4e27
\documentclass
{
howto
}
\documentclass
{
howto
}
\title
{
ZODB/ZEO Programming Guide
}
\title
{
ZODB/ZEO Programming Guide
}
\release
{
0.0
3
}
\release
{
0.0
4
}
\date
{
\today
}
\date
{
\today
}
\author
{
A.M.
\
Kuchling
}
\author
{
A.M.
\
Kuchling
}
...
...
doc/guide/zodb/about.html
View file @
243c4e27
...
@@ -6,19 +6,20 @@
...
@@ -6,19 +6,20 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"previous"
HREF=
"node
41
.html"
>
<LINK
REL=
"previous"
HREF=
"node
39
.html"
>
<LINK
REL=
"up"
HREF=
"zodb.html"
>
<LINK
REL=
"up"
HREF=
"zodb.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
<tr>
<tr>
<td><A
HREF=
"node5
3
.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node5
1
.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"zodb.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"zodb.html"
><img
src=
"/python/writing/icons/up.gif"
...
@@ -38,7 +39,7 @@
...
@@ -38,7 +39,7 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node5
3
.html"
>
ADDENDUM: How to use
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node5
1
.html"
>
ADDENDUM: How to use
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
...
@@ -48,7 +49,7 @@
...
@@ -48,7 +49,7 @@
About this document ...
</A>
About this document ...
</A>
</H1>
</H1>
<strong>
ZODB/ZEO Programming Guide
</strong>
,
<strong>
ZODB/ZEO Programming Guide
</strong>
,
February 8, 2002, Release 0.03
October 4, 2002, Release 0.04
<p>
This document was generated using the
<a
<p>
This document was generated using the
<a
href=
"http://saftsack.fs.uni-bayreuth.de/~latex2ht/"
>
href=
"http://saftsack.fs.uni-bayreuth.de/~latex2ht/"
>
<strong>
LaTeX
</strong>
2
<tt>
HTML
</tt></a>
translator.
<strong>
LaTeX
</strong>
2
<tt>
HTML
</tt></a>
translator.
...
@@ -78,7 +79,7 @@ February 8, 2002, Release 0.03
...
@@ -78,7 +79,7 @@ February 8, 2002, Release 0.03
<p><hr>
<p><hr>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
<tr>
<tr>
<td><A
HREF=
"node5
3
.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node5
1
.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"zodb.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"zodb.html"
><img
src=
"/python/writing/icons/up.gif"
...
@@ -98,10 +99,10 @@ February 8, 2002, Release 0.03
...
@@ -98,10 +99,10 @@ February 8, 2002, Release 0.03
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node5
3
.html"
>
ADDENDUM: How to use
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node5
1
.html"
>
ADDENDUM: How to use
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/contents.html
View file @
243c4e27
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<LINK
REL=
"previous"
HREF=
"zodb.html"
>
<LINK
REL=
"previous"
HREF=
"zodb.html"
>
<LINK
REL=
"up"
HREF=
"zodb.html"
>
<LINK
REL=
"up"
HREF=
"zodb.html"
>
<LINK
REL=
"next"
HREF=
"node2.html"
>
<LINK
REL=
"next"
HREF=
"node2.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -66,45 +67,44 @@ Contents</A>
...
@@ -66,45 +67,44 @@ Contents</A>
<LI><A
href=
"node13.html"
>
2.3 Opening a ZODB
</a>
<LI><A
href=
"node13.html"
>
2.3 Opening a ZODB
</a>
<LI><A
href=
"node14.html"
>
2.4 Writing a Persistent Class
</a>
<LI><A
href=
"node14.html"
>
2.4 Writing a Persistent Class
</a>
<LI><A
href=
"node15.html"
>
2.5 Rules for Writing Persistent Classes
</a>
<LI><A
href=
"node15.html"
>
2.5 Rules for Writing Persistent Classes
</a>
<LI><A
href=
"node
20
.html"
>
2.6 Writing Persistent Classes
</a>
<LI><A
href=
"node
19
.html"
>
2.6 Writing Persistent Classes
</a>
</ul>
</ul>
<LI><A
href=
"zeo.html"
>
3 ZEO
</a>
<LI><A
href=
"zeo.html"
>
3 ZEO
</a>
<UL>
<UL>
<LI><A
href=
"node23.html"
>
3.1 How ZEO Works
</a>
<LI><A
href=
"node22.html"
>
3.1 How ZEO Works
</a>
<LI><A
href=
"node24.html"
>
3.2 Installing ZEO
</a>
<LI><A
href=
"node23.html"
>
3.2 Installing ZEO
</a>
<LI><A
href=
"node27.html"
>
3.3 Configuring and Running a ZEO Server
</a>
<LI><A
href=
"node26.html"
>
3.3 Testing the ZEO Installation
</a>
<LI><A
href=
"node28.html"
>
3.4 Testing the ZEO Installation
</a>
<LI><A
href=
"node27.html"
>
3.4 ZEO Programming Notes
</a>
<LI><A
href=
"node29.html"
>
3.5 ZEO Programming Notes
</a>
<LI><A
href=
"node28.html"
>
3.5 Sample Application: chatter.py
</a>
<LI><A
href=
"node30.html"
>
3.6 Sample Application: chatter.py
</a>
</ul>
</ul>
<LI><A
href=
"node
31
.html"
>
4 Transactions and Versioning
</a>
<LI><A
href=
"node
29
.html"
>
4 Transactions and Versioning
</a>
<UL>
<UL>
<LI><A
href=
"node3
2
.html"
>
4.1 Subtransactions
</a>
<LI><A
href=
"node3
0
.html"
>
4.1 Subtransactions
</a>
<LI><A
href=
"node3
3
.html"
>
4.2 Undoing Changes
</a>
<LI><A
href=
"node3
1
.html"
>
4.2 Undoing Changes
</a>
<LI><A
href=
"node3
4
.html"
>
4.3 Versions
</a>
<LI><A
href=
"node3
2
.html"
>
4.3 Versions
</a>
<LI><A
href=
"node3
5
.html"
>
4.4 Multithreaded ZODB Programs
</a>
<LI><A
href=
"node3
3
.html"
>
4.4 Multithreaded ZODB Programs
</a>
</ul>
</ul>
<LI><A
href=
"node3
6
.html"
>
5 Related Modules
</a>
<LI><A
href=
"node3
4
.html"
>
5 Related Modules
</a>
<UL>
<UL>
<LI><A
href=
"node3
7
.html"
>
5.1
<tt
class=
"module"
>
ZODB.PersistentMapping
</tt></a>
<LI><A
href=
"node3
5
.html"
>
5.1
<tt
class=
"module"
>
ZODB.PersistentMapping
</tt></a>
<LI><A
href=
"node3
8
.html"
>
5.2
<tt
class=
"module"
>
ZODB.PersistentList
</tt></a>
<LI><A
href=
"node3
6
.html"
>
5.2
<tt
class=
"module"
>
ZODB.PersistentList
</tt></a>
<LI><A
href=
"node3
9.html"
>
5.3 B-tree Modules
</a>
<LI><A
href=
"node3
7.html"
>
5.3 BTrees Package
</a>
</ul>
</ul>
<LI><A
href=
"node
40
.html"
>
A. Resources
</a>
<LI><A
href=
"node
38
.html"
>
A. Resources
</a>
<LI><A
href=
"node
41
.html"
>
B. GNU Free Documentation License
</a>
<LI><A
href=
"node
39
.html"
>
B. GNU Free Documentation License
</a>
<UL>
<UL>
<LI><A
href=
"node4
2
.html"
>
Preamble
</a>
<LI><A
href=
"node4
0
.html"
>
Preamble
</a>
<LI><A
href=
"node4
3
.html"
>
B..1 Applicability and Definitions
</a>
<LI><A
href=
"node4
1
.html"
>
B..1 Applicability and Definitions
</a>
<LI><A
href=
"node4
4
.html"
>
B..2 Verbatim Copying
</a>
<LI><A
href=
"node4
2
.html"
>
B..2 Verbatim Copying
</a>
<LI><A
href=
"node4
5
.html"
>
B..3 Copying in Quantity
</a>
<LI><A
href=
"node4
3
.html"
>
B..3 Copying in Quantity
</a>
<LI><A
href=
"node4
6
.html"
>
B..4 Modifications
</a>
<LI><A
href=
"node4
4
.html"
>
B..4 Modifications
</a>
<LI><A
href=
"node4
7
.html"
>
B..5 Combining Documents
</a>
<LI><A
href=
"node4
5
.html"
>
B..5 Combining Documents
</a>
<LI><A
href=
"node4
8
.html"
>
B..6 Collections of Documents
</a>
<LI><A
href=
"node4
6
.html"
>
B..6 Collections of Documents
</a>
<LI><A
href=
"node4
9
.html"
>
B..7 Aggregation With Independent Works
</a>
<LI><A
href=
"node4
7
.html"
>
B..7 Aggregation With Independent Works
</a>
<LI><A
href=
"node
50
.html"
>
B..8 Translation
</a>
<LI><A
href=
"node
48
.html"
>
B..8 Translation
</a>
<LI><A
href=
"node
51
.html"
>
B..9 Termination
</a>
<LI><A
href=
"node
49
.html"
>
B..9 Termination
</a>
<LI><A
href=
"node5
2
.html"
>
B..10 Future Revisions of This Licence
</a>
<LI><A
href=
"node5
0
.html"
>
B..10 Future Revisions of This Licence
</a>
<LI><A
href=
"node5
3
.html"
>
ADDENDUM: How to use this License for your documents
</a>
<LI><A
href=
"node5
1
.html"
>
ADDENDUM: How to use this License for your documents
</a>
</ul>
</ul>
<LI><A
href=
"about.html"
>
About this document ...
</a>
<LI><A
href=
"about.html"
>
About this document ...
</a>
</ul>
</ul>
...
@@ -147,7 +147,7 @@ Contents</A>
...
@@ -147,7 +147,7 @@ Contents</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node2.html"
>
1 Introduction
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node2.html"
>
1 Introduction
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/images.tex
View file @
243c4e27
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
\title
{
ZODB/ZEO Programming Guide
}
\title
{
ZODB/ZEO Programming Guide
}
\release
{
0.0
3
}
\release
{
0.0
4
}
\date
{
\today
}
\date
{
\today
}
\author
{
A.M.
\
Kuchling
}
\authoraddress
{
akuchlin@mems-exchange.org
}
\author
{
A.M.
\
Kuchling
}
\authoraddress
{
akuchlin@mems-exchange.org
}
...
@@ -150,7 +150,6 @@
...
@@ -150,7 +150,6 @@
\stepcounter
{
subsubsection
}
\stepcounter
{
subsubsection
}
\stepcounter
{
subsubsection
}
\stepcounter
{
subsubsection
}
\stepcounter
{
subsubsection
}
\stepcounter
{
subsubsection
}
\stepcounter
{
subsubsection
}
\stepcounter
{
subsection
}
\stepcounter
{
subsection
}
\stepcounter
{
subsubsection
}
\stepcounter
{
subsubsection
}
\stepcounter
{
section
}
\stepcounter
{
section
}
...
@@ -161,7 +160,6 @@
...
@@ -161,7 +160,6 @@
\stepcounter
{
subsection
}
\stepcounter
{
subsection
}
\stepcounter
{
subsection
}
\stepcounter
{
subsection
}
\stepcounter
{
subsection
}
\stepcounter
{
subsection
}
\stepcounter
{
subsection
}
\stepcounter
{
section
}
\stepcounter
{
section
}
\stepcounter
{
subsection
}
\stepcounter
{
subsection
}
\stepcounter
{
subsection
}
\stepcounter
{
subsection
}
...
@@ -175,7 +173,7 @@
...
@@ -175,7 +173,7 @@
\stepcounter
{
section
}
\stepcounter
{
section
}
\stepcounter
{
section
}
\stepcounter
{
section
}
{
\newpage\clearpage
{
\newpage\clearpage
\lthtmlinlinemathA
{
tex2html
_
wrap
_
inline8
4
7
}
%
\lthtmlinlinemathA
{
tex2html
_
wrap
_
inline8
0
7
}
%
$
\copyright
$
%
$
\copyright
$
%
\lthtmlinlinemathZ
\lthtmlinlinemathZ
\lthtmlcheckvsize\clearpage
}
\lthtmlcheckvsize\clearpage
}
...
...
doc/guide/zodb/index.html
View file @
243c4e27
...
@@ -6,12 +6,13 @@
...
@@ -6,12 +6,13 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
href=
"contents.html"
>
<LINK
REL=
"next"
href=
"contents.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -47,8 +48,8 @@
...
@@ -47,8 +48,8 @@
<h1>
ZODB/ZEO Programming Guide
</h1>
<h1>
ZODB/ZEO Programming Guide
</h1>
<p><b><font
size=
"+2"
>
A.M. Kuchling
</font></b></p>
<p><b><font
size=
"+2"
>
A.M. Kuchling
</font></b></p>
<p>
akuchlin@mems-exchange.org
</p>
<p>
akuchlin@mems-exchange.org
</p>
<p><strong>
Release 0.0
3
</strong><br>
<p><strong>
Release 0.0
4
</strong><br>
<strong>
February 8
, 2002
</strong></p>
<strong>
October 4
, 2002
</strong></p>
<p>
<p>
</center>
</center>
</div>
</div>
...
@@ -81,55 +82,53 @@
...
@@ -81,55 +82,53 @@
<UL>
<UL>
<LI><A
href=
"node16.html"
>
2.5.1 Modifying Mutable Objects
</a>
<LI><A
href=
"node16.html"
>
2.5.1 Modifying Mutable Objects
</a>
<LI><A
href=
"node17.html"
>
2.5.2 Some Special Methods Don't Work
</a>
<LI><A
href=
"node17.html"
>
2.5.2 Some Special Methods Don't Work
</a>
<LI><A
href=
"node18.html"
>
2.5.3 Fixing
<tt
class=
"function"
>
isinstance
</tt>
and
<tt
class=
"function"
>
issubclass
</tt></a>
<LI><A
href=
"node18.html"
>
2.5.3
<tt
class=
"method"
>
__getattr__
</tt>
,
<tt
class=
"method"
>
__delattr__
</tt>
, and
<tt
class=
"method"
>
__setattr__
</tt></a>
<LI><A
href=
"node19.html"
>
2.5.4
<tt
class=
"method"
>
__getattr__
</tt>
,
<tt
class=
"method"
>
__delattr__
</tt>
, and
<tt
class=
"method"
>
__setattr__
</tt></a>
</ul>
</ul>
<LI><A
href=
"node
20
.html"
>
2.6 Writing Persistent Classes
</a>
<LI><A
href=
"node
19
.html"
>
2.6 Writing Persistent Classes
</a>
<UL>
<UL>
<LI><A
href=
"node2
1
.html"
>
2.6.1 Changing Instance Attributes
</a>
<LI><A
href=
"node2
0
.html"
>
2.6.1 Changing Instance Attributes
</a>
</ul>
</ul>
</ul>
</ul>
<LI><A
href=
"zeo.html"
>
3 ZEO
</a>
<LI><A
href=
"zeo.html"
>
3 ZEO
</a>
<UL>
<UL>
<LI><A
href=
"node2
3
.html"
>
3.1 How ZEO Works
</a>
<LI><A
href=
"node2
2
.html"
>
3.1 How ZEO Works
</a>
<LI><A
href=
"node2
4
.html"
>
3.2 Installing ZEO
</a>
<LI><A
href=
"node2
3
.html"
>
3.2 Installing ZEO
</a>
<UL>
<UL>
<LI><A
href=
"node2
5
.html"
>
3.2.1 Requirements
</a>
<LI><A
href=
"node2
4
.html"
>
3.2.1 Requirements
</a>
<LI><A
href=
"node2
6.html"
>
3.2.2 Installation
</a>
<LI><A
href=
"node2
5.html"
>
3.2.2 Running a server
</a>
</ul>
</ul>
<LI><A
href=
"node27.html"
>
3.3 Configuring and Running a ZEO Server
</a>
<LI><A
href=
"node26.html"
>
3.3 Testing the ZEO Installation
</a>
<LI><A
href=
"node28.html"
>
3.4 Testing the ZEO Installation
</a>
<LI><A
href=
"node27.html"
>
3.4 ZEO Programming Notes
</a>
<LI><A
href=
"node29.html"
>
3.5 ZEO Programming Notes
</a>
<LI><A
href=
"node28.html"
>
3.5 Sample Application: chatter.py
</a>
<LI><A
href=
"node30.html"
>
3.6 Sample Application: chatter.py
</a>
</ul>
</ul>
<LI><A
href=
"node
31
.html"
>
4 Transactions and Versioning
</a>
<LI><A
href=
"node
29
.html"
>
4 Transactions and Versioning
</a>
<UL>
<UL>
<LI><A
href=
"node3
2
.html"
>
4.1 Subtransactions
</a>
<LI><A
href=
"node3
0
.html"
>
4.1 Subtransactions
</a>
<LI><A
href=
"node3
3
.html"
>
4.2 Undoing Changes
</a>
<LI><A
href=
"node3
1
.html"
>
4.2 Undoing Changes
</a>
<LI><A
href=
"node3
4
.html"
>
4.3 Versions
</a>
<LI><A
href=
"node3
2
.html"
>
4.3 Versions
</a>
<LI><A
href=
"node3
5
.html"
>
4.4 Multithreaded ZODB Programs
</a>
<LI><A
href=
"node3
3
.html"
>
4.4 Multithreaded ZODB Programs
</a>
</ul>
</ul>
<LI><A
href=
"node3
6
.html"
>
5 Related Modules
</a>
<LI><A
href=
"node3
4
.html"
>
5 Related Modules
</a>
<UL>
<UL>
<LI><A
href=
"node3
7
.html"
>
5.1
<tt
class=
"module"
>
ZODB.PersistentMapping
</tt></a>
<LI><A
href=
"node3
5
.html"
>
5.1
<tt
class=
"module"
>
ZODB.PersistentMapping
</tt></a>
<LI><A
href=
"node3
8
.html"
>
5.2
<tt
class=
"module"
>
ZODB.PersistentList
</tt></a>
<LI><A
href=
"node3
6
.html"
>
5.2
<tt
class=
"module"
>
ZODB.PersistentList
</tt></a>
<LI><A
href=
"node3
9.html"
>
5.3 B-tree Modules
</a>
<LI><A
href=
"node3
7.html"
>
5.3 BTrees Package
</a>
</ul>
</ul>
<LI><A
href=
"node
40
.html"
>
A. Resources
</a>
<LI><A
href=
"node
38
.html"
>
A. Resources
</a>
<LI><A
href=
"node
41
.html"
>
B. GNU Free Documentation License
</a>
<LI><A
href=
"node
39
.html"
>
B. GNU Free Documentation License
</a>
<UL>
<UL>
<LI><A
href=
"node4
2
.html"
>
Preamble
</a>
<LI><A
href=
"node4
0
.html"
>
Preamble
</a>
<LI><A
href=
"node4
3
.html"
>
B..1 Applicability and Definitions
</a>
<LI><A
href=
"node4
1
.html"
>
B..1 Applicability and Definitions
</a>
<LI><A
href=
"node4
4
.html"
>
B..2 Verbatim Copying
</a>
<LI><A
href=
"node4
2
.html"
>
B..2 Verbatim Copying
</a>
<LI><A
href=
"node4
5
.html"
>
B..3 Copying in Quantity
</a>
<LI><A
href=
"node4
3
.html"
>
B..3 Copying in Quantity
</a>
<LI><A
href=
"node4
6
.html"
>
B..4 Modifications
</a>
<LI><A
href=
"node4
4
.html"
>
B..4 Modifications
</a>
<LI><A
href=
"node4
7
.html"
>
B..5 Combining Documents
</a>
<LI><A
href=
"node4
5
.html"
>
B..5 Combining Documents
</a>
<LI><A
href=
"node4
8
.html"
>
B..6 Collections of Documents
</a>
<LI><A
href=
"node4
6
.html"
>
B..6 Collections of Documents
</a>
<LI><A
href=
"node4
9
.html"
>
B..7 Aggregation With Independent Works
</a>
<LI><A
href=
"node4
7
.html"
>
B..7 Aggregation With Independent Works
</a>
<LI><A
href=
"node
50
.html"
>
B..8 Translation
</a>
<LI><A
href=
"node
48
.html"
>
B..8 Translation
</a>
<LI><A
href=
"node
51
.html"
>
B..9 Termination
</a>
<LI><A
href=
"node
49
.html"
>
B..9 Termination
</a>
<LI><A
href=
"node5
2
.html"
>
B..10 Future Revisions of This Licence
</a>
<LI><A
href=
"node5
0
.html"
>
B..10 Future Revisions of This Licence
</a>
<LI><A
href=
"node5
3
.html"
>
ADDENDUM: How to use this License for your documents
</a>
<LI><A
href=
"node5
1
.html"
>
ADDENDUM: How to use this License for your documents
</a>
</ul>
</ul>
<LI><A
href=
"about.html"
>
About this document ...
</a>
<LI><A
href=
"about.html"
>
About this document ...
</a>
</ul>
</ul>
...
@@ -161,7 +160,7 @@
...
@@ -161,7 +160,7 @@
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
href=
"contents.html"
>
Contents
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
href=
"contents.html"
>
Contents
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node10.html
View file @
243c4e27
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<LINK
REL=
"previous"
HREF=
"node9.html"
>
<LINK
REL=
"previous"
HREF=
"node9.html"
>
<LINK
REL=
"up"
HREF=
"node9.html"
>
<LINK
REL=
"up"
HREF=
"node9.html"
>
<LINK
REL=
"next"
HREF=
"node11.html"
>
<LINK
REL=
"next"
HREF=
"node11.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -52,36 +53,15 @@
...
@@ -52,36 +53,15 @@
</H3>
</H3>
<P>
<P>
You'll need Python, of course; version 1.5.2 works with some fixes,
You will need Python 2.1 or higher. The code is packaged using
and it also works with Python 2.0, which is what I primarily use.
Distutils. So it is simply a matter of untarring or unzipping the
<P>
The code is packaged using Distutils, the new distribution tools for
Python introduced in Python 2.0. If you're using 1.5.2, first you'll
have to get the latest Distutils release from the Distutils SIG page
at
<a
class=
"url"
href=
"http://www.python.org/sigs/distutils-sig/download.html"
>
http://www.python.org/sigs/distutils-sig/download.html
</a>
and
install it. This is simply a matter of untarring or unzipping the
release package, and then running
<code>
python setup.py install
</code>
.
release package, and then running
<code>
python setup.py install
</code>
.
<P>
If you're using 1.5.2 and have installed previous versions of the
Distutils, be sure to get the very latest version, since developing
the ZODB distribution turned up some bugs along the way. If you
encounter problems compiling
<span
class=
"file"
>
ZODB/TimeStamp.c
</span>
or your compiler reports
an error like ``Can't create build/temp.linux2/ExtensionClass.o: No
such file or directory'', you need an updated version. Old versions of
Distutils have two bugs which affect the setup scripts. First, for a
long time the
<code>
define_macros
</code>
keyword in setup.py files didn't work due
to a Distutils bug, so I hacked TimeStamp.c in earlier releases. The
Distutils have since been fixed, and the hack became unnecessary, so I
removed it. Second, the code that creates directories tries to be
smart and caches them to save time by not trying to create a directory
twice, but this code was broken in old versions.
<P>
<P>
You'll need a C compiler to build the packages, because there are
You'll need a C compiler to build the packages, because there are
various C extension modules. At the moment no one is making Windows
various C extension modules. At the moment no one is making Windows
binaries available, so you'll need a Windows development environment to use the
binaries available, so you'll need a Windows development environment
to build ZODB.
<P>
<P>
...
@@ -113,7 +93,7 @@ binaries available, so you'll need a Windows development environment to use the
...
@@ -113,7 +93,7 @@ binaries available, so you'll need a Windows development environment to use the
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node9.html"
>
2.1 Installing ZODB
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node9.html"
>
2.1 Installing ZODB
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node11.html"
>
2.1.2 Installing the Packages
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node11.html"
>
2.1.2 Installing the Packages
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node11.html
View file @
243c4e27
...
@@ -6,14 +6,15 @@
...
@@ -6,14 +6,15 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"previous"
HREF=
"node10.html"
>
<LINK
REL=
"previous"
HREF=
"node10.html"
>
<LINK
REL=
"up"
HREF=
"node9.html"
>
<LINK
REL=
"up"
HREF=
"node9.html"
>
<LINK
REL=
"next"
HREF=
"node12.html"
>
<LINK
REL=
"next"
HREF=
"node12.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -52,38 +53,9 @@
...
@@ -52,38 +53,9 @@
<P>
<P>
Download the ZODB tarball containing all the packages for both ZODB
Download the ZODB tarball containing all the packages for both ZODB
and ZEO from
<a
class=
"url"
href=
"http://www.amk.ca/files/zodb/"
>
http://www.amk.ca/files/zodb/
</a>
.
and ZEO from
<a
class=
"url"
href=
"http://www.zope.org/Products/StandaloneZODB"
>
http://www.zope.org/Products/StandaloneZODB
</a>
. See
the
<span
class=
"file"
>
README.txt
</span>
file in the top level of the release directory
<P>
for details on building, testing, and installing.
To build the packages, you must go into the individual directories and
build and install them one by one. They should be built and installed
in this order:
<P>
<OL>
<LI><code>
zodb-basic
</code>
</LI>
<LI>
ExtensionClass
</LI>
<LI>
ZODB
</LI>
<LI><code>
BTree
</code>
and
<code>
BTrees
</code>
</LI>
<LI>
ZEO
</LI>
</OL>
<P>
In particular, you must install ExtensionClass before building the
ZODB package; otherwise, the compilation in the ZODB package will die
complaining that it can't find ExtensionClass.h. You can manually
hack the #include path to make it work without installing
ExtensionClass first, but that's a bit hackish.
<P>
If you encounter any problems, please let me know at
<span
class=
"email"
>
akuchlin@mems-exchange.org
</span>
.
<P>
<P>
...
@@ -115,7 +87,7 @@ If you encounter any problems, please let me know at
...
@@ -115,7 +87,7 @@ If you encounter any problems, please let me know at
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node9.html"
>
2.1 Installing ZODB
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node9.html"
>
2.1 Installing ZODB
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node12.html"
>
2.2 How ZODB Works
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node12.html"
>
2.2 How ZODB Works
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node12.html
View file @
243c4e27
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<LINK
REL=
"previous"
HREF=
"node9.html"
>
<LINK
REL=
"previous"
HREF=
"node9.html"
>
<LINK
REL=
"up"
HREF=
"node8.html"
>
<LINK
REL=
"up"
HREF=
"node8.html"
>
<LINK
REL=
"next"
HREF=
"node13.html"
>
<LINK
REL=
"next"
HREF=
"node13.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -91,10 +92,16 @@ state.
...
@@ -91,10 +92,16 @@ state.
<DT>
Consistency
</DT>
<DT>
Consistency
</DT>
<DD>
means that the data cannot be placed into a
<DD>
means that the data cannot be placed into a
logically invalid state; sanity checks can be written and enforced.
logically invalid state; sanity checks can be written and enforced.
Usually this is done by defining a database schema, and requiring the
Usually this is done by defining a database schema, and requiring
data always matches the schema. For example, this might enforce that
the data always matches the schema. There are two typical
the
<code>
order_number
</code>
attribute is always an integer, and not a
approaches to consistency. One is to enforce rules about the types
string, tuple, or other object.
of objects and attribute; for example, enforce that the
<code>
order_number
</code>
attribute is always an integer, and not a
string, tuple, or other object. Another is to guarantee consistency
across data structures; for example, that any object with an
<code>
order_number
</code>
attribute must also appear in the
<code>
orders_table
</code>
object. In general, atomicity and isolation make
it possible for applications to provide consistency.
<P>
<P>
</DD>
</DD>
...
@@ -148,7 +155,7 @@ has no way of enforcing consistency with a schema.
...
@@ -148,7 +155,7 @@ has no way of enforcing consistency with a schema.
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node8.html"
>
2 ZODB Programming
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node8.html"
>
2 ZODB Programming
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node13.html"
>
2.3 Opening a ZODB
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node13.html"
>
2.3 Opening a ZODB
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node13.html
View file @
243c4e27
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<LINK
REL=
"previous"
HREF=
"node12.html"
>
<LINK
REL=
"previous"
HREF=
"node12.html"
>
<LINK
REL=
"up"
HREF=
"node8.html"
>
<LINK
REL=
"up"
HREF=
"node8.html"
>
<LINK
REL=
"next"
HREF=
"node14.html"
>
<LINK
REL=
"next"
HREF=
"node14.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -65,7 +66,7 @@ implement the <tt class="class">Storage</tt> interface.
...
@@ -65,7 +66,7 @@ implement the <tt class="class">Storage</tt> interface.
storing and retrieving objects from some form of long-term storage.
storing and retrieving objects from some form of long-term storage.
A few different types of Storage have been written, such as
A few different types of Storage have been written, such as
<tt
class=
"class"
>
FileStorage
</tt>
, which uses regular disk files, and
<tt
class=
"class"
>
FileStorage
</tt>
, which uses regular disk files, and
<tt
class=
"class"
>
Berkeley
Storage
</tt>
, which uses Sleepycat Software's BerkeleyDB
<tt
class=
"class"
>
bsddb3
Storage
</tt>
, which uses Sleepycat Software's BerkeleyDB
database. You could write a new Storage that stored objects in a
database. You could write a new Storage that stored objects in a
relational database or Metakit file, for example, if that would
relational database or Metakit file, for example, if that would
better suit your application. Two example storages,
better suit your application. Two example storages,
...
@@ -81,7 +82,7 @@ implement the <tt class="class">Storage</tt> interface.
...
@@ -81,7 +82,7 @@ implement the <tt class="class">Storage</tt> interface.
<P>
<P>
</LI>
</LI>
<LI>
Finally, the
<tt
class=
"class"
>
Connection
</tt>
class caches objects, and moves
<LI>
Finally, the
<tt
class=
"class"
>
Connection
</tt>
class caches objects, and moves
them into and out of object storage. A multi-threaded program
can
them into and out of object storage. A multi-threaded program
should
open a separate
<tt
class=
"class"
>
Connection
</tt>
instance for each thread.
open a separate
<tt
class=
"class"
>
Connection
</tt>
instance for each thread.
Different threads can then modify objects and commit their
Different threads can then modify objects and commit their
modifications independently.
modifications independently.
...
@@ -97,13 +98,13 @@ a <tt class="class">Connection</tt> from the <tt class="class">DB instance</tt>.
...
@@ -97,13 +98,13 @@ a <tt class="class">Connection</tt> from the <tt class="class">DB instance</tt>.
code:
code:
<P>
<P>
<d
l><dd><pre
class=
"verbatim"
>
<d
iv
class=
"verbatim"
><pre
>
from ZODB import FileStorage, DB
from ZODB import FileStorage, DB
storage = FileStorage.FileStorage('/tmp/test-filestorage.fs')
storage = FileStorage.FileStorage('/tmp/test-filestorage.fs')
db = DB(storage)
db = DB(storage)
conn = db.open()
conn = db.open()
</pre></d
l
>
</pre></d
iv
>
<P>
<P>
Note that you can use a completely different data storage mechanism by
Note that you can use a completely different data storage mechanism by
...
@@ -141,7 +142,7 @@ you'll see how ZEO uses this flexibility to good effect.
...
@@ -141,7 +142,7 @@ you'll see how ZEO uses this flexibility to good effect.
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node8.html"
>
2 ZODB Programming
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node8.html"
>
2 ZODB Programming
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node14.html"
>
2.4 Writing a Persistent
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node14.html"
>
2.4 Writing a Persistent
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node14.html
View file @
243c4e27
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<LINK
REL=
"previous"
HREF=
"node13.html"
>
<LINK
REL=
"previous"
HREF=
"node13.html"
>
<LINK
REL=
"up"
HREF=
"node8.html"
>
<LINK
REL=
"up"
HREF=
"node8.html"
>
<LINK
REL=
"next"
HREF=
"node15.html"
>
<LINK
REL=
"next"
HREF=
"node15.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -56,13 +57,13 @@ Making a Python class persistent is quite simple; it simply needs to
...
@@ -56,13 +57,13 @@ Making a Python class persistent is quite simple; it simply needs to
subclass from the
<tt
class=
"class"
>
Persistent
</tt>
class, as shown in this example:
subclass from the
<tt
class=
"class"
>
Persistent
</tt>
class, as shown in this example:
<P>
<P>
<d
l><dd><pre
class=
"verbatim"
>
<d
iv
class=
"verbatim"
><pre
>
import ZODB
import ZODB
from Persistence import Persistent
from Persistence import Persistent
class User(Persistent):
class User(Persistent):
pass
pass
</pre></d
l
>
</pre></d
iv
>
<P>
<P>
The apparently unnecessary
<code>
import ZODB
</code>
statement is
The apparently unnecessary
<code>
import ZODB
</code>
statement is
...
@@ -70,6 +71,11 @@ needed for the following <code>from...import</code> statement to work
...
@@ -70,6 +71,11 @@ needed for the following <code>from...import</code> statement to work
correctly, since the ZODB code does some magical tricks with
correctly, since the ZODB code does some magical tricks with
importing.
importing.
<P>
The
<tt
class=
"class"
>
Persistent
</tt>
base class is an
<tt
class=
"module"
>
ExtensionClass
</tt>
class. As a result, it not compatible with new-style classes or types
in Python 2.2 and up.
<P>
<P>
For simplicity, in the examples the
<tt
class=
"class"
>
User
</tt>
class will
For simplicity, in the examples the
<tt
class=
"class"
>
User
</tt>
class will
simply be used as a holder for a bunch of attributes. Normally the
simply be used as a holder for a bunch of attributes. Normally the
...
@@ -96,7 +102,7 @@ that will contain all the <tt class="class">User</tt> objects. (The
...
@@ -96,7 +102,7 @@ that will contain all the <tt class="class">User</tt> objects. (The
<tt
class=
"class"
>
BTree
</tt>
module is also included as part of Zope.)
<tt
class=
"class"
>
BTree
</tt>
module is also included as part of Zope.)
<P>
<P>
<d
l><dd><pre
class=
"verbatim"
>
<d
iv
class=
"verbatim"
><pre
>
dbroot = conn.root()
dbroot = conn.root()
# Ensure that a 'userdb' key is present
# Ensure that a 'userdb' key is present
...
@@ -106,7 +112,7 @@ if not dbroot.has_key('userdb'):
...
@@ -106,7 +112,7 @@ if not dbroot.has_key('userdb'):
dbroot['userdb'] = BTree.BTree()
dbroot['userdb'] = BTree.BTree()
userdb = dbroot['userdb']
userdb = dbroot['userdb']
</pre></d
l
>
</pre></d
iv
>
<P>
<P>
Inserting a new user is simple: create the
<tt
class=
"class"
>
User
</tt>
object, fill
Inserting a new user is simple: create the
<tt
class=
"class"
>
User
</tt>
object, fill
...
@@ -114,7 +120,7 @@ it with data, insert it into the <tt class="class">BTree</tt> instance, and comm
...
@@ -114,7 +120,7 @@ it with data, insert it into the <tt class="class">BTree</tt> instance, and comm
this transaction.
this transaction.
<P>
<P>
<d
l><dd><pre
class=
"verbatim"
>
# Create new User instance
<d
iv
class=
"verbatim"
><pre
>
# Create new User instance
newuser = User()
newuser = User()
# Add whatever attributes you want to track
# Add whatever attributes you want to track
...
@@ -127,7 +133,7 @@ userdb[newuser.id] = newuser
...
@@ -127,7 +133,7 @@ userdb[newuser.id] = newuser
# Commit the change
# Commit the change
get_transaction().commit()
get_transaction().commit()
</pre></d
l
>
</pre></d
iv
>
<P>
<P>
When you import the ZODB package, it adds a new function,
When you import the ZODB package, it adds a new function,
...
@@ -146,7 +152,7 @@ having transactional semantics for your program's variables, and you
...
@@ -146,7 +152,7 @@ having transactional semantics for your program's variables, and you
can experiment with transactions at the Python interpreter's prompt:
can experiment with transactions at the Python interpreter's prompt:
<P>
<P>
<d
l><dd><pre
class=
"verbatim"
>
>>>
newuser
<d
iv
class=
"verbatim"
><pre
>
>>>
newuser
<
User instance at 81b1f40
>
<
User instance at 81b1f40
>
>>>
newuser.first_name # Print initial value
>>>
newuser.first_name # Print initial value
'Andrew'
'Andrew'
...
@@ -156,7 +162,7 @@ can experiment with transactions at the Python interpreter's prompt:
...
@@ -156,7 +162,7 @@ can experiment with transactions at the Python interpreter's prompt:
>>>
get_transaction().abort() # Abort transaction
>>>
get_transaction().abort() # Abort transaction
>>>
newuser.first_name # The value has changed back
>>>
newuser.first_name # The value has changed back
'Andrew'
'Andrew'
</pre></d
l
>
</pre></d
iv
>
<P>
<P>
...
@@ -188,7 +194,7 @@ can experiment with transactions at the Python interpreter's prompt:
...
@@ -188,7 +194,7 @@ can experiment with transactions at the Python interpreter's prompt:
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node8.html"
>
2 ZODB Programming
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node8.html"
>
2 ZODB Programming
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node15.html"
>
2.5 Rules for Writing
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node15.html"
>
2.5 Rules for Writing
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node15.html
View file @
243c4e27
...
@@ -6,15 +6,16 @@
...
@@ -6,15 +6,16 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node
20
.html"
>
<LINK
REL=
"next"
HREF=
"node
19
.html"
>
<LINK
REL=
"previous"
HREF=
"node14.html"
>
<LINK
REL=
"previous"
HREF=
"node14.html"
>
<LINK
REL=
"up"
HREF=
"node8.html"
>
<LINK
REL=
"up"
HREF=
"node8.html"
>
<LINK
REL=
"next"
HREF=
"node16.html"
>
<LINK
REL=
"next"
HREF=
"node16.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -81,13 +82,6 @@ defined on ExtensionClasses. The most important ones are the
...
@@ -81,13 +82,6 @@ defined on ExtensionClasses. The most important ones are the
arithmetic operations:
<tt
class=
"method"
>
__radd__
</tt>
,
<tt
class=
"method"
>
__rsub__
</tt>
, and so
arithmetic operations:
<tt
class=
"method"
>
__radd__
</tt>
,
<tt
class=
"method"
>
__rsub__
</tt>
, and so
forth.
forth.
<P>
</LI>
<LI>
Python's built-in
<tt
class=
"function"
>
isinstance()
</tt>
and
<tt
class=
"function"
>
issubclass()
</tt>
functions don't work properly on ExtensionClasses. Solution: use
custom
<tt
class=
"function"
>
isinstance()
</tt>
and
<tt
class=
"function"
>
issubclass()
</tt>
functions
that handle ExtensionClasses correctly.
<P>
<P>
</LI>
</LI>
<LI>
Recent versions of the ZODB allow writing a class with
<LI>
Recent versions of the ZODB allow writing a class with
...
@@ -111,8 +105,7 @@ Let's look at each of these rules in detail.
...
@@ -111,8 +105,7 @@ Let's look at each of these rules in detail.
<UL>
<UL>
<LI><A
href=
"node16.html"
>
2.5.1 Modifying Mutable Objects
</a>
<LI><A
href=
"node16.html"
>
2.5.1 Modifying Mutable Objects
</a>
<LI><A
href=
"node17.html"
>
2.5.2 Some Special Methods Don't Work
</a>
<LI><A
href=
"node17.html"
>
2.5.2 Some Special Methods Don't Work
</a>
<LI><A
href=
"node18.html"
>
2.5.3 Fixing
<tt
class=
"function"
>
isinstance
</tt>
and
<tt
class=
"function"
>
issubclass
</tt></a>
<LI><A
href=
"node18.html"
>
2.5.3
<tt
class=
"method"
>
__getattr__
</tt>
,
<tt
class=
"method"
>
__delattr__
</tt>
, and
<tt
class=
"method"
>
__setattr__
</tt></a>
<LI><A
href=
"node19.html"
>
2.5.4
<tt
class=
"method"
>
__getattr__
</tt>
,
<tt
class=
"method"
>
__delattr__
</tt>
, and
<tt
class=
"method"
>
__setattr__
</tt></a>
</ul>
</ul>
<!--End of Table of Child-Links-->
<!--End of Table of Child-Links-->
...
@@ -144,7 +137,7 @@ Let's look at each of these rules in detail.
...
@@ -144,7 +137,7 @@ Let's look at each of these rules in detail.
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node8.html"
>
2 ZODB Programming
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node8.html"
>
2 ZODB Programming
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node16.html"
>
2.5.1 Modifying Mutable Objects
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node16.html"
>
2.5.1 Modifying Mutable Objects
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node16.html
View file @
243c4e27
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<LINK
REL=
"previous"
HREF=
"node15.html"
>
<LINK
REL=
"previous"
HREF=
"node15.html"
>
<LINK
REL=
"up"
HREF=
"node15.html"
>
<LINK
REL=
"up"
HREF=
"node15.html"
>
<LINK
REL=
"next"
HREF=
"node17.html"
>
<LINK
REL=
"next"
HREF=
"node17.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -77,10 +78,10 @@ its dirty bit to true. This is done by setting the
...
@@ -77,10 +78,10 @@ its dirty bit to true. This is done by setting the
<tt
class=
"member"
>
_p_changed
</tt>
attribute of the object to true:
<tt
class=
"member"
>
_p_changed
</tt>
attribute of the object to true:
<P>
<P>
<d
l><dd><pre
class=
"verbatim"
>
<d
iv
class=
"verbatim"
><pre
>
userobj.friends.append(otherUser)
userobj.friends.append(otherUser)
userobj._p_changed = 1
userobj._p_changed = 1
</pre></d
l
>
</pre></d
iv
>
<P>
<P>
An obsolete way of doing this that's still supported is calling the
An obsolete way of doing this that's still supported is calling the
...
@@ -98,11 +99,11 @@ an <tt class="method">add_friend()</tt> modifier method to the class. <tt class
...
@@ -98,11 +99,11 @@ an <tt class="method">add_friend()</tt> modifier method to the class. <tt class
would then look like this:
would then look like this:
<P>
<P>
<d
l><dd><pre
class=
"verbatim"
>
<d
iv
class=
"verbatim"
><pre
>
def add_friend(self, friend):
def add_friend(self, friend):
self.friends.append(otherUser)
self.friends.append(otherUser)
self._p_changed = 1
self._p_changed = 1
</pre></d
l
>
</pre></d
iv
>
<P>
<P>
Alternatively, you could use a ZODB-aware list or mapping type that
Alternatively, you could use a ZODB-aware list or mapping type that
...
@@ -141,7 +142,7 @@ and may make it into a future upstream release of Zope.
...
@@ -141,7 +142,7 @@ and may make it into a future upstream release of Zope.
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node15.html"
>
2.5 Rules for Writing
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node15.html"
>
2.5 Rules for Writing
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node17.html"
>
2.5.2 Some Special Methods
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node17.html"
>
2.5.2 Some Special Methods
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node17.html
View file @
243c4e27
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<LINK
REL=
"previous"
HREF=
"node16.html"
>
<LINK
REL=
"previous"
HREF=
"node16.html"
>
<LINK
REL=
"up"
HREF=
"node15.html"
>
<LINK
REL=
"up"
HREF=
"node15.html"
>
<LINK
REL=
"next"
HREF=
"node18.html"
>
<LINK
REL=
"next"
HREF=
"node18.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -42,7 +43,7 @@
...
@@ -42,7 +43,7 @@
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node16.html"
>
2.5.1 Modifying Mutable Objects
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node16.html"
>
2.5.1 Modifying Mutable Objects
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node15.html"
>
2.5 Rules for Writing
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node15.html"
>
2.5 Rules for Writing
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node18.html"
>
2.5.3
Fixing isinstance
and
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node18.html"
>
2.5.3
__getattr__, __delattr__,
and
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
@@ -77,13 +78,13 @@ instances, which means that <code>type(obj) == types.InstanceType</code>.
...
@@ -77,13 +78,13 @@ instances, which means that <code>type(obj) == types.InstanceType</code>.
The code inside the Python interpreter looks like this:
The code inside the Python interpreter looks like this:
<P>
<P>
<d
l><dd><pre
class=
"verbatim"
>
<d
iv
class=
"verbatim"
><pre
>
/* Code to compare objects v and w */
/* Code to compare objects v and w */
if (PyInstance_Check(v) || PyInstance_Check(w))
if (PyInstance_Check(v) || PyInstance_Check(w))
return PyInstance_DoBinOp(v, w, "__cmp__", "__rcmp__", do_cmp);
return PyInstance_DoBinOp(v, w, "__cmp__", "__rcmp__", do_cmp);
/* Do usual Python comparison of v,w */
/* Do usual Python comparison of v,w */
c = PyObject_Compare(v, w);
c = PyObject_Compare(v, w);
</pre></d
l
>
</pre></d
iv
>
<P>
<P>
While ExtensionClasses try to behave as much like regular Python
While ExtensionClasses try to behave as much like regular Python
...
@@ -120,9 +121,9 @@ will repair this.
...
@@ -120,9 +121,9 @@ will repair this.
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node16.html"
>
2.5.1 Modifying Mutable Objects
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node16.html"
>
2.5.1 Modifying Mutable Objects
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node15.html"
>
2.5 Rules for Writing
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node15.html"
>
2.5 Rules for Writing
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node18.html"
>
2.5.3
Fixing isinstance
and
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node18.html"
>
2.5.3
__getattr__, __delattr__,
and
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node18.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
2.5.3
Fixing isinstance and issubclass
</title>
<title>
2.5.3
__getattr__, __delattr__, and __setattr__
</title>
<META
NAME=
"description"
CONTENT=
"2.5.3
Fixing isinstance and issubclass
"
>
<META
NAME=
"description"
CONTENT=
"2.5.3
__getattr__, __delattr__, and __setattr__
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node19.html"
>
<LINK
REL=
"previous"
HREF=
"node17.html"
>
<LINK
REL=
"previous"
HREF=
"node17.html"
>
<LINK
REL=
"up"
HREF=
"node15.html"
>
<LINK
REL=
"up"
HREF=
"node15.html"
>
<LINK
REL=
"next"
HREF=
"node19.html"
>
<LINK
REL=
"next"
HREF=
"node19.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -42,112 +42,24 @@
...
@@ -42,112 +42,24 @@
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node17.html"
>
2.5.2 Some Special Methods
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node17.html"
>
2.5.2 Some Special Methods
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node15.html"
>
2.5 Rules for Writing
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node15.html"
>
2.5 Rules for Writing
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node19.html"
>
2.
5.4 __getattr__, __delattr__, and
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node19.html"
>
2.
6 Writing Persistent Classes
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H3><A
NAME=
"SECTION000353000000000000000"
>
<H3><A
NAME=
"SECTION000353000000000000000"
>
2.5.3
Fixing
<tt
class=
"function"
>
isinstance
</tt>
and
<tt
class=
"function"
>
issubclass
</tt></A>
2.5.3
<tt
class=
"method"
>
__getattr__
</tt>
,
<tt
class=
"method"
>
__delattr__
</tt>
, and
<tt
class=
"method"
>
__setattr__
</tt></A>
</H3>
</H3>
<P>
<P>
Python's built-in functions
Recent versions of ZODB allow writing persistent classes that have
<tt
class=
"function"
>
isinstance()
</tt>
and
<tt
class=
"function"
>
issubclass
</tt>
don't
<tt
class=
"method"
>
__getattr__
</tt>
,
<tt
class=
"method"
>
__delattr__
</tt>
, or
<tt
class=
"method"
>
__setattr__
</tt>
work on ExtensionClass instances, for much the same reason that
methods. The one minor complication is that the machinery for
<tt
class=
"method"
>
__cmp__
</tt>
is never called; in some bits of the Python core code,
automatically detecting changes to the object is disabled while the
branches are taken only if an object is of the
<tt
class=
"class"
>
InstanceType
</tt>
<tt
class=
"method"
>
__getattr__
</tt>
,
<tt
class=
"method"
>
__delattr__
</tt>
, or
<tt
class=
"method"
>
__setattr__
</tt>
type, and this can never be true for an ExtensionClass instance.
method is executing. This means that if the object is modified, the
Python 2.1 tried to fix this, and changed these functions slightly in
object should be marked as dirty by setting the object's
an effort to make them work for ExtensionClasses; unfortunately, the
<tt
class=
"member"
>
_p_changed
</tt>
method to true.
changes didn't work.
<P>
The solution is to use customized versions of these functions that
handle ExtensionClasses specially and fall back to the built-in
version otherwise. Here are the versions we've written at the MEMS Exchange:
<P>
<dl><dd><pre
class=
"verbatim"
>
# The built-in 'isinstance()' and 'issubclass()' won't work on
# ExtensionClasses, so you have to use the versions supplied here.
# (But those versions work fine on regular instances and classes too,
# so you should *always* use them.)
def issubclass (class1, class2):
"""A version of 'issubclass' that works with extension classes
as well as regular Python classes.
"""
# Both class objects are regular Python classes, so use the
# built-in 'issubclass()'.
if type(class1) is ClassType and type(class2) is ClassType:
return __builtin__.issubclass(class1, class2)
# Both so-called class objects have a '__bases__' attribute: ie.,
# they aren't regular Python classes, but they sure look like them.
# Assume they are extension classes and reimplement what the builtin
# 'issubclass()' does behind the scenes.
elif hasattr(class1, '__bases__') and hasattr(class2, '__bases__'):
# XXX it appears that "ec.__class__ is type(ec)" for an
# extension class 'ec': could we/should we use this as an
# additional check for extension classes?
# Breadth-first traversal of class1's superclass tree. Order
# doesn't matter because we're just looking for a "yes/no"
# answer from the tree; if we were trying to resolve a name,
# order would be important!
stack = [class1]
while stack:
if stack[0] is class2:
return 1
stack.extend(list(stack[0].__bases__))
del stack[0]
else:
return 0
# Not a regular class, not an extension class: blow up for consistency
# with builtin 'issubclass()"
else:
raise TypeError, "arguments must be class or ExtensionClass objects"
# issubclass ()
def isinstance (object, klass):
"""A version of 'isinstance' that works with extension classes
as well as regular Python classes."""
if type(klass) is TypeType:
return __builtin__.isinstance(object, klass)
elif hasattr(object, '__class__'):
return issubclass(object.__class__, klass)
else:
return 0
</pre></dl>
<P>
I'd recommend putting these functions in a module that always gets
imported. The convention on my work project is to put them in
<span
class=
"file"
>
mems/lib/base.py
</span>
, which contains various fundamental classes
and functions for our system, and access them like this:
<P>
<dl><dd><pre
class=
"verbatim"
>
from mems.lib import base
...
if base.isinstance(object, Class): ...
</pre></dl>
<P>
Don't insert the modified functions into Python's
<tt
class=
"module"
>
__builtin__
</tt>
module, or import just the
<tt
class=
"function"
>
isinstance()
</tt>
and
<tt
class=
"function"
>
issubclass
</tt>
functions.
If you consistently use
<tt
class=
"function"
>
base.isinstance()
</tt>
, then forgetting
to import the
<tt
class=
"module"
>
base
</tt>
module will result in a
<tt
class=
"exception"
>
NameError
</tt>
exception. In the
case of a forgotten import, calling the functions directly would use
Python's built-in versions, leading to subtle bugs that might not be
noticed for some time.
<P>
<P>
...
@@ -177,9 +89,9 @@ noticed for some time.
...
@@ -177,9 +89,9 @@ noticed for some time.
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node17.html"
>
2.5.2 Some Special Methods
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node17.html"
>
2.5.2 Some Special Methods
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node15.html"
>
2.5 Rules for Writing
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node15.html"
>
2.5 Rules for Writing
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node19.html"
>
2.
5.4 __getattr__, __delattr__, and
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node19.html"
>
2.
6 Writing Persistent Classes
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node19.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
2.
5.4 __getattr__, __delattr__, and __setattr__
</title>
<title>
2.
6 Writing Persistent Classes
</title>
<META
NAME=
"description"
CONTENT=
"2.
5.4 __getattr__, __delattr__, and __setattr__
"
>
<META
NAME=
"description"
CONTENT=
"2.
6 Writing Persistent Classes
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"previous"
HREF=
"node1
8
.html"
>
<LINK
REL=
"previous"
HREF=
"node1
5
.html"
>
<LINK
REL=
"up"
HREF=
"node
15
.html"
>
<LINK
REL=
"up"
HREF=
"node
8
.html"
>
<LINK
REL=
"next"
HREF=
"node20.html"
>
<LINK
REL=
"next"
HREF=
"node20.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -22,7 +23,7 @@
...
@@ -22,7 +23,7 @@
<td><A
HREF=
"node18.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node18.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
15
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
8
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node20.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node20.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -39,29 +40,33 @@
...
@@ -39,29 +40,33 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node18.html"
>
2.5.3
Fixing isinstance
and
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node18.html"
>
2.5.3
__getattr__, __delattr__,
and
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
15.html"
>
2.5 Rules for Writ
ing
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
8.html"
>
2 ZODB Programm
ing
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node20.html"
>
2.6
Writing Persistent Class
es
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node20.html"
>
2.6
.1 Changing Instance Attribut
es
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H
3><A
NAME=
"SECTION000354
000000000000000"
>
<H
2><A
NAME=
"SECTION000360
000000000000000"
>
2.
5.4
<tt
class=
"method"
>
__getattr__
</tt>
,
<tt
class=
"method"
>
__delattr__
</tt>
, and
<tt
class=
"method"
>
__setattr__
</tt>
</A>
2.
6 Writing Persistent Classes
</A>
</H
3
>
</H
2
>
<P>
<P>
Recent versions of ZODB allow writing persistent classes that have
Now that we've looked at the basics of programming using the ZODB,
<tt
class=
"method"
>
__getattr__
</tt>
,
<tt
class=
"method"
>
__delattr__
</tt>
, or
<tt
class=
"method"
>
__setattr__
</tt>
we'll turn to some more subtle tasks that are likely to come up for
methods. The one minor complication is that the machinery for
anyone using the ZODB in a production system.
automatically detecting changes to the object is disabled while the
<tt
class=
"method"
>
__getattr__
</tt>
,
<tt
class=
"method"
>
__delattr__
</tt>
, or
<tt
class=
"method"
>
__setattr__
</tt>
method is executing. This means that if the object is modified, the
object should be marked as dirty by setting the object's
<tt
class=
"member"
>
_p_changed
</tt>
method to true.
<P>
<P>
<p><hr>
<!--Table of Child-Links-->
<A
NAME=
"CHILD_LINKS"
><STRONG>
Subsections
</STRONG></a>
<UL>
<LI><A
href=
"node20.html"
>
2.6.1 Changing Instance Attributes
</a>
</ul>
<!--End of Table of Child-Links-->
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
<p><hr>
<p><hr>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
...
@@ -69,7 +74,7 @@ object should be marked as dirty by setting the object's
...
@@ -69,7 +74,7 @@ object should be marked as dirty by setting the object's
<td><A
HREF=
"node18.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node18.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
15
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
8
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node20.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node20.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -86,11 +91,11 @@ object should be marked as dirty by setting the object's
...
@@ -86,11 +91,11 @@ object should be marked as dirty by setting the object's
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node18.html"
>
2.5.3
Fixing isinstance
and
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node18.html"
>
2.5.3
__getattr__, __delattr__,
and
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
15.html"
>
2.5 Rules for Writ
ing
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
8.html"
>
2 ZODB Programm
ing
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node20.html"
>
2.6
Writing Persistent Class
es
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node20.html"
>
2.6
.1 Changing Instance Attribut
es
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node2.html
View file @
243c4e27
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<LINK
REL=
"previous"
href=
"contents.html"
>
<LINK
REL=
"previous"
href=
"contents.html"
>
<LINK
REL=
"up"
HREF=
"zodb.html"
>
<LINK
REL=
"up"
HREF=
"zodb.html"
>
<LINK
REL=
"next"
HREF=
"node3.html"
>
<LINK
REL=
"next"
HREF=
"node3.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -100,7 +101,7 @@ of the guide is always available at
...
@@ -100,7 +101,7 @@ of the guide is always available at
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node3.html"
>
1.1 What is the
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node3.html"
>
1.1 What is the
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node20.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
2.6
Writing Persistent Class
es
</title>
<title>
2.6
.1 Changing Instance Attribut
es
</title>
<META
NAME=
"description"
CONTENT=
"2.6
Writing Persistent Class
es"
>
<META
NAME=
"description"
CONTENT=
"2.6
.1 Changing Instance Attribut
es"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"previous"
HREF=
"node15.html"
>
<LINK
REL=
"previous"
HREF=
"node19.html"
>
<LINK
REL=
"up"
HREF=
"node8.html"
>
<LINK
REL=
"up"
HREF=
"node19.html"
>
<LINK
REL=
"next"
HREF=
"node21.html"
>
<LINK
REL=
"next"
href=
"zeo.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -22,10 +23,10 @@
...
@@ -22,10 +23,10 @@
<td><A
HREF=
"node19.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node19.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
8
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
19
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node21
.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
href=
"zeo
.html"
><img
src=
"/python/writing/icons/next.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Next Page"
width=
"32"
></A></td>
alt=
"Next Page"
width=
"32"
></A></td>
<td
align=
"center"
width=
"100%"
>
ZODB/ZEO Programming Guide
</td>
<td
align=
"center"
width=
"100%"
>
ZODB/ZEO Programming Guide
</td>
...
@@ -39,33 +40,65 @@
...
@@ -39,33 +40,65 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node19.html"
>
2.
5.4 __getattr__, __delattr__, and
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node19.html"
>
2.
6 Writing Persistent Classes
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
8.html"
>
2 ZODB Programming
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
19.html"
>
2.6 Writing Persistent Classes
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node21.html"
>
2.6.1 Changing Instance Attributes
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H
2><A
NAME=
"SECTION000360
000000000000000"
>
<H
3><A
NAME=
"SECTION000361
000000000000000"
>
2.6
Writing Persistent Class
es
</A>
2.6
.1 Changing Instance Attribut
es
</A>
</H
2
>
</H
3
>
<P>
<P>
Now that we've looked at the basics of programming using the ZODB,
Ideally, before making a class persistent you would get its interface
we'll turn to some more subtle tasks that are likely to come up for
right the first time, so that no attributes would ever need to be
anyone using the ZODB in a production system.
added, removed, or have their interpretation change over time. It's a
worthy goal, but also an impractical one unless you're gifted with
perfect knowledge of the future. Such unnatural foresight can't be
required of any person, so you therefore have to be prepared to handle
such structural changes gracefully. In object-oriented database
terminology, this is a schema update. The ZODB doesn't have an actual
schema specification, but you're changing the software's expectations
of the data contained by an object, so you're implicitly changing the
schema.
<P>
<P>
One way to handle such a change is to write a one-time conversion
program that will loop over every single object in the database and
update them to match the new schema. This can be easy if your network
of object references is quite structured, making it easy to find all
the instances of the class being modified. For example, if all
<tt
class=
"class"
>
User
</tt>
objects can be found inside a single dictionary or
BTree, then it would be a simple matter to loop over every
<tt
class=
"class"
>
User
</tt>
instance with a
<tt
class=
"keyword"
>
for
</tt>
statement.
This is more difficult if your object graph is less structured; if
<tt
class=
"class"
>
User
</tt>
objects can be found as attributes of any number of
different class instances, then there's no longer any easy way to find
them all, short of writing a generalized object traversal function
that would walk over every single object in a ZODB, checking each one
to see if it's an instance of
<tt
class=
"class"
>
User
</tt>
.
<A
NAME=
"tex2html1"
HREF=
"#foot262"
><SUP>
1
</SUP></A>
Some OODBs support a feature called extents, which allow quickly
finding all the instances of a given class, no matter where they are
in the object graph; unfortunately the ZODB doesn't offer extents as a
feature.
<p><hr>
<P>
<!--Table of Child-Links-->
XXX Rest of section not written yet: __getstate__/__setstate__
<A
NAME=
"CHILD_LINKS"
><STRONG>
Subsections
</STRONG></a>
<UL>
<P>
<LI><A
href=
"node21.html"
>
2.6.1 Changing Instance Attributes
</a>
<BR><HR><H4>
Footnotes
</H4>
</ul>
<DL>
<!--End of Table of Child-Links-->
<DT><A
NAME=
"foot262"
>
...User.
</A><A
NAME=
"foot262"
HREF=
"node20.html#tex2html1"
><SUP>
1
</SUP></A>
<DD>
XXX is there a convenience method for walking the object graph hiding
somewhere inside DC's code? Should there be a utility method for
doing this? Should I write one and include it in this section?
</DL>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
<p><hr>
<p><hr>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
...
@@ -73,10 +106,10 @@ anyone using the ZODB in a production system.
...
@@ -73,10 +106,10 @@ anyone using the ZODB in a production system.
<td><A
HREF=
"node19.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node19.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
8
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
19
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node21
.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
href=
"zeo
.html"
><img
src=
"/python/writing/icons/next.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Next Page"
width=
"32"
></A></td>
alt=
"Next Page"
width=
"32"
></A></td>
<td
align=
"center"
width=
"100%"
>
ZODB/ZEO Programming Guide
</td>
<td
align=
"center"
width=
"100%"
>
ZODB/ZEO Programming Guide
</td>
...
@@ -90,11 +123,11 @@ anyone using the ZODB in a production system.
...
@@ -90,11 +123,11 @@ anyone using the ZODB in a production system.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node19.html"
>
2.
5.4 __getattr__, __delattr__, and
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node19.html"
>
2.
6 Writing Persistent Classes
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
8.html"
>
2 ZODB Programming
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
19.html"
>
2.6 Writing Persistent Classes
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node21.html"
>
2.6.1 Changing Instance Attributes
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node22.html
0 → 100644
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>
3.1 How ZEO Works
</title>
<META
NAME=
"description"
CONTENT=
"3.1 How ZEO Works"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node23.html"
>
<LINK
REL=
"previous"
href=
"zeo.html"
>
<LINK
REL=
"up"
href=
"zeo.html"
>
<LINK
REL=
"next"
HREF=
"node23.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
<body>
<DIV
CLASS=
"navigation"
>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
<tr>
<td><A
href=
"zeo.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
href=
"zeo.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node23.html"
><img
src=
"/python/writing/icons/next.gif"
border=
"0"
height=
"32"
alt=
"Next Page"
width=
"32"
></A></td>
<td
align=
"center"
width=
"100%"
>
ZODB/ZEO Programming Guide
</td>
<td><A
href=
"contents.html"
><img
src=
"/python/writing/icons/contents.gif"
border=
"0"
height=
"32"
alt=
"Contents"
width=
"32"
></A></td>
<td><img
src=
"/python/writing/icons/blank.gif"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
<td><img
src=
"/python/writing/icons/blank.gif"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node23.html"
>
3.2 Installing ZEO
</A>
<br><hr>
</DIV>
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION000410000000000000000"
>
3.1 How ZEO Works
</A>
</H2>
<P>
The ZODB, as I've described it so far, can only be used within a
single Python process (though perhaps with multiple threads). ZEO,
Zope Enterprise Objects, extends the ZODB machinery to provide access
to objects over a network. The name "Zope Enterprise Objects" is a
bit misleading; ZEO can be used to store Python objects and access
them in a distributed fashion without Zope ever entering the picture.
The combination of ZEO and ZODB is essentially a Python-specific
object database.
<P>
ZEO consists of about 6000 lines of Python code, excluding tests. The
code is relatively small because it contains only code for a TCP/IP
server, and for a new type of Storage,
<tt
class=
"class"
>
ClientStorage
</tt>
.
<tt
class=
"class"
>
ClientStorage
</tt>
simply makes remote procedure calls to the
server, which then passes them on a regular
<tt
class=
"class"
>
Storage
</tt>
class such
as
<tt
class=
"class"
>
FileStorage
</tt>
. The following diagram lays out the system:
<P>
XXX insert diagram here later
<P>
Any number of processes can create a
<tt
class=
"class"
>
ClientStorage
</tt>
instance, and any number of threads in each process can be using that
instance.
<tt
class=
"class"
>
ClientStorage
</tt>
aggressively caches objects
locally, so in order to avoid using stale data. The ZEO server sends
an invalidation message to all the connected
<tt
class=
"class"
>
ClientStorage
</tt>
instances on every write operation. The invalidation message contains
the object ID for each object that's been modified, letting the
<tt
class=
"class"
>
ClientStorage
</tt>
instances delete the old data for the
given object from their caches.
<P>
This design decision has some consequences you should be aware of.
First, while ZEO isn't tied to Zope, it was first written for use with
Zope, which stores HTML, images, and program code in the database. As
a result, reads from the database are
<i>
far
</i>
more frequent than
writes, and ZEO is therefore better suited for read-intensive
applications. If every
<tt
class=
"class"
>
ClientStorage
</tt>
is writing to the
database all the time, this will result in a storm of invalidate
messages being sent, and this might take up more processing time than
the actual database operations themselves.
<A
NAME=
"tex2html2"
HREF=
"#foot429"
><SUP>
2
</SUP></A>
<P>
On the other hand, for applications that have few writes in comparison
to the number of read accesses, this aggressive caching can be a major
win. Consider a Slashdot-like discussion forum that divides the load
among several Web servers. If news items and postings are represented
by objects and accessed through ZEO, then the most heavily accessed
objects - the most recent or most popular postings - will very
quickly wind up in the caches of the
<tt
class=
"class"
>
ClientStorage
</tt>
instances on the front-end servers. The
back-end ZEO server will do relatively little work, only being called
upon to return the occasional older posting that's requested, and to
send the occasional invalidate message when a new posting is added.
The ZEO server isn't going to be contacted for every single request,
so its workload will remain manageable.
<P>
<BR><HR><H4>
Footnotes
</H4>
<DL>
<DT><A
NAME=
"foot429"
>
... themselves.
</A><A
NAME=
"foot429"
HREF=
"node22.html#tex2html2"
><SUP>
2
</SUP></A>
<DD>
These messages are
small and sent in batches, so there would need to be a lot of writes
before it became a problem.
</DL>
<DIV
CLASS=
"navigation"
>
<p><hr>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
<tr>
<td><A
href=
"zeo.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
href=
"zeo.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node23.html"
><img
src=
"/python/writing/icons/next.gif"
border=
"0"
height=
"32"
alt=
"Next Page"
width=
"32"
></A></td>
<td
align=
"center"
width=
"100%"
>
ZODB/ZEO Programming Guide
</td>
<td><A
href=
"contents.html"
><img
src=
"/python/writing/icons/contents.gif"
border=
"0"
height=
"32"
alt=
"Contents"
width=
"32"
></A></td>
<td><img
src=
"/python/writing/icons/blank.gif"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
<td><img
src=
"/python/writing/icons/blank.gif"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node23.html"
>
3.2 Installing ZEO
</A>
<hr>
<span
class=
"release-info"
>
Release 0.04, documentation updated on October 4, 2002.
</span>
</DIV>
<!--End of Navigation Panel-->
</BODY>
</HTML>
doc/guide/zodb/node23.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
3.
1 How ZEO Works
</title>
<title>
3.
2 Installing ZEO
</title>
<META
NAME=
"description"
CONTENT=
"3.
1 How ZEO Works
"
>
<META
NAME=
"description"
CONTENT=
"3.
2 Installing ZEO
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node2
4
.html"
>
<LINK
REL=
"next"
HREF=
"node2
6
.html"
>
<LINK
REL=
"previous"
href=
"zeo
.html"
>
<LINK
REL=
"previous"
HREF=
"node22
.html"
>
<LINK
REL=
"up"
href=
"zeo.html"
>
<LINK
REL=
"up"
href=
"zeo.html"
>
<LINK
REL=
"next"
HREF=
"node24.html"
>
<LINK
REL=
"next"
HREF=
"node24.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
<tr>
<tr>
<td><A
href=
"zeo
.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node22
.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
href=
"zeo.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
href=
"zeo.html"
><img
src=
"/python/writing/icons/up.gif"
...
@@ -40,83 +41,38 @@
...
@@ -40,83 +41,38 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node22.html"
>
3.1 How ZEO Works
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node24.html"
>
3.2
Installing ZEO
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node24.html"
>
3.2
.1 Requirements
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION0004
1
0000000000000000"
>
<H2><A
NAME=
"SECTION0004
2
0000000000000000"
>
3.
1 How ZEO Works
</A>
3.
2 Installing ZEO
</A>
</H2>
</H2>
<P>
<P>
The ZODB, as I've described it so far, can only be used within a
This section covers how to install the ZEO package, and how to
single Python process (though perhaps with multiple threads). ZEO,
configure and run a ZEO Storage Server on a machine.
Zope Enterprise Objects, extends the ZODB machinery to provide access
to objects over a network. The name "Zope Enterprise Objects" is a
bit misleading; ZEO can be used to store Python objects and access
them in a distributed fashion without Zope ever entering the picture.
The combination of ZEO and ZODB is essentially a Python-specific
object database.
<P>
ZEO consists of about 1400 lines of Python code. The code is
relatively small because it contains only code for a TCP/IP server,
and for a new type of Storage,
<tt
class=
"class"
>
ClientStorage
</tt>
.
<tt
class=
"class"
>
ClientStorage
</tt>
doesn't use disk files at all; it simply
makes remote procedure calls to the server, which then passes them on
a regular
<tt
class=
"class"
>
Storage
</tt>
class such as
<tt
class=
"class"
>
FileStorage
</tt>
. The
following diagram lays out the system:
<P>
XXX insert diagram here later
<P>
<P>
Any number of processes can create a
<tt
class=
"class"
>
ClientStorage
</tt>
instance, and any number of threads in each process can be using that
instance.
<tt
class=
"class"
>
ClientStorage
</tt>
aggressively caches objects
locally, so in order to avoid using stale data, the ZEO server sends
an invalidate message to all the connected
<tt
class=
"class"
>
ClientStorage
</tt>
instances on every write operation. The invalidate message contains
the object ID for each object that's been modified, letting the
<tt
class=
"class"
>
ClientStorage
</tt>
instances delete the old data for the
given object from their caches.
<P>
<p><hr>
This design decision has some consequences you should be aware of.
<!--Table of Child-Links-->
First, while ZEO isn't tied to Zope, it was first written for use with
<A
NAME=
"CHILD_LINKS"
><STRONG>
Subsections
</STRONG></a>
Zope, which stores HTML, images, and program code in the database. As
a result, reads from the database are
<i>
far
</i>
more frequent than
writes, and ZEO is therefore better suited for read-intensive
applications. If every
<tt
class=
"class"
>
ClientStorage
</tt>
is writing to the
database all the time, this will result in a storm of invalidate
messages being sent, and this might take up more processing time than
the actual database operations themselves.
<P>
On the other hand, for applications that have few writes in comparison
to the number of read accesses, this aggressive caching can be a major
win. Consider a Slashdot-like discussion forum that divides the load
among several Web servers. If news items and postings are represented
by objects and accessed through ZEO, then the most heavily accessed
objects - the most recent or most popular postings - will very
quickly wind up in the caches of the
<tt
class=
"class"
>
ClientStorage
</tt>
instances on the front-end servers. The
back-end ZEO server will do relatively little work, only being called
upon to return the occasional older posting that's requested, and to
send the occasional invalidate message when a new posting is added.
The ZEO server isn't going to be contacted for every single request,
so its workload will remain manageable.
<P>
<UL>
<LI><A
href=
"node24.html"
>
3.2.1 Requirements
</a>
<LI><A
href=
"node25.html"
>
3.2.2 Running a server
</a>
</ul>
<!--End of Table of Child-Links-->
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
<p><hr>
<p><hr>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
<tr>
<tr>
<td><A
href=
"zeo
.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node22
.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
href=
"zeo.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
href=
"zeo.html"
><img
src=
"/python/writing/icons/up.gif"
...
@@ -136,11 +92,11 @@ so its workload will remain manageable.
...
@@ -136,11 +92,11 @@ so its workload will remain manageable.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node22.html"
>
3.1 How ZEO Works
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node24.html"
>
3.2
Installing ZEO
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node24.html"
>
3.2
.1 Requirements
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node24.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
3.2
Installing ZEO
</title>
<title>
3.2
.1 Requirements
</title>
<META
NAME=
"description"
CONTENT=
"3.2
Installing ZEO
"
>
<META
NAME=
"description"
CONTENT=
"3.2
.1 Requirements
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node2
7
.html"
>
<LINK
REL=
"next"
HREF=
"node2
5
.html"
>
<LINK
REL=
"previous"
HREF=
"node23.html"
>
<LINK
REL=
"previous"
HREF=
"node23.html"
>
<LINK
REL=
"up"
href=
"zeo
.html"
>
<LINK
REL=
"up"
HREF=
"node23
.html"
>
<LINK
REL=
"next"
HREF=
"node25.html"
>
<LINK
REL=
"next"
HREF=
"node25.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<td><A
HREF=
"node23.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node23.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
href=
"zeo
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node23
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node25.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node25.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,33 +41,23 @@
...
@@ -40,33 +41,23 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node23.html"
>
3.
1 How ZEO Works
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node23.html"
>
3.
2 Installing ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3
ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node23.html"
>
3.2 Installing
ZEO
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node25.html"
>
3.2.
1 Requirements
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node25.html"
>
3.2.
2 Running a server
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H
2><A
NAME=
"SECTION000420
000000000000000"
>
<H
3><A
NAME=
"SECTION000421
000000000000000"
>
3.2
Installing ZEO
</A>
3.2
.1 Requirements
</A>
</H
2
>
</H
3
>
<P>
<P>
Th
is section covers how to install the ZEO package, and how to
Th
e ZEO server software is included in ZODB3. As with the rest of
configure and run a ZEO Storage Server on a machine.
ZODB3, you'll need Python 2.1 or higher.
<P>
<P>
<p><hr>
<!--Table of Child-Links-->
<A
NAME=
"CHILD_LINKS"
><STRONG>
Subsections
</STRONG></a>
<UL>
<LI><A
href=
"node25.html"
>
3.2.1 Requirements
</a>
<LI><A
href=
"node26.html"
>
3.2.2 Installation
</a>
</ul>
<!--End of Table of Child-Links-->
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
<p><hr>
<p><hr>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
...
@@ -74,7 +65,7 @@ configure and run a ZEO Storage Server on a machine.
...
@@ -74,7 +65,7 @@ configure and run a ZEO Storage Server on a machine.
<td><A
HREF=
"node23.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node23.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
href=
"zeo
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node23
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node25.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node25.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -91,11 +82,11 @@ configure and run a ZEO Storage Server on a machine.
...
@@ -91,11 +82,11 @@ configure and run a ZEO Storage Server on a machine.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node23.html"
>
3.
1 How ZEO Works
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node23.html"
>
3.
2 Installing ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3
ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node23.html"
>
3.2 Installing
ZEO
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node25.html"
>
3.2.
1 Requirements
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node25.html"
>
3.2.
2 Running a server
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node25.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
3.2.
1 Requirements
</title>
<title>
3.2.
2 Running a server
</title>
<META
NAME=
"description"
CONTENT=
"3.2.
1 Requirements
"
>
<META
NAME=
"description"
CONTENT=
"3.2.
2 Running a server
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node26.html"
>
<LINK
REL=
"previous"
HREF=
"node24.html"
>
<LINK
REL=
"previous"
HREF=
"node24.html"
>
<LINK
REL=
"up"
HREF=
"node2
4
.html"
>
<LINK
REL=
"up"
HREF=
"node2
3
.html"
>
<LINK
REL=
"next"
HREF=
"node26.html"
>
<LINK
REL=
"next"
HREF=
"node26.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<td><A
HREF=
"node24.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node24.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node2
4
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node2
3
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node26.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node26.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,30 +40,23 @@
...
@@ -40,30 +40,23 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node24.html"
>
3.2
Installing ZEO
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node24.html"
>
3.2
.1 Requirements
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node2
4
.html"
>
3.2 Installing ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node2
3
.html"
>
3.2 Installing ZEO
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node26.html"
>
3.
2.2 Installation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node26.html"
>
3.
3 Testing the ZEO
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H3><A
NAME=
"SECTION00042
1
000000000000000"
>
<H3><A
NAME=
"SECTION00042
2
000000000000000"
>
3.2.
1 Requirements
</A>
3.2.
2 Running a server
</A>
</H3>
</H3>
<P>
<P>
To run a ZEO server, you'll need Python 1.5.2 or 2.0, and the ZODB
The start.py script in the ZEO directory can be used to start a
packages from
<a
class=
"url"
href=
"http://www.amk.ca/files/zodb/"
>
http://www.amk.ca/files/zodb/
</a>
have to be installed.
server. Run it with the -h option to see the various values. If
you're just experimenting, a good choise is to use
<P>
<code>
python ZEO/start.py -D -U /tmp/zeosocket
</code>
to run ZEO in
<i>
Note for Python 1.5.2 users
</i>
: ZEO requires updated versions
debug mode and with a Unix domain socket.
of the
<tt
class=
"module"
>
asyncore.py
</tt>
and
<tt
class=
"module"
>
asynchat.py
</tt>
modules that are
included in 1.5.2's standard library. Current versions of the ZODB
distribution install private versions of these modules, so you
shouldn't need to grab updated versions yourself. (The symptom of
this problem is a traceback on attempting to run a ZEO client program:
the traceback is ``TypeError: too many arguments; expected 2, got 3''
around line 100 of
<span
class=
"file"
>
smac.py
</span>
.
<P>
<P>
...
@@ -74,7 +67,7 @@ around line 100 of <span class="file">smac.py</span>.
...
@@ -74,7 +67,7 @@ around line 100 of <span class="file">smac.py</span>.
<td><A
HREF=
"node24.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node24.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node2
4
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node2
3
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node26.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node26.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -91,11 +84,11 @@ around line 100 of <span class="file">smac.py</span>.
...
@@ -91,11 +84,11 @@ around line 100 of <span class="file">smac.py</span>.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node24.html"
>
3.2
Installing ZEO
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node24.html"
>
3.2
.1 Requirements
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node2
4
.html"
>
3.2 Installing ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node2
3
.html"
>
3.2 Installing ZEO
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node26.html"
>
3.
2.2 Installation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node26.html"
>
3.
3 Testing the ZEO
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node26.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
3.
2.2
Installation
</title>
<title>
3.
3 Testing the ZEO
Installation
</title>
<META
NAME=
"description"
CONTENT=
"3.
2.2
Installation"
>
<META
NAME=
"description"
CONTENT=
"3.
3 Testing the ZEO
Installation"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"previous"
HREF=
"node25.html"
>
<LINK
REL=
"up"
HREF=
"node24.html"
>
<LINK
REL=
"next"
HREF=
"node27.html"
>
<LINK
REL=
"next"
HREF=
"node27.html"
>
<LINK
REL=
"previous"
HREF=
"node23.html"
>
<LINK
REL=
"up"
href=
"zeo.html"
>
<LINK
REL=
"next"
HREF=
"node27.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -22,7 +24,7 @@
...
@@ -22,7 +24,7 @@
<td><A
HREF=
"node25.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node25.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node24
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
href=
"zeo
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node27.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node27.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -39,24 +41,54 @@
...
@@ -39,24 +41,54 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node25.html"
>
3.2.
1 Requirements
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node25.html"
>
3.2.
2 Running a server
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node24.html"
>
3.2 Installing
ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3
ZEO
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node27.html"
>
3.
3 Configuring and Running
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node27.html"
>
3.
4 ZEO Programming Notes
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H3><A
NAME=
"SECTION000422000000000000000"
>
<H2><A
NAME=
"SECTION000430000000000000000"
>
3.2.2 Installation
</A>
3.3 Testing the ZEO Installation
</A>
</H3>
</H2>
<P>
Once a ZEO server is up and running, using it is just like using ZODB
with a more conventional disk-based storage; no new programming
details are introduced by using a remote server. The only difference
is that programs must create a
<tt
class=
"class"
>
ClientStorage
</tt>
instance instead
of a
<tt
class=
"class"
>
FileStorage
</tt>
instance. From that point onward, ZODB-based
code is happily unaware that objects are being retrieved from a ZEO
server, and not from the local disk.
<P>
As an example, and to test whether ZEO is working correctly, try
running the following lines of code, which will connect to the server,
add some bits of data to the root of the ZODB, and commits the
transaction:
<P>
<div
class=
"verbatim"
><pre>
from ZEO import ClientStorage
from ZODB import DB
# Change next line to connect to your ZEO server
addr = ('kronos.example.com', 1975)
storage = ClientStorage.ClientStorage(addr)
db = DB(storage)
conn = db.open()
root = conn.root()
# Store some things in the root
root['list'] = ['a', 'b', 1.0, 3]
root['dict'] = {'a':1, 'b':4}
# Commit the transaction
get_transaction().commit()
</pre></div>
<P>
<P>
Installing the ZEO package is easy. Just run
<code>
python setup.py
If this code runs properly, then your ZEO server is working correctly.
install
</code>
. This will install the ZEO/ package into your Python
installation, and copy various files into their proper locations:
<span
class=
"file"
>
zeo.conf
</span>
will be put into
<span
class=
"file"
>
/usr/local/etc/
</span>
, a
<span
class=
"file"
>
zeo
</span>
startup
script will be put in
<span
class=
"file"
>
/etc/rc.d/init.d/
</span>
, and the
<span
class=
"file"
>
zeod
</span>
daemon program will be placed in
<span
class=
"file"
>
/usr/local/bin
</span>
.
<P>
<P>
...
@@ -67,7 +99,7 @@ daemon program will be placed in <span class="file">/usr/local/bin</span>.
...
@@ -67,7 +99,7 @@ daemon program will be placed in <span class="file">/usr/local/bin</span>.
<td><A
HREF=
"node25.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node25.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node24
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
href=
"zeo
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node27.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node27.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -84,11 +116,11 @@ daemon program will be placed in <span class="file">/usr/local/bin</span>.
...
@@ -84,11 +116,11 @@ daemon program will be placed in <span class="file">/usr/local/bin</span>.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node25.html"
>
3.2.
1 Requirements
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node25.html"
>
3.2.
2 Running a server
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node24.html"
>
3.2 Installing
ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3
ZEO
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node27.html"
>
3.
3 Configuring and Running
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node27.html"
>
3.
4 ZEO Programming Notes
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node27.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
3.
3 Configuring and Running a ZEO Server
</title>
<title>
3.
4 ZEO Programming Notes
</title>
<META
NAME=
"description"
CONTENT=
"3.
3 Configuring and Running a ZEO Server
"
>
<META
NAME=
"description"
CONTENT=
"3.
4 ZEO Programming Notes
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node28.html"
>
<LINK
REL=
"next"
HREF=
"node28.html"
>
<LINK
REL=
"previous"
HREF=
"node2
4
.html"
>
<LINK
REL=
"previous"
HREF=
"node2
6
.html"
>
<LINK
REL=
"up"
href=
"zeo.html"
>
<LINK
REL=
"up"
href=
"zeo.html"
>
<LINK
REL=
"next"
HREF=
"node28.html"
>
<LINK
REL=
"next"
HREF=
"node28.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -40,23 +41,27 @@
...
@@ -40,23 +41,27 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node26.html"
>
3.
2.2 Installation
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node26.html"
>
3.
3 Testing the ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node28.html"
>
3.
4 Testing the ZEO
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node28.html"
>
3.
5 Sample Application: chatter.py
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION0004
3
0000000000000000"
>
<H2><A
NAME=
"SECTION0004
4
0000000000000000"
>
3.
3 Configuring and Running a ZEO Server
</A>
3.
4 ZEO Programming Notes
</A>
</H2>
</H2>
<P>
<P>
Edit
<code>
/usr/local/etc/zeo.conf
</code>
appropriately for your desired
ZEO is written using
<tt
class=
"module"
>
asyncore
</tt>
, from the Python standard
setup. This configuration file controls the port on which ZEO will
library. It assumes that some part of the user application is running
listen for connections, the user and group IDs under which the server
an
<tt
class=
"module"
>
asyncore
</tt>
mainloop. For example, Zope run the loop in a
will be executed, and the location of the concrete
<tt
class=
"class"
>
Storage
</tt>
separate thread and ZEO uses that. If your application does not have
object that will be made network-accessible.
a mainloop, ZEO will not process incoming invalidation messages until
you make some call into ZEO. The
<tt
class=
"method"
>
Connection.sync
</tt>
method can
be used to process pending invalidation messages. You can call it
when you want to make sure the
<tt
class=
"class"
>
Connection
</tt>
has the most recent
version of every object, but you don't have any other work for ZEO to do.
<P>
<P>
...
@@ -84,11 +89,11 @@ object that will be made network-accessible.
...
@@ -84,11 +89,11 @@ object that will be made network-accessible.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node26.html"
>
3.
2.2 Installation
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node26.html"
>
3.
3 Testing the ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node28.html"
>
3.
4 Testing the ZEO
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node28.html"
>
3.
5 Sample Application: chatter.py
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node28.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
3.
4 Testing the ZEO Installation
</title>
<title>
3.
5 Sample Application: chatter.py
</title>
<META
NAME=
"description"
CONTENT=
"3.
4 Testing the ZEO Installation
"
>
<META
NAME=
"description"
CONTENT=
"3.
5 Sample Application: chatter.py
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node29.html"
>
<LINK
REL=
"previous"
HREF=
"node27.html"
>
<LINK
REL=
"previous"
HREF=
"node27.html"
>
<LINK
REL=
"up"
href=
"zeo.html"
>
<LINK
REL=
"up"
href=
"zeo.html"
>
<LINK
REL=
"next"
HREF=
"node29.html"
>
<LINK
REL=
"next"
HREF=
"node29.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -40,54 +40,154 @@
...
@@ -40,54 +40,154 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node27.html"
>
3.
3 Configuring and Running
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node27.html"
>
3.
4 ZEO Programming Notes
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node29.html"
>
3.5 ZEO Programming Notes
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node29.html"
>
4 Transactions and Versioning
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION0004
4
0000000000000000"
>
<H2><A
NAME=
"SECTION0004
5
0000000000000000"
>
3.
4 Testing the ZEO Installation
</A>
3.
5 Sample Application: chatter.py
</A>
</H2>
</H2>
<P>
<P>
Once a ZEO server is up and running, using it is just like using ZODB
For an example application, we'll build a little chat application.
with a more conventional disk-based storage; no new programming
What's interesting is that none of the application's code deals with
details are introduced by using a remote server. The only difference
network programming at all; instead, an object will hold chat
is that programs must create a
<tt
class=
"class"
>
ClientStorage
</tt>
instance instead
messages, and be magically shared between all the clients through ZEO.
of a
<tt
class=
"class"
>
FileStorage
</tt>
instance. From that point onward, ZODB-based
I won't present the complete script here; it's included in my ZODB
code is happily unaware that objects are being retrieved from a ZEO
distribution, and you can download it from
server, and not from the local disk.
<a
class=
"url"
href=
"http://www.amk.ca/zodb/demos/"
>
http://www.amk.ca/zodb/demos/
</a>
. Only the interesting portions of
the code will be covered here.
<P>
The basic data structure is the
<tt
class=
"class"
>
ChatSession
</tt>
object,
which provides an
<tt
class=
"method"
>
add_message()
</tt>
method that adds a
message, and a
<tt
class=
"method"
>
new_messages()
</tt>
method that returns a list
of new messages that have accumulated since the last call to
<tt
class=
"method"
>
new_messages()
</tt>
. Internally,
<tt
class=
"class"
>
ChatSession
</tt>
maintains a B-tree that uses the time as the key, and stores the
message as the corresponding value.
<P>
The constructor for
<tt
class=
"class"
>
ChatSession
</tt>
is pretty simple; it simply
creates an attribute containing a B-tree:
<P>
<div
class=
"verbatim"
><pre>
class ChatSession(Persistent):
def __init__(self, name):
self.name = name
# Internal attribute: _messages holds all the chat messages.
self._messages = BTrees.OOBTree.OOBTree()
</pre></div>
<P>
<tt
class=
"method"
>
add_message()
</tt>
has to add a message to the
<code>
_messages
</code>
B-tree. A complication is that it's possible
that some other client is trying to add a message at the same time;
when this happens, the client that commits first wins, and the second
client will get a
<tt
class=
"exception"
>
ConflictError
</tt>
exception when it tries to
commit. For this application,
<tt
class=
"exception"
>
ConflictError
</tt>
isn't serious
but simply means that the operation has to be retried; other
applications might treat it as a fatal error. The code uses
<code>
try...except...else
</code>
inside a
<code>
while
</code>
loop,
breaking out of the loop when the commit works without raising an
exception.
<P>
<div
class=
"verbatim"
><pre>
def add_message(self, message):
"""Add a message to the channel.
message -- text of the message to be added
"""
while 1:
try:
now = time.time()
self._messages[now] = message
get_transaction().commit()
except ConflictError:
# Conflict occurred; this process should pause and
# wait for a little bit, then try again.
time.sleep(.2)
pass
else:
# No ConflictError exception raised, so break
# out of the enclosing while loop.
break
# end while
</pre></div>
<P>
<tt
class=
"method"
>
new_messages()
</tt>
introduces the use of
<i>
volatile
</i>
attributes. Attributes of a persistent object that begin with
<code>
_v_
</code>
are considered volatile and are never stored in the
database.
<tt
class=
"method"
>
new_messages()
</tt>
needs to store the last time
the method was called, but if the time was stored as a regular
attribute, its value would be committed to the database and shared
with all the other clients.
<tt
class=
"method"
>
new_messages()
</tt>
would then
return the new messages accumulated since any other client called
<tt
class=
"method"
>
new_messages()
</tt>
, which isn't what we want.
<P>
<div
class=
"verbatim"
><pre>
def new_messages(self):
"Return new messages."
# self._v_last_time is the time of the most recent message
# returned to the user of this class.
if not hasattr(self, '_v_last_time'):
self._v_last_time = 0
new = []
T = self._v_last_time
for T2, message in self._messages.items():
if T2
>
T:
new.append(message)
self._v_last_time = T2
return new
</pre></div>
<P>
<P>
As an example, and to test whether ZEO is working correctly, try
This application is interesting because it uses ZEO to easily share a
running the following lines of code, which will connect to the server,
data structure; ZEO and ZODB are being used for their networking
a
dd some bits of data to the root of the ZODB, and commits th
e
a
bility, not primarily for their data storage ability. I can forese
e
transaction
:
many interesting applications using ZEO in this way
:
<P>
<P>
<dl><dd><pre
class=
"verbatim"
>
from ZEO import ClientStorage
from ZODB import DB
# Change next line to connect to your ZEO server
<UL>
addr = ('kronos.example.com', 1975)
<LI>
With a Tkinter front-end, and a cleverer, more scalable data
storage = ClientStorage.ClientStorage(addr)
structure, you could build a shared whiteboard using the same
db = DB(storage)
technique.
conn = db.open()
root = conn.root()
<P>
</LI>
<LI>
A shared chessboard object would make writing a networked chess
game easy.
# Store some things in the root
<P>
root['list'] = ['a', 'b', 1.0, 3]
</LI>
root['dict'] = {'a':1, 'b':4}
<LI>
You could create a Python class containing a CD's title and
track information. To make a CD database, a read-only ZEO server
could be opened to the world, or an HTTP or XML-RPC interface could
be written on top of the ZODB.
# Commit the transaction
<P>
get_transaction().commit()
</LI>
</pre></dl>
<LI>
A program like Quicken could use a ZODB on the local disk to
store its data. This avoids the need to write and maintain
specialized I/O code that reads in your objects and writes them out;
instead you can concentrate on the problem domain, writing objects
that represent cheques, stock portfolios, or whatever.
<P>
<P>
If this code runs properly, then your ZEO server is working correctly.
</LI>
</UL>
<P>
<P>
...
@@ -115,11 +215,11 @@ If this code runs properly, then your ZEO server is working correctly.
...
@@ -115,11 +215,11 @@ If this code runs properly, then your ZEO server is working correctly.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node27.html"
>
3.
3 Configuring and Running
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node27.html"
>
3.
4 ZEO Programming Notes
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node29.html"
>
3.5 ZEO Programming Notes
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node29.html"
>
4 Transactions and Versioning
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node29.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
3.5 ZEO Programming Notes
</title>
<title>
4 Transactions and Versioning
</title>
<META
NAME=
"description"
CONTENT=
"
3.5 ZEO Programming Notes
"
>
<META
NAME=
"description"
CONTENT=
"
4 Transactions and Versioning
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node34.html"
>
<LINK
REL=
"previous"
href=
"zeo.html"
>
<LINK
REL=
"up"
HREF=
"zodb.html"
>
<LINK
REL=
"next"
HREF=
"node30.html"
>
<LINK
REL=
"next"
HREF=
"node30.html"
>
<LINK
REL=
"previous"
HREF=
"node28.html"
>
<meta
name=
'aesop'
content=
'information'
>
<LINK
REL=
"up"
href=
"zeo.html"
>
<LINK
REL=
"next"
HREF=
"node30.html"
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<td><A
HREF=
"node28.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node28.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
href=
"zeo
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"zodb
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node30.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node30.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,21 +41,30 @@
...
@@ -40,21 +41,30 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node28.html"
>
3.
4 Testing the ZEO
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node28.html"
>
3.
5 Sample Application: chatter.py
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node30.html"
>
3.6 Sample Application: chatter.py
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node30.html"
>
4.1 Subtransactions
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H
2><A
NAME=
"SECTION00045
0000000000000000"
>
<H
1><A
NAME=
"SECTION00050
0000000000000000"
>
3.5 ZEO Programming Notes
</A>
4 Transactions and Versioning
</A>
</H
2
>
</H
1
>
<P>
<P>
XXX The Connection.sync() method and its necessity (if it works at all!)
<P>
<p><hr>
<!--Table of Child-Links-->
<A
NAME=
"CHILD_LINKS"
><STRONG>
Subsections
</STRONG></a>
<UL>
<LI><A
href=
"node30.html"
>
4.1 Subtransactions
</a>
<LI><A
href=
"node31.html"
>
4.2 Undoing Changes
</a>
<LI><A
href=
"node32.html"
>
4.3 Versions
</a>
<LI><A
href=
"node33.html"
>
4.4 Multithreaded ZODB Programs
</a>
</ul>
<!--End of Table of Child-Links-->
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
<p><hr>
<p><hr>
...
@@ -63,7 +73,7 @@ XXX The Connection.sync() method and its necessity (if it works at all!)
...
@@ -63,7 +73,7 @@ XXX The Connection.sync() method and its necessity (if it works at all!)
<td><A
HREF=
"node28.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node28.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
href=
"zeo
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"zodb
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node30.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node30.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -80,11 +90,11 @@ XXX The Connection.sync() method and its necessity (if it works at all!)
...
@@ -80,11 +90,11 @@ XXX The Connection.sync() method and its necessity (if it works at all!)
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node28.html"
>
3.
4 Testing the ZEO
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node28.html"
>
3.
5 Sample Application: chatter.py
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node30.html"
>
3.6 Sample Application: chatter.py
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node30.html"
>
4.1 Subtransactions
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node3.html
View file @
243c4e27
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<LINK
REL=
"previous"
HREF=
"node2.html"
>
<LINK
REL=
"previous"
HREF=
"node2.html"
>
<LINK
REL=
"up"
HREF=
"node2.html"
>
<LINK
REL=
"up"
HREF=
"node2.html"
>
<LINK
REL=
"next"
HREF=
"node4.html"
>
<LINK
REL=
"next"
HREF=
"node4.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -106,7 +107,7 @@ accessed in a while.
...
@@ -106,7 +107,7 @@ accessed in a while.
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node2.html"
>
1 Introduction
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node2.html"
>
1 Introduction
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node4.html"
>
1.2 OODBs vs. Relational
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node4.html"
>
1.2 OODBs vs. Relational
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node30.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
3.6 Sample Application: chatter.py
</title>
<title>
4.1 Subtransactions
</title>
<META
NAME=
"description"
CONTENT=
"
3.6 Sample Application: chatter.py
"
>
<META
NAME=
"description"
CONTENT=
"
4.1 Subtransactions
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node31.html"
>
<LINK
REL=
"previous"
HREF=
"node29.html"
>
<LINK
REL=
"previous"
HREF=
"node29.html"
>
<LINK
REL=
"up"
href=
"zeo
.html"
>
<LINK
REL=
"up"
HREF=
"node29
.html"
>
<LINK
REL=
"next"
HREF=
"node31.html"
>
<LINK
REL=
"next"
HREF=
"node31.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -22,7 +24,7 @@
...
@@ -22,7 +24,7 @@
<td><A
HREF=
"node29.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node29.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
href=
"zeo
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node29
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node31.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node31.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -39,154 +41,52 @@
...
@@ -39,154 +41,52 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node29.html"
>
3.5 ZEO Programming Notes
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node29.html"
>
4 Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node29.html"
>
4 Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node31.html"
>
4
Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node31.html"
>
4
.2 Undoing Changes
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION000
46
0000000000000000"
>
<H2><A
NAME=
"SECTION000
51
0000000000000000"
>
3.6 Sample Application: chatter.py
</A>
4.1 Subtransactions
</A>
</H2>
</H2>
<P>
<P>
For an example application, we'll build a little chat application.
Subtransactions can be created within a transaction. Each
What's interesting is that none of the application's code deals with
subtransaction can be individually committed and aborted, but the
network programming at all; instead, an object will hold chat
changes within a subtransaction are not truly committed until the
messages, and be magically shared between all the clients through ZEO.
containing transaction is committed.
I won't present the complete script here; it's included in my ZODB
distribution, and you can download it from
<a
class=
"url"
href=
"http://www.amk.ca/zodb/demos/"
>
http://www.amk.ca/zodb/demos/
</a>
. Only the interesting portions of
the code will be covered here.
<P>
The basic data structure is the
<tt
class=
"class"
>
ChatSession
</tt>
object,
which provides an
<tt
class=
"method"
>
add_message()
</tt>
method that adds a
message, and a
<tt
class=
"method"
>
new_messages()
</tt>
method that returns a list
of new messages that have accumulated since the last call to
<tt
class=
"method"
>
new_messages()
</tt>
. Internally,
<tt
class=
"class"
>
ChatSession
</tt>
maintains a B-tree that uses the time as the key, and stores the
message as the corresponding value.
<P>
The constructor for
<tt
class=
"class"
>
ChatSession
</tt>
is pretty simple; it simply
creates an attribute containing a B-tree:
<P>
<dl><dd><pre
class=
"verbatim"
>
class ChatSession(Persistent):
def __init__(self, name):
self.name = name
# Internal attribute: _messages holds all the chat messages.
self._messages = BTree.BTree()
</pre></dl>
<P>
<tt
class=
"method"
>
add_message()
</tt>
has to add a message to the
<code>
_messages
</code>
B-tree. A complication is that it's possible
that some other client is trying to add a message at the same time;
when this happens, the client that commits first wins, and the second
client will get a
<tt
class=
"exception"
>
ConflictError
</tt>
exception when it tries to
commit. For this application,
<tt
class=
"exception"
>
ConflictError
</tt>
isn't serious
but simply means that the operation has to be retried; other
applications might treat it as a fatal error. The code uses
<code>
try...except...else
</code>
inside a
<code>
while
</code>
loop,
breaking out of the loop when the commit works without raising an
exception.
<P>
<dl><dd><pre
class=
"verbatim"
>
def add_message(self, message):
"""Add a message to the channel.
message -- text of the message to be added
"""
while 1:
try:
now = time.time()
self._messages[now] = message
get_transaction().commit()
except ConflictError:
# Conflict occurred; this process should pause and
# wait for a little bit, then try again.
time.sleep(.2)
pass
else:
# No ConflictError exception raised, so break
# out of the enclosing while loop.
break
# end while
</pre></dl>
<P>
<tt
class=
"method"
>
new_messages()
</tt>
introduces the use of
<i>
volatile
</i>
attributes. Attributes of a persistent object that begin with
<code>
_v_
</code>
are considered volatile and are never stored in the
database.
<tt
class=
"method"
>
new_messages()
</tt>
needs to store the last time
the method was called, but if the time was stored as a regular
attribute, its value would be committed to the database and shared
with all the other clients.
<tt
class=
"method"
>
new_messages()
</tt>
would then
return the new messages accumulated since any other client called
<tt
class=
"method"
>
new_messages()
</tt>
, which isn't what we want.
<P>
<dl><dd><pre
class=
"verbatim"
>
def new_messages(self):
"Return new messages."
# self._v_last_time is the time of the most recent message
# returned to the user of this class.
if not hasattr(self, '_v_last_time'):
self._v_last_time = 0
new = []
T = self._v_last_time
for T2, message in self._messages.items():
if T2
>
T:
new.append(message)
self._v_last_time = T2
return new
</pre></dl>
<P>
This application is interesting because it uses ZEO to easily share a
data structure; ZEO and ZODB are being used for their networking
ability, not primarily for their data storage ability. I can foresee
many interesting applications using ZEO in this way:
<P>
<P>
The primary purpose of subtransactions is to decrease the memory usage
<UL>
of transactions that touch a very large number of objects. Consider a
<LI>
With a Tkinter front-end, and a cleverer, more scalable data
transaction during which 200,000 objects are modified. All the
structure, you could build a shared whiteboard using the same
objects that are modified in a single transaction have to remain in
technique.
memory until the transaction is committed, because the ZODB can't
discard them from the object cache. This can potentially make the
memory usage quite large. With subtransactions, a commit can be be
performed at intervals, say, every 10,000 objects. Those 10,000
objects are then written to permanent storage and can be purged from
the cache to free more space.
<P>
<P>
</LI>
To commit a subtransaction instead of a full transaction,
<LI>
A shared chessboard object would make writing a networked chess
pass a true value to the
<tt
class=
"method"
>
commit()
</tt>
game easy.
or
<tt
class=
"method"
>
abort()
</tt>
method of the
<tt
class=
"class"
>
Transaction
</tt>
object.
<P>
<P>
</LI>
<div
class=
"verbatim"
><pre>
<LI>
You could create a Python class containing a CD's title and
# Commit a subtransaction
track information. To make a CD database, a read-only ZEO server
get_transaction().commit(1)
could be opened to the world, or an HTTP or XML-RPC interface could
be written on top of the ZODB.
<P>
# Abort a subtransaction
</LI>
get_transaction().abort(1)
<LI>
A program like Quicken could use a ZODB on the local disk to
</pre></div>
store its data. This avoids the need to write and maintain
specialized I/O code that reads in your objects and writes them out;
instead you can concentrate on the problem domain, writing objects
that represent cheques, stock portfolios, or whatever.
<P>
<P>
</LI>
A new subtransaction is automatically started on committing or
</UL>
aborting the previous subtransaction.
<P>
<P>
...
@@ -197,7 +97,7 @@ many interesting applications using ZEO in this way:
...
@@ -197,7 +97,7 @@ many interesting applications using ZEO in this way:
<td><A
HREF=
"node29.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node29.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
href=
"zeo
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node29
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node31.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node31.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -214,11 +114,11 @@ many interesting applications using ZEO in this way:
...
@@ -214,11 +114,11 @@ many interesting applications using ZEO in this way:
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node29.html"
>
3.5 ZEO Programming Notes
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node29.html"
>
4 Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
href=
"zeo.html"
>
3 ZEO
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node29.html"
>
4 Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node31.html"
>
4
Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node31.html"
>
4
.2 Undoing Changes
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node31.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
4
Transactions and Versioning
</title>
<title>
4
.2 Undoing Changes
</title>
<META
NAME=
"description"
CONTENT=
"4
Transactions and Versioning
"
>
<META
NAME=
"description"
CONTENT=
"4
.2 Undoing Changes
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node36.html"
>
<LINK
REL=
"previous"
href=
"zeo.html"
>
<LINK
REL=
"up"
HREF=
"zodb.html"
>
<LINK
REL=
"next"
HREF=
"node32.html"
>
<LINK
REL=
"next"
HREF=
"node32.html"
>
<LINK
REL=
"previous"
HREF=
"node30.html"
>
<LINK
REL=
"up"
HREF=
"node29.html"
>
<LINK
REL=
"next"
HREF=
"node32.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<td><A
HREF=
"node30.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node30.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"
zodb
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"
node29
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node32.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node32.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,31 +41,99 @@
...
@@ -40,31 +41,99 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node30.html"
>
3.6 Sample Application: chatter.py
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node30.html"
>
4.1 Subtransactions
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
node29.html"
>
4 Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node32.html"
>
4.
1 Subtransact
ions
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node32.html"
>
4.
3 Vers
ions
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H
1><A
NAME=
"SECTION00050
0000000000000000"
>
<H
2><A
NAME=
"SECTION00052
0000000000000000"
>
4
Transactions and Versioning
</A>
4
.2 Undoing Changes
</A>
</H
1
>
</H
2
>
<P>
<P>
Some types of
<tt
class=
"class"
>
Storage
</tt>
support undoing a transaction even after
it's been committed. You can tell if this is the case by calling the
<tt
class=
"method"
>
supportsUndo()
</tt>
method of the
<tt
class=
"class"
>
DB
</tt>
instance, which
returns true if the underlying storage supports undo. Alternatively
you can call the
<tt
class=
"method"
>
supportsUndo()
</tt>
method on the underlying
storage instance.
<p><hr>
<P>
<!--Table of Child-Links-->
If a database supports undo, then the
<tt
class=
"method"
>
undoLog(
<var>
start
</var>
,
<A
NAME=
"CHILD_LINKS"
><STRONG>
Subsections
</STRONG></a>
<var>
end
</var><big>
[
</big>
, func
<big>
]
</big>
)
</tt>
method on the
<tt
class=
"class"
>
DB
</tt>
instance returns
the log of past transactions, returning transactions between the times
<var>
start
</var>
and
<var>
end
</var>
, measured in seconds from the epoch.
If present,
<var>
func
</var>
is a function that acts as a filter on the
transactions to be returned; it's passed a dictionary representing
each transaction, and only transactions for which
<var>
func
</var>
returns
true will be included in the list of transactions returned to the
caller of
<tt
class=
"method"
>
undoLog()
</tt>
. The dictionary contains keys for
various properties of the transaction. The most important keys are
"
<tt
class=
"samp"
>
id
</tt>
", for the transaction ID, and "
<tt
class=
"samp"
>
time
</tt>
", for the time at
which the transaction was committed.
<P>
<div
class=
"verbatim"
><pre>
>>>
print storage.undoLog(0, sys.maxint)
[{'description': '',
'id': 'AzpGEGqU/0QAAAAAAAAGMA',
'time': 981126744.98,
'user_name': ''},
{'description': '',
'id': 'AzpGC/hUOKoAAAAAAAAFDQ',
'time': 981126478.202,
'user_name': ''}
...
</pre></div>
<P>
To store a description and a user name on a commit, get the current
transaction and call the
<tt
class=
"method"
>
note(
<var>
text
</var>
)
</tt>
method to store a
description, and the
<tt
class=
"method"
>
setUser(
<var>
user_name
</var>
)
</tt>
method to store the user name.
While
<tt
class=
"method"
>
setUser()
</tt>
overwrites the current user name and replaces
it with the new value, the
<tt
class=
"method"
>
note()
</tt>
method always adds the text
to the transaction's description, so it can be called several times to
log several different changes made in the course of a single
transaction.
<UL>
<P>
<LI><A
href=
"node32.html"
>
4.1 Subtransactions
</a>
<div
class=
"verbatim"
><pre>
<LI><A
href=
"node33.html"
>
4.2 Undoing Changes
</a>
get_transaction().setUser('amk')
<LI><A
href=
"node34.html"
>
4.3 Versions
</a>
get_transaction().note('Change ownership')
<LI><A
href=
"node35.html"
>
4.4 Multithreaded ZODB Programs
</a>
</pre></div>
</ul>
<!--End of Table of Child-Links-->
<P>
To undo a transaction, call the
<tt
class=
"method"
>
DB.undo(
<var>
id
</var>
)
</tt>
method,
passing it the ID of the transaction to undo. If the transaction
can't be undone, a
<tt
class=
"exception"
>
ZODB.POSException.UndoError
</tt>
exception
will be raised, with the message ``non-undoable
transaction''. Usually this will happen because later transactions
modified the objects affected by the transaction you're trying to
undo.
<P>
After you call
<tt
class=
"method"
>
undo()
</tt>
you must commit the transaction for the
undo to actually be applied.
<A
NAME=
"tex2html3"
HREF=
"#foot583"
><SUP>
3
</SUP></A>
There is one glitch in the undo process. The thread
that calls undo may not see the changes to the object until it calls
<tt
class=
"method"
>
Connection.sync()
</tt>
or commits another transaction.
<P>
<BR><HR><H4>
Footnotes
</H4>
<DL>
<DT><A
NAME=
"foot583"
>
... applied.
</A><A
NAME=
"foot583"
HREF=
"node31.html#tex2html3"
><SUP>
3
</SUP></A>
<DD>
There are actually two different ways a storage can
implement the undo feature. Most of the storages that ship with ZODB
use the transactional form of undo described in the main text. Some
storages may use a non-transactional undo makes changes visible
immediately.
</DL>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
<p><hr>
<p><hr>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
...
@@ -72,7 +141,7 @@
...
@@ -72,7 +141,7 @@
<td><A
HREF=
"node30.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node30.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"
zodb
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"
node29
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node32.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node32.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -89,11 +158,11 @@
...
@@ -89,11 +158,11 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node30.html"
>
3.6 Sample Application: chatter.py
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node30.html"
>
4.1 Subtransactions
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
node29.html"
>
4 Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node32.html"
>
4.
1 Subtransact
ions
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node32.html"
>
4.
3 Vers
ions
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node32.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
4.
1 Subtransact
ions
</title>
<title>
4.
3 Vers
ions
</title>
<META
NAME=
"description"
CONTENT=
"4.
1 Subtransact
ions"
>
<META
NAME=
"description"
CONTENT=
"4.
3 Vers
ions"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node33.html"
>
<LINK
REL=
"next"
HREF=
"node33.html"
>
<LINK
REL=
"previous"
HREF=
"node31.html"
>
<LINK
REL=
"previous"
HREF=
"node31.html"
>
<LINK
REL=
"up"
HREF=
"node
31
.html"
>
<LINK
REL=
"up"
HREF=
"node
29
.html"
>
<LINK
REL=
"next"
HREF=
"node33.html"
>
<LINK
REL=
"next"
HREF=
"node33.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<td><A
HREF=
"node31.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node31.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
31
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
29
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node33.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node33.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,52 +41,73 @@
...
@@ -40,52 +41,73 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node31.html"
>
4
Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node31.html"
>
4
.2 Undoing Changes
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
31
.html"
>
4 Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
29
.html"
>
4 Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node33.html"
>
4.
2 Undoing Change
s
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node33.html"
>
4.
4 Multithreaded ZODB Program
s
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION0005
1
0000000000000000"
>
<H2><A
NAME=
"SECTION0005
3
0000000000000000"
>
4.
1 Subtransact
ions
</A>
4.
3 Vers
ions
</A>
</H2>
</H2>
<P>
<P>
Subtransactions can be created within a transaction. Each
While many subtransactions can be contained within a single regular
subtransaction can be individually committed and aborted, but the
transaction, it's also possible to contain many regular transactions
changes within a subtransaction are not truly committed until the
within a long-running transaction, called a version in ZODB
containing transaction is committed.
terminology. Inside a version, any number of transactions can be
created and committed or rolled back, but the changes within a version
are not made visible to other connections to the same ZODB.
<P>
<P>
The primary purpose of subtransactions is to decrease the memory usage
Not all storages support versions, but you can test for versioning
of transactions that touch a very large number of objects. Consider a
ability by calling
<tt
class=
"method"
>
supportsVersions()
</tt>
method of the
transaction during which 200,000 objects are modified. All the
<tt
class=
"class"
>
DB
</tt>
instance, which returns true if the underlying storage
objects that are modified in a single transaction have to remain in
supports versioning.
memory until the transaction is committed, because the ZODB can't
discard them from the object cache. This can potentially make the
memory usage quite large. With subtransactions, a commit can be be
performed at intervals, say, every 10,000 objects. Those 10,000
objects are then written to permanent storage and can be purged from
the cache to free more space.
<P>
<P>
To commit a subtransaction instead of a full transaction,
A version can be selected when creating the
<tt
class=
"class"
>
Connection
</tt>
pass a true value to the
<tt
class=
"method"
>
commit()
</tt>
instance using the
<tt
class=
"method"
>
DB.open(
<big>
[
</big><var>
version
</var><big>
]
</big>
)
</tt>
method.
or
<tt
class=
"method"
>
abort()
</tt>
method of the
<tt
class=
"class"
>
Transaction
</tt>
object.
The
<var>
version
</var>
argument must be a string that will be used as the
name of the version.
<P>
<P>
<d
l><dd><pre
class=
"verbatim"
>
<d
iv
class=
"verbatim"
><pre
>
# Commit a subtransaction
vers_conn = db.open(version='Working version')
get_transaction().commit(1)
</pre></div>
# Abort a subtransaction
<P>
get_transaction().abort(1)
Transactions can then be committed and aborted using this versioned
</pre></dl>
connection. Other connections that don't specify a version, or
provide a different version name, will not see changes committed
within the version named "
<tt
class=
"samp"
>
Working
version
</tt>
". To commit or abort a
version, which will either make the changes visible to all clients or
roll them back, call the
<tt
class=
"method"
>
DB.commitVersion()
</tt>
or
<tt
class=
"method"
>
DB.abortVersion()
</tt>
methods.
XXX what are the source and dest arguments for?
<P>
The ZODB makes no attempt to reconcile changes between different
versions. Instead, the first version which modifies an object will
gain a lock on that object. Attempting to modify the object from a
different version or from an unversioned connection will cause a
<tt
class=
"exception"
>
ZODB.POSException.VersionLockError
</tt>
to be raised:
<P>
<div
class=
"verbatim"
><pre>
from ZODB.POSException import VersionLockError
try:
get_transaction().commit()
except VersionLockError, (obj_id, version):
print ('Cannot commit; object %s '
'locked by version %s' % (obj_id, version))
</pre></div>
<P>
<P>
A new subtransaction is automatically started on committing or
The exception provides the ID of the locked object, and the name of
aborting the previous subtransaction
.
the version having a lock on it
.
<P>
<P>
...
@@ -96,7 +118,7 @@ aborting the previous subtransaction.
...
@@ -96,7 +118,7 @@ aborting the previous subtransaction.
<td><A
HREF=
"node31.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node31.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
31
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
29
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node33.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node33.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -113,11 +135,11 @@ aborting the previous subtransaction.
...
@@ -113,11 +135,11 @@ aborting the previous subtransaction.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node31.html"
>
4
Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node31.html"
>
4
.2 Undoing Changes
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
31
.html"
>
4 Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
29
.html"
>
4 Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node33.html"
>
4.
2 Undoing Change
s
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node33.html"
>
4.
4 Multithreaded ZODB Program
s
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node33.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
4.
2 Undoing Change
s
</title>
<title>
4.
4 Multithreaded ZODB Program
s
</title>
<META
NAME=
"description"
CONTENT=
"4.
2 Undoing Change
s"
>
<META
NAME=
"description"
CONTENT=
"4.
4 Multithreaded ZODB Program
s"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node34.html"
>
<LINK
REL=
"previous"
HREF=
"node32.html"
>
<LINK
REL=
"previous"
HREF=
"node32.html"
>
<LINK
REL=
"up"
HREF=
"node
31
.html"
>
<LINK
REL=
"up"
HREF=
"node
29
.html"
>
<LINK
REL=
"next"
HREF=
"node34.html"
>
<LINK
REL=
"next"
HREF=
"node34.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<td><A
HREF=
"node32.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node32.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
31
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
29
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node34.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node34.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,78 +40,22 @@
...
@@ -40,78 +40,22 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node32.html"
>
4.
1 Subtransact
ions
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node32.html"
>
4.
3 Vers
ions
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
31
.html"
>
4 Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
29
.html"
>
4 Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node34.html"
>
4.3 Version
s
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node34.html"
>
5 Related Module
s
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION0005
2
0000000000000000"
>
<H2><A
NAME=
"SECTION0005
4
0000000000000000"
>
4.
2 Undoing Change
s
</A>
4.
4 Multithreaded ZODB Program
s
</A>
</H2>
</H2>
<P>
<P>
Some types of
<tt
class=
"class"
>
Storage
</tt>
support undoing a transaction even after
ZODB databases can be accessed from multithreaded Python programs.
it's been committed. You can tell if this is the case by calling the
The
<tt
class=
"class"
>
Storage
</tt>
and
<tt
class=
"class"
>
DB
</tt>
instances can be shared among
<tt
class=
"method"
>
supportsUndo()
</tt>
method of the
<tt
class=
"class"
>
DB
</tt>
instance, which
several threads, as long as individual
<tt
class=
"class"
>
Connection
</tt>
instances
returns true if the underlying storage supports undo. Alternatively
are created for each thread.
you can call the
<tt
class=
"method"
>
supportsUndo()
</tt>
method on the underlying
storage instance.
<P>
If a database supports undo, then the
<tt
class=
"method"
>
undoLog(
<var>
start
</var>
,
<var>
end
</var><big>
[
</big>
, func
<big>
]
</big>
)
</tt>
method on the
<tt
class=
"class"
>
DB
</tt>
instance returns
the log of past transactions, returning transactions between the times
<var>
start
</var>
and
<var>
end
</var>
, measured in seconds from the epoch.
If present,
<var>
func
</var>
is a function that acts as a filter on the
transactions to be returned; it's passed a dictionary representing
each transaction, and only transactions for which
<var>
func
</var>
returns
true will be included in the list of transactions returned to the
caller of
<tt
class=
"method"
>
undoLog()
</tt>
. The dictionary contains keys for
various properties of the transaction. The most important keys are
"
<tt
class=
"samp"
>
id
</tt>
", for the transaction ID, and "
<tt
class=
"samp"
>
time
</tt>
", for the time at
which the transaction was committed.
<P>
<dl><dd><pre
class=
"verbatim"
>
>>>
print storage.undoLog(0, sys.maxint)
[{'description': '',
'id': 'AzpGEGqU/0QAAAAAAAAGMA',
'time': 981126744.98,
'user_name': ''},
{'description': '',
'id': 'AzpGC/hUOKoAAAAAAAAFDQ',
'time': 981126478.202,
'user_name': ''}
...
</pre></dl>
<P>
To store a description and a user name on a commit, get the current
transaction and call the
<tt
class=
"method"
>
note(
<var>
text
</var>
)
</tt>
method to store a
description, and the
<tt
class=
"method"
>
setUser(
<var>
user_name
</var>
)
</tt>
method to store the user name.
While
<tt
class=
"method"
>
setUser()
</tt>
overwrites the current user name and replaces
it with the new value, the
<tt
class=
"method"
>
note()
</tt>
method always adds the text
to the transaction's description, so it can be called several times to
log several different changes made in the course of a single
transaction.
<P>
<dl><dd><pre
class=
"verbatim"
>
get_transaction().setUser('amk')
get_transaction().note('Change ownership')
</pre></dl>
<P>
To undo a transaction, call the
<tt
class=
"method"
>
DB.undo(
<var>
id
</var>
)
</tt>
method,
passing it the ID of the transaction to undo. If the transaction
can't be undone, a
<tt
class=
"exception"
>
ZODB.POSException.UndoError
</tt>
exception
will be raised, with the message ``non-undoable
transaction''. Usually this will happen because later transactions
modified the objects affected by the transaction you're trying to
undo.
<P>
<P>
...
@@ -122,7 +66,7 @@ undo.
...
@@ -122,7 +66,7 @@ undo.
<td><A
HREF=
"node32.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node32.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
31
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
29
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node34.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node34.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -139,11 +83,11 @@ undo.
...
@@ -139,11 +83,11 @@ undo.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node32.html"
>
4.
1 Subtransact
ions
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node32.html"
>
4.
3 Vers
ions
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
31
.html"
>
4 Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
29
.html"
>
4 Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node34.html"
>
4.3 Version
s
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node34.html"
>
5 Related Module
s
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node34.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
4.3 Version
s
</title>
<title>
5 Related Module
s
</title>
<META
NAME=
"description"
CONTENT=
"
4.3 Version
s"
>
<META
NAME=
"description"
CONTENT=
"
5 Related Module
s"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node38.html"
>
<LINK
REL=
"previous"
HREF=
"node29.html"
>
<LINK
REL=
"up"
HREF=
"zodb.html"
>
<LINK
REL=
"next"
HREF=
"node35.html"
>
<LINK
REL=
"next"
HREF=
"node35.html"
>
<LINK
REL=
"previous"
HREF=
"node33.html"
>
<meta
name=
'aesop'
content=
'information'
>
<LINK
REL=
"up"
HREF=
"node31.html"
>
<LINK
REL=
"next"
HREF=
"node35.html"
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<td><A
HREF=
"node33.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node33.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"
node31
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"
zodb
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node35.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node35.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,75 +41,33 @@
...
@@ -40,75 +41,33 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node33.html"
>
4.
2 Undoing Change
s
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node33.html"
>
4.
4 Multithreaded ZODB Program
s
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
node31.html"
>
4 Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node35.html"
>
4.4 Multithreaded ZODB Programs
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node35.html"
>
5.1 ZODB.PersistentMapping
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION000530000000000000000"
>
<H1><A
NAME=
"SECTION000600000000000000000"
>
4.3 Versions
</A>
5 Related Modules
</A>
</H2>
</H1>
<P>
While many subtransactions can be contained within a single regular
transaction, it's also possible to contain many regular transactions
within a long-running transaction, called a version in ZODB
terminology. Inside a version, any number of transactions can be
created and committed or rolled back, but the changes within a version
are not made visible to other connections to the same ZODB.
<P>
Not all storages support versions, but you can test for versioning
ability by calling
<tt
class=
"method"
>
supportsVersions()
</tt>
method of the
<tt
class=
"class"
>
DB
</tt>
instance, which returns true if the underlying storage
supports versioning.
<P>
A version can be selected when creating the
<tt
class=
"class"
>
Connection
</tt>
instance using the
<tt
class=
"method"
>
DB.open(
<big>
[
</big><var>
version
</var><big>
]
</big>
)
</tt>
method.
The
<var>
version
</var>
argument must be a string that will be used as the
name of the version.
<P>
<P>
<dl><dd><pre
class=
"verbatim"
>
The ZODB package includes a number of related modules that provide
vers_conn = db.open(version='Working version')
useful data types such as BTrees.
</pre></dl>
<P>
<P>
Transactions can then be committed and aborted using this versioned
connection. Other connections that don't specify a version, or
provide a different version name, will not see changes committed
within the version named "
<tt
class=
"samp"
>
Working
version
</tt>
". To commit or abort a
version, which will either make the changes visible to all clients or
roll them back, call the
<tt
class=
"method"
>
DB.commitVersion()
</tt>
or
<tt
class=
"method"
>
DB.abortVersion()
</tt>
methods.
XXX what are the source and dest arguments for?
<P>
<p><hr>
The ZODB makes no attempt to reconcile changes between different
<!--Table of Child-Links-->
versions. Instead, the first version which modifies an object will
<A
NAME=
"CHILD_LINKS"
><STRONG>
Subsections
</STRONG></a>
gain a lock on that object. Attempting to modify the object from a
different version or from an unversioned connection will cause a
<tt
class=
"exception"
>
ZODB.POSException.VersionLockError
</tt>
to be raised:
<P>
<dl><dd><pre
class=
"verbatim"
>
from ZODB.POSException import VersionLockError
try:
get_transaction().commit()
except VersionLockError, (obj_id, version):
print ('Cannot commit; object %s '
'locked by version %s' % (obj_id, version))
</pre></dl>
<P>
The exception provides the ID of the locked object, and the name of
the version having a lock on it.
<P>
<UL>
<LI><A
href=
"node35.html"
>
5.1
<tt
class=
"module"
>
ZODB.PersistentMapping
</tt></a>
<LI><A
href=
"node36.html"
>
5.2
<tt
class=
"module"
>
ZODB.PersistentList
</tt></a>
<LI><A
href=
"node37.html"
>
5.3 BTrees Package
</a>
</ul>
<!--End of Table of Child-Links-->
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
<p><hr>
<p><hr>
...
@@ -117,7 +76,7 @@ the version having a lock on it.
...
@@ -117,7 +76,7 @@ the version having a lock on it.
<td><A
HREF=
"node33.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node33.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"
node31
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"
zodb
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node35.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node35.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -134,11 +93,11 @@ the version having a lock on it.
...
@@ -134,11 +93,11 @@ the version having a lock on it.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node33.html"
>
4.
2 Undoing Change
s
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node33.html"
>
4.
4 Multithreaded ZODB Program
s
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
node31.html"
>
4 Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node35.html"
>
4.4 Multithreaded ZODB Programs
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node35.html"
>
5.1 ZODB.PersistentMapping
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node35.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
4.4 Multithreaded ZODB Programs
</title>
<title>
5.1 ZODB.PersistentMapping
</title>
<META
NAME=
"description"
CONTENT=
"
4.4 Multithreaded ZODB Programs
"
>
<META
NAME=
"description"
CONTENT=
"
5.1 ZODB.PersistentMapping
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node36.html"
>
<LINK
REL=
"previous"
HREF=
"node34.html"
>
<LINK
REL=
"previous"
HREF=
"node34.html"
>
<LINK
REL=
"up"
HREF=
"node3
1
.html"
>
<LINK
REL=
"up"
HREF=
"node3
4
.html"
>
<LINK
REL=
"next"
HREF=
"node36.html"
>
<LINK
REL=
"next"
HREF=
"node36.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -22,7 +24,7 @@
...
@@ -22,7 +24,7 @@
<td><A
HREF=
"node34.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node34.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node3
1
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node3
4
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node36.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node36.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -39,26 +41,33 @@
...
@@ -39,26 +41,33 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node34.html"
>
4.3 Version
s
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node34.html"
>
5 Related Module
s
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node3
1.html"
>
4 Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node3
4.html"
>
5 Related Modules
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node36.html"
>
5
Related Modules
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node36.html"
>
5
.2 ZODB.PersistentList
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION000
54
0000000000000000"
>
<H2><A
NAME=
"SECTION000
61
0000000000000000"
>
4.4 Multithreaded ZODB Programs
</A>
5.1
<tt
class=
"module"
>
ZODB.PersistentMapping
</tt>
</A>
</H2>
</H2>
<P>
<P>
ZODB databases can be accessed from multithreaded Python programs.
The
<tt
class=
"class"
>
PersistentMapping
</tt>
class is a wrapper for mapping objects
The
<tt
class=
"class"
>
Storage
</tt>
and
<tt
class=
"class"
>
DB
</tt>
instances can be shared among
that will set the dirty bit when the mapping is modified by setting or
several threads, as long as individual
<tt
class=
"class"
>
Connection
</tt>
instances
deleting a key.
are created for each thread.
<P>
<dl><dt><b><a
name=
"l2h-1"
><tt
class=
"function"
>
PersistentMapping
</tt></a></b>
(
<var>
container = {}
</var>
)
<dd>
Create a
<tt
class=
"class"
>
PersistentMapping
</tt>
object that wraps the
mapping object
<var>
container
</var>
. If you don't specify a
value for
<var>
container
</var>
, a regular Python dictionary is used.
</dl>
<P>
<P>
XXX I can't think of anything else to say about multithreaded ZODB
<tt
class=
"class"
>
PersistentMapping
</tt>
objects support all the same methods as
programs. Suggestions? An example program?
Python dictionaries do.
<P>
<P>
...
@@ -69,7 +78,7 @@ programs. Suggestions? An example program?
...
@@ -69,7 +78,7 @@ programs. Suggestions? An example program?
<td><A
HREF=
"node34.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node34.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node3
1
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node3
4
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node36.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node36.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -86,11 +95,11 @@ programs. Suggestions? An example program?
...
@@ -86,11 +95,11 @@ programs. Suggestions? An example program?
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node34.html"
>
4.3 Version
s
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node34.html"
>
5 Related Module
s
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node3
1.html"
>
4 Transactions and Versioning
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node3
4.html"
>
5 Related Modules
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node36.html"
>
5
Related Modules
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node36.html"
>
5
.2 ZODB.PersistentList
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node36.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
5
Related Modules
</title>
<title>
5
.2 ZODB.PersistentList
</title>
<META
NAME=
"description"
CONTENT=
"5
Related Modules
"
>
<META
NAME=
"description"
CONTENT=
"5
.2 ZODB.PersistentList
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node40.html"
>
<LINK
REL=
"previous"
HREF=
"node31.html"
>
<LINK
REL=
"up"
HREF=
"zodb.html"
>
<LINK
REL=
"next"
HREF=
"node37.html"
>
<LINK
REL=
"next"
HREF=
"node37.html"
>
<LINK
REL=
"previous"
HREF=
"node35.html"
>
<LINK
REL=
"up"
HREF=
"node34.html"
>
<LINK
REL=
"next"
HREF=
"node37.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<td><A
HREF=
"node35.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node35.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"
zodb
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"
node34
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node37.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node37.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,33 +41,34 @@
...
@@ -40,33 +41,34 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node35.html"
>
4.4 Multithreaded ZODB Programs
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node35.html"
>
5.1 ZODB.PersistentMapping
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
node34.html"
>
5 Related Modules
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node37.html"
>
5.
1 ZODB.PersistentMapping
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node37.html"
>
5.
3 BTrees Package
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H
1><A
NAME=
"SECTION00060
0000000000000000"
>
<H
2><A
NAME=
"SECTION00062
0000000000000000"
>
5
Related Modules
</A>
5
.2
<tt
class=
"module"
>
ZODB.PersistentList
</tt>
</A>
</H
1
>
</H
2
>
<P>
<P>
The
ZODB package includes a number of related modules that provide
The
<tt
class=
"class"
>
PersistentList
</tt>
class is a wrapper for mutable sequence objects,
useful data types such as BTrees or full-text indexes.
much as
<tt
class=
"class"
>
PersistentMapping
</tt>
is a wrapper for mappings.
<P>
<P>
<dl><dt><b><a
name=
"l2h-2"
><tt
class=
"function"
>
PersistentList
</tt></a></b>
(
<var>
initlist = []
</var>
)
<dd>
Create a
<tt
class=
"class"
>
PersistentList
</tt>
object that wraps the
mutable sequence object
<var>
initlist
</var>
. If you don't specify a
value for
<var>
initlist
</var>
, a regular Python list is used.
</dl>
<
p><hr
>
<
P
>
<
!--Table of Child-Links-->
<
tt
class=
"class"
>
PersistentList
</tt>
objects support all the same methods as
<A
NAME=
"CHILD_LINKS"
><STRONG>
Subsections
</STRONG></a>
Python lists do.
<UL>
<P>
<LI><A
href=
"node37.html"
>
5.1
<tt
class=
"module"
>
ZODB.PersistentMapping
</tt></a>
<LI><A
href=
"node38.html"
>
5.2
<tt
class=
"module"
>
ZODB.PersistentList
</tt></a>
<LI><A
href=
"node39.html"
>
5.3 B-tree Modules
</a>
</ul>
<!--End of Table of Child-Links-->
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
<p><hr>
<p><hr>
...
@@ -75,7 +77,7 @@ useful data types such as BTrees or full-text indexes.
...
@@ -75,7 +77,7 @@ useful data types such as BTrees or full-text indexes.
<td><A
HREF=
"node35.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node35.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"
zodb
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"
node34
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node37.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node37.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -92,11 +94,11 @@ useful data types such as BTrees or full-text indexes.
...
@@ -92,11 +94,11 @@ useful data types such as BTrees or full-text indexes.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node35.html"
>
4.4 Multithreaded ZODB Programs
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node35.html"
>
5.1 ZODB.PersistentMapping
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
node34.html"
>
5 Related Modules
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node37.html"
>
5.
1 ZODB.PersistentMapping
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node37.html"
>
5.
3 BTrees Package
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node37.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
5.
1 ZODB.PersistentMapping
</title>
<title>
5.
3 BTrees Package
</title>
<META
NAME=
"description"
CONTENT=
"5.
1 ZODB.PersistentMapping
"
>
<META
NAME=
"description"
CONTENT=
"5.
3 BTrees Package
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node38.html"
>
<LINK
REL=
"previous"
HREF=
"node36.html"
>
<LINK
REL=
"previous"
HREF=
"node36.html"
>
<LINK
REL=
"up"
HREF=
"node3
6
.html"
>
<LINK
REL=
"up"
HREF=
"node3
4
.html"
>
<LINK
REL=
"next"
HREF=
"node38.html"
>
<LINK
REL=
"next"
HREF=
"node38.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<td><A
HREF=
"node36.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node36.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node3
6
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node3
4
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node38.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node38.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,33 +40,114 @@
...
@@ -40,33 +40,114 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node36.html"
>
5
Related Modules
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node36.html"
>
5
.2 ZODB.PersistentList
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node3
6
.html"
>
5 Related Modules
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node3
4
.html"
>
5 Related Modules
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node38.html"
>
5.2 ZODB.PersistentList
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node38.html"
>
A. Resources
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION0006
1
0000000000000000"
>
<H2><A
NAME=
"SECTION0006
3
0000000000000000"
>
5.
1
<tt
class=
"module"
>
ZODB.PersistentMapping
</tt>
</A>
5.
3 BTrees Package
</A>
</H2>
</H2>
<P>
<P>
The
<tt
class=
"class"
>
PersistentMapping
</tt>
class is a wrapper for mapping objects
When programming with the ZODB, Python dictionaries aren't always what
that will set the dirty bit when the mapping is modified by setting or
you need. The most important case is where you want to store a very
deleting a key.
large mapping. When a Python dictionary is accessed in a ZODB, the
whole dictionary has to be unpickled and brought into memory. If
you're storing something very large, such as a 100,000-entry user
database, unpickling such a large object will be slow. BTrees are a
balanced tree data structure that behave like a mapping but distribute
keys throughout a number of tree nodes. The nodes are stored in
sorted order. Nodes are then only unpickled and brought into memory
as they're accessed, so the entire tree doesn't have to occupy memory
(unless you really are touching every single key).
<P>
The BTrees package provides a large collection of related data
structures. There are variants of the data structures specialized to
handle integer values, which are faster and use less memory. There
are four modules that handle the different variants. The first two
letters of the module name specify the types of the keys and values in
mappings - O for any object and I for integer. The
<tt
class=
"module"
>
BTrees.IOBTree
</tt>
module provides a mapping that accepts integer
keys and arbitrary objects as values.
<P>
The four data structures provide by each module are a btree, a bucket,
a tree set, and a set. The btree and bucket types are mappings and
support all the usual mapping methods, e.g.
<tt
class=
"function"
>
update()
</tt>
and
<tt
class=
"function"
>
keys()
</tt>
. The tree set and set types are similar to mappings
but they have no values; they support the methods that make sense for
a mapping with no keys, e.g.
<tt
class=
"function"
>
keys()
</tt>
but not
<tt
class=
"function"
>
items()
</tt>
. The bucket and set types are the individual
building blocks for btrees and tree sets, respectively. A bucket or
set can be used when you are sure that it will have few elements. If
the data structure will grow large, you should use a btree or tree
set.
<P>
The four modules are named
<tt
class=
"module"
>
OOBTree
</tt>
,
<tt
class=
"module"
>
IOBTree
</tt>
,
<tt
class=
"module"
>
OIBTree
</tt>
, and
<tt
class=
"module"
>
IIBTree
</tt>
. The two letter prefixes are
repeated in the data types names. The
<tt
class=
"module"
>
BTrees.OOBTree
</tt>
module
defines the following types:
<tt
class=
"class"
>
OOBTree
</tt>
,
<tt
class=
"class"
>
OOBucket
</tt>
,
<tt
class=
"class"
>
OOSet
</tt>
, and
<tt
class=
"class"
>
OOTreeSet
</tt>
.
<P>
<P>
<dl><dt><b><a
name=
"l2h-1"
><tt
class=
"function"
>
PersistentMapping
</tt></a></b>
(
<var>
container = {}
</var>
)
The
<tt
class=
"function"
>
keys()
</tt>
,
<tt
class=
"function"
>
values()
</tt>
, and
<tt
class=
"function"
>
items()
</tt>
<dd>
methods do not materialize a list with all of the data. Instead, they
Create a
<tt
class=
"class"
>
PersistentMapping
</tt>
object that wraps the
return lazy sequences that fetch data from the BTree as needed. They
mapping object
<var>
container
</var>
. If you don't specify a
also support optional arguments to specify the minium and maximum
value for
<var>
container
</var>
, a regular Python dictionary is used.
values to return.
</dl>
<P>
<P>
<tt
class=
"class"
>
PersistentMapping
</tt>
objects support all the same methods as
A BTree object supports all the methods you would expect of a mapping
Python dictionaries do.
with a few extensions that exploit the fact that the keys are sorted.
The example below demonstrates how some of the methods work. The
extra methods re
<tt
class=
"function"
>
minKey()
</tt>
and
<tt
class=
"function"
>
maxKey()
</tt>
, which
find the minimum and maximum key value subject to an optional bound
argument, and
<tt
class=
"function"
>
byValue()
</tt>
, which returns value, key pairs
in reversed sorted order subject to an optional minimum bound argument.
<P>
<div
class=
"verbatim"
><pre>
>>>
from BTrees.OOBTree import OOBTree
>>>
t = OOBTree()
>>>
t.update({ 1: "red", 2: "green", 3: "blue", 4: "spades" })
>>>
len(t)
4
>>>
t[2]
'green'
>>>
t.keys()
<
OOBTreeItems object at 0x40269098
>
>>>
[k for k in t.keys()] # use a listcomp to get a printable sequence
[1, 2, 3, 4]
>>>
[k for k in t.values()]
['red', 'green', 'blue', 'spades']
>>>
[k for k in t.values(1, 2)]
['red', 'green']
>>>
[k for k in t.values(2)]
['green', 'blue', 'spades']
>>>
t.byValue("glue") # all values
>
"glue"
[('spades', 4), ('red', 1), ('green', 2)]
>>>
t.minKey(1.5)
2
</pre></div>
<P>
Each of the modules also defines some functions that operate on
BTrees -
<tt
class=
"function"
>
difference()
</tt>
,
<tt
class=
"function"
>
union()
</tt>
, and
<tt
class=
"function"
>
difference()
</tt>
. The
<tt
class=
"function"
>
difference()
</tt>
function returns
a bucket, while the other two methods return a set.
If the keys are integers, then the module also defines
<tt
class=
"function"
>
multiunion()
</tt>
. If the values are integers, then the module
also defines
<tt
class=
"function"
>
weightedIntersection()
</tt>
and
<tt
class=
"function"
>
weighterUnion()
</tt>
. The function doc strings describe each
function briefly.
<P>
<P>
<P>
...
@@ -77,7 +158,7 @@ Python dictionaries do.
...
@@ -77,7 +158,7 @@ Python dictionaries do.
<td><A
HREF=
"node36.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node36.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node3
6
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node3
4
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node38.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node38.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -94,11 +175,11 @@ Python dictionaries do.
...
@@ -94,11 +175,11 @@ Python dictionaries do.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node36.html"
>
5
Related Modules
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node36.html"
>
5
.2 ZODB.PersistentList
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node3
6
.html"
>
5 Related Modules
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node3
4
.html"
>
5 Related Modules
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node38.html"
>
5.2 ZODB.PersistentList
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node38.html"
>
A. Resources
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node38.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
5.2 ZODB.PersistentList
</title>
<title>
A. Resources
</title>
<META
NAME=
"description"
CONTENT=
"
5.2 ZODB.PersistentList
"
>
<META
NAME=
"description"
CONTENT=
"
A. Resources
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node39.html"
>
<LINK
REL=
"next"
HREF=
"node39.html"
>
<LINK
REL=
"previous"
HREF=
"node3
7
.html"
>
<LINK
REL=
"previous"
HREF=
"node3
4
.html"
>
<LINK
REL=
"up"
HREF=
"
node36
.html"
>
<LINK
REL=
"up"
HREF=
"
zodb
.html"
>
<LINK
REL=
"next"
HREF=
"node39.html"
>
<LINK
REL=
"next"
HREF=
"node39.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<td><A
HREF=
"node37.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node37.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"
node36
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"
zodb
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node39.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node39.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,32 +41,45 @@
...
@@ -40,32 +41,45 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node37.html"
>
5.
1 ZODB.PersistentMapping
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node37.html"
>
5.
3 BTrees Package
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
node36.html"
>
5 Related Modules
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node39.html"
>
5.3 B-tree Modules
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node39.html"
>
B. GNU Free Documentation
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H
2><A
NAME=
"SECTION00062
0000000000000000"
>
<H
1><A
NAME=
"SECTION00070
0000000000000000"
>
5.2
<tt
class=
"module"
>
ZODB.PersistentList
</tt>
</A>
A. Resources
</A>
</H
2
>
</H
1
>
<P>
<P>
The
<tt
class=
"class"
>
PersistentList
</tt>
class is a wrapper for mutable sequence objects,
ZODB HOWTO, by Michel Pelletier:
much as
<tt
class=
"class"
>
PersistentMapping
</tt>
is a wrapper for mappings.
<BR>
Goes into slightly more detail about the rules for writing applications using the ZODB.
<BR><a
class=
"url"
href=
"http://www.zope.org/Members/michel/HowTos/ZODB-How-To"
>
http://www.zope.org/Members/michel/HowTos/ZODB-How-To
</a>
<P>
Introduction to the Zope Object Database, by Jim Fulton:
<BR>
Goes into much greater detail, explaining advanced uses of the ZODB and
how it's actually implemented. A definitive reference, and highly recommended.
<BR><a
class=
"url"
href=
"http://www.python.org/workshops/2000-01/proceedings/papers/fulton/zodb3.html"
>
http://www.python.org/workshops/2000-01/proceedings/papers/fulton/zodb3.html
</a>
<P>
<P>
<dl><dt><b><a
name=
"l2h-2"
><tt
class=
"function"
>
PersistentList
</tt></a></b>
(
<var>
initlist = []
</var>
)
Persistent Programing with ZODB, by Jeremy Hylton and Barry Warsaw:
<dd>
Create a
<tt
class=
"class"
>
PersistentList
</tt>
object that wraps the
<BR>
mutable sequence object
<var>
initlist
</var>
. If you don't specify a
Slides for a tutorial presented at the 10th Python conference. Covers
value for
<var>
initlist
</var>
, a regular Python list is used.
much of the same ground as this guide, with more details in some areas
</dl>
and less in others.
<BR><a
class=
"url"
href=
"http://www.zope.org/Members/bwarsaw/ipc10-slides"
>
http://www.zope.org/Members/bwarsaw/ipc10-slides
</a>
<P>
Download link for ZEO:
<BR><a
class=
"url"
href=
"http://www.zope.org/Products/ZEO/"
>
http://www.zope.org/Products/ZEO/
</a>
<P>
<P>
<tt
class=
"class"
>
PersistentList
</tt>
objects support all the same methods as
Python lists do.
<P>
<P>
...
@@ -76,7 +90,7 @@ Python lists do.
...
@@ -76,7 +90,7 @@ Python lists do.
<td><A
HREF=
"node37.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node37.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"
node36
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"
zodb
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node39.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node39.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -93,11 +107,11 @@ Python lists do.
...
@@ -93,11 +107,11 @@ Python lists do.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node37.html"
>
5.
1 ZODB.PersistentMapping
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node37.html"
>
5.
3 BTrees Package
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
node36.html"
>
5 Related Modules
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node39.html"
>
5.3 B-tree Modules
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node39.html"
>
B. GNU Free Documentation
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node39.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
5.3 B-tree Modules
</title>
<title>
B. GNU Free Documentation License
</title>
<META
NAME=
"description"
CONTENT=
"
5.3 B-tree Modules
"
>
<META
NAME=
"description"
CONTENT=
"
B. GNU Free Documentation License
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
href=
"about.html"
>
<LINK
REL=
"previous"
HREF=
"node38.html"
>
<LINK
REL=
"previous"
HREF=
"node38.html"
>
<LINK
REL=
"up"
HREF=
"
node36
.html"
>
<LINK
REL=
"up"
HREF=
"
zodb
.html"
>
<LINK
REL=
"next"
HREF=
"node40.html"
>
<LINK
REL=
"next"
HREF=
"node40.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -22,7 +24,7 @@
...
@@ -22,7 +24,7 @@
<td><A
HREF=
"node38.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node38.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"
node36
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"
zodb
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node40.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node40.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -39,75 +41,52 @@
...
@@ -39,75 +41,52 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node38.html"
>
5.2 ZODB.PersistentList
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node38.html"
>
A. Resources
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
node36.html"
>
5 Related Modules
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node40.html"
>
A. Resources
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node40.html"
>
Preamble
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H
2><A
NAME=
"SECTION00063
0000000000000000"
>
<H
1><A
NAME=
"SECTION00080
0000000000000000"
>
5.3 B-tree Modules
</A>
B. GNU Free Documentation License
</A>
</H
2
>
</H
1
>
<P>
<P>
When programming with the ZODB, Python dictionaries aren't always what
Version 1.1, March 2000
you need. The most important case is where you want to store a very
<BR>
large mapping. When a Python dictionary is accessed in a ZODB, the
whole dictionary has to be unpickled and brought into memory. If
you're storing something very large, such as a 100,000-entry user
database, unpickling such a large object will be slow. B-trees are a
balanced tree data structure that behave like a mapping but distribute
keys throughout a number of tree nodes. Nodes are then only unpickled
and brought into memory as they're accessed, so the entire tree
doesn't have to occupy memory (unless you really are touching every
single key).
<P>
There are four different BTree modules provided. One of them, the
<tt
class=
"module"
>
BTree
</tt>
module, provides the most general data type; the keys
and values in the B-tree can be any Python object. Some specialized B-tree
modules require that the keys, and perhaps even the values, to be of a
certain type, and provide faster performance because of this limitation.
<P>
<DL
COMPACT
>
<DT>
<tt
class=
"module"
>
IOBTree
</tt>
</DT>
<DD>
requires the keys to be integers.
The module name reminds you of this; the
<tt
class=
"module"
>
IOBTree
</tt>
module
maps Integers to Objects.
<P>
</DD>
<DT>
<tt
class=
"module"
>
OIBTree
</tt>
</DT>
<DD>
requires the values to be integers,
mapping Objects to Integers.
<P>
<P>
</DD>
Copyright
<SPAN
CLASS=
"MATH"
><IMG
<DT>
<tt
class=
"module"
>
IIBTree
</tt>
</DT>
WIDTH=
"20"
HEIGHT=
"29"
ALIGN=
"MIDDLE"
BORDER=
"0"
<DD>
is strictest, requiring that both keys and values must be integers.
SRC=
"img1.gif"
ALT=
"$\copyright$"
></SPAN>
2000 Free Software Foundation, Inc.
<P>
<BR>
</DD>
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
</DL>
<BR>
Everyone is permitted to copy and distribute verbatim copies
<P>
of this license document, but changing it is not allowed.
To use a B-tree, simply import the desired module and call the
constructor, always named
<tt
class=
"function"
>
BTree()
</tt>
, to get a B-tree
instance, and then use it like any other mapping:
<P>
<dl><dd><pre
class=
"verbatim"
>
import IIBTree
iimap = IIBTree.BTree()
iimap[1972] = 27
</pre></dl>
<P>
<P>
<p><hr>
<!--Table of Child-Links-->
<A
NAME=
"CHILD_LINKS"
><STRONG>
Subsections
</STRONG></a>
<P>
<UL>
<LI><A
href=
"node40.html"
>
Preamble
</a>
<LI><A
href=
"node41.html"
>
B..1 Applicability and Definitions
</a>
<LI><A
href=
"node42.html"
>
B..2 Verbatim Copying
</a>
<LI><A
href=
"node43.html"
>
B..3 Copying in Quantity
</a>
<LI><A
href=
"node44.html"
>
B..4 Modifications
</a>
<LI><A
href=
"node45.html"
>
B..5 Combining Documents
</a>
<LI><A
href=
"node46.html"
>
B..6 Collections of Documents
</a>
<LI><A
href=
"node47.html"
>
B..7 Aggregation With Independent Works
</a>
<LI><A
href=
"node48.html"
>
B..8 Translation
</a>
<LI><A
href=
"node49.html"
>
B..9 Termination
</a>
<LI><A
href=
"node50.html"
>
B..10 Future Revisions of This Licence
</a>
<LI><A
href=
"node51.html"
>
ADDENDUM: How to use this License for your documents
</a>
</ul>
<!--End of Table of Child-Links-->
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
<p><hr>
<p><hr>
...
@@ -116,7 +95,7 @@ iimap[1972] = 27
...
@@ -116,7 +95,7 @@ iimap[1972] = 27
<td><A
HREF=
"node38.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node38.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"
node36
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"
zodb
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node40.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node40.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -133,11 +112,11 @@ iimap[1972] = 27
...
@@ -133,11 +112,11 @@ iimap[1972] = 27
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node38.html"
>
5.2 ZODB.PersistentList
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node38.html"
>
A. Resources
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
node36.html"
>
5 Related Modules
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node40.html"
>
A. Resources
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node40.html"
>
Preamble
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node4.html
View file @
243c4e27
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<LINK
REL=
"previous"
HREF=
"node3.html"
>
<LINK
REL=
"previous"
HREF=
"node3.html"
>
<LINK
REL=
"up"
HREF=
"node2.html"
>
<LINK
REL=
"up"
HREF=
"node2.html"
>
<LINK
REL=
"next"
HREF=
"node5.html"
>
<LINK
REL=
"next"
HREF=
"node5.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -87,7 +88,7 @@ depositing, and 2) how much should be deposited. You might deposit
...
@@ -87,7 +88,7 @@ depositing, and 2) how much should be deposited. You might deposit
Mapping these structures to a relational database is straightforward:
Mapping these structures to a relational database is straightforward:
<P>
<P>
<d
l><dd><pre
class=
"verbatim"
>
<d
iv
class=
"verbatim"
><pre
>
CREATE TABLE runs (
CREATE TABLE runs (
int run_id,
int run_id,
varchar owner,
varchar owner,
...
@@ -113,7 +114,7 @@ CREATE TABLE parameters (
...
@@ -113,7 +114,7 @@ CREATE TABLE parameters (
FOREIGN KEY(run_id, step_num)
FOREIGN KEY(run_id, step_num)
REFERENCES operations(run_id, step_num),
REFERENCES operations(run_id, step_num),
);
);
</pre></d
l
>
</pre></d
iv
>
<P>
<P>
In Python, you would write three classes named
<tt
class=
"class"
>
Run
</tt>
,
In Python, you would write three classes named
<tt
class=
"class"
>
Run
</tt>
,
...
@@ -208,7 +209,7 @@ runs, therefore, is still inefficient, but not grossly inefficient.
...
@@ -208,7 +209,7 @@ runs, therefore, is still inefficient, but not grossly inefficient.
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node2.html"
>
1 Introduction
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node2.html"
>
1 Introduction
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node5.html"
>
1.3 What is ZEO?
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node5.html"
>
1.3 What is ZEO?
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node40.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
A. Resources
</title>
<title>
Preamble
</title>
<META
NAME=
"description"
CONTENT=
"
A. Resources
"
>
<META
NAME=
"description"
CONTENT=
"
Preamble
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node41.html"
>
<LINK
REL=
"next"
HREF=
"node41.html"
>
<LINK
REL=
"previous"
HREF=
"node3
6
.html"
>
<LINK
REL=
"previous"
HREF=
"node3
9
.html"
>
<LINK
REL=
"up"
HREF=
"
zodb
.html"
>
<LINK
REL=
"up"
HREF=
"
node39
.html"
>
<LINK
REL=
"next"
HREF=
"node41.html"
>
<LINK
REL=
"next"
HREF=
"node41.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<td><A
HREF=
"node39.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node39.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"
zodb
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"
node39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node41.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node41.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,36 +41,40 @@
...
@@ -40,36 +41,40 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node39.html"
>
5.3 B-tree Modules
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node39.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
node39.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node41.html"
>
B.
GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node41.html"
>
B.
.1 Applicability and Definitions
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H
1><A
NAME=
"SECTION00070
0000000000000000"
>
<H
2><A
NAME=
"SECTION00081
0000000000000000"
>
A. Resources
</A>
Preamble
</A>
</H
1
>
</H
2
>
<P>
<P>
ZODB HOWTO, by Michel Pelletier:
The purpose of this License is to make a manual, textbook, or other
written document ``free'' in the sense of freedom: to assure everyone
the effective freedom to copy and redistribute it, with or without
modifying it, either commercially or noncommercially. Secondarily,
this License preserves for the author and publisher a way to get
credit for their work, while not being considered responsible for
modifications made by others.
<BR>
Goes into slightly more detail about the rules for writing applications using the ZODB.
<BR><a
class=
"url"
href=
"http://www.zope.org/Members/michel/HowTos/ZODB-How-To"
>
http://www.zope.org/Members/michel/HowTos/ZODB-How-To
</a>
<P>
<P>
Introduction to the Zope Object Database, by Jim Fulton:
This License is a kind of ``copyleft'', which means that derivative
works of the document must themselves be free in the same sense. It
<BR>
complements the GNU General Public License, which is a copyleft
Goes into much greater detail, explaining advanced uses of the ZODB and
license designed for free software.
how it's actually implemented. A definitive reference, and highly recommended.
<BR><a
class=
"url"
href=
"http://www.python.org/workshops/2000-01/proceedings/papers/fulton/zodb3.html"
>
http://www.python.org/workshops/2000-01/proceedings/papers/fulton/zodb3.html
</a>
<P>
Download link for ZEO:
<BR><a
class=
"url"
href=
"http://www.zope.org/Products/ZEO/"
>
http://www.zope.org/Products/ZEO/
</a>
<P>
<P>
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
<P>
<P>
...
@@ -80,7 +85,7 @@ Download link for ZEO:
...
@@ -80,7 +85,7 @@ Download link for ZEO:
<td><A
HREF=
"node39.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node39.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"
zodb
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"
node39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node41.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node41.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -97,11 +102,11 @@ Download link for ZEO:
...
@@ -97,11 +102,11 @@ Download link for ZEO:
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node39.html"
>
5.3 B-tree Modules
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node39.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
node39.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node41.html"
>
B.
GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node41.html"
>
B.
.1 Applicability and Definitions
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node41.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
B.
GNU Free Documentation License
</title>
<title>
B.
.1 Applicability and Definitions
</title>
<META
NAME=
"description"
CONTENT=
"B.
GNU Free Documentation License
"
>
<META
NAME=
"description"
CONTENT=
"B.
.1 Applicability and Definitions
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
href=
"about
.html"
>
<LINK
REL=
"next"
HREF=
"node42
.html"
>
<LINK
REL=
"previous"
HREF=
"node40.html"
>
<LINK
REL=
"previous"
HREF=
"node40.html"
>
<LINK
REL=
"up"
HREF=
"
zodb
.html"
>
<LINK
REL=
"up"
HREF=
"
node39
.html"
>
<LINK
REL=
"next"
HREF=
"node42.html"
>
<LINK
REL=
"next"
HREF=
"node42.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<td><A
HREF=
"node40.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node40.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"
zodb
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"
node39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node42.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node42.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,52 +41,84 @@
...
@@ -40,52 +41,84 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node40.html"
>
A. Resources
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node40.html"
>
Preamble
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
node39.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node42.html"
>
Preamble
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node42.html"
>
B..2 Verbatim Copying
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H
1><A
NAME=
"SECTION00080
0000000000000000"
>
<H
2><A
NAME=
"SECTION00082
0000000000000000"
>
B.
GNU Free Documentation License
</A>
B.
.1 Applicability and Definitions
</A>
</H
1
>
</H
2
>
<P>
<P>
Version 1.1, March 2000
This License applies to any manual or other work that contains a
<BR>
notice placed by the copyright holder saying it can be distributed
under the terms of this License. The ``Document'', below, refers to any
such manual or work. Any member of the public is a licensee, and is
addressed as ``you''.
<P>
<P>
Copyright
<SPAN
CLASS=
"MATH"
><IMG
A ``Modified Version'' of the Document means any work containing the
WIDTH=
"20"
HEIGHT=
"29"
ALIGN=
"MIDDLE"
BORDER=
"0"
Document or a portion of it, either copied verbatim, or with
SRC=
"img1.gif"
modifications and/or translated into another language.
ALT=
"$\copyright$"
></SPAN>
2000 Free Software Foundation, Inc.
<BR>
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
<BR>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
<P>
<P>
A ``Secondary Section'' is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall subject
(or to related matters) and contains nothing that could fall directly
within that overall subject. (For example, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any
mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
<p><hr>
<P>
<!--Table of Child-Links-->
The ``Invariant Sections'' are certain Secondary Sections whose titles
<A
NAME=
"CHILD_LINKS"
><STRONG>
Subsections
</STRONG></a>
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License.
<UL>
<P>
<LI><A
href=
"node42.html"
>
Preamble
</a>
The ``Cover Texts'' are certain short passages of text that are listed,
<LI><A
href=
"node43.html"
>
B..1 Applicability and Definitions
</a>
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
<LI><A
href=
"node44.html"
>
B..2 Verbatim Copying
</a>
the Document is released under this License.
<LI><A
href=
"node45.html"
>
B..3 Copying in Quantity
</a>
<LI><A
href=
"node46.html"
>
B..4 Modifications
</a>
<P>
<LI><A
href=
"node47.html"
>
B..5 Combining Documents
</a>
A ``Transparent'' copy of the Document means a machine-readable copy,
<LI><A
href=
"node48.html"
>
B..6 Collections of Documents
</a>
represented in a format whose specification is available to the
<LI><A
href=
"node49.html"
>
B..7 Aggregation With Independent Works
</a>
general public, whose contents can be viewed and edited directly and
<LI><A
href=
"node50.html"
>
B..8 Translation
</a>
straightforwardly with generic text editors or (for images composed of
<LI><A
href=
"node51.html"
>
B..9 Termination
</a>
pixels) generic paint programs or (for drawings) some widely available
<LI><A
href=
"node52.html"
>
B..10 Future Revisions of This Licence
</a>
drawing editor, and that is suitable for input to text formatters or
<LI><A
href=
"node53.html"
>
ADDENDUM: How to use this License for your documents
</a>
for automatic translation to a variety of formats suitable for input
</ul>
to text formatters. A copy made in an otherwise Transparent file
<!--End of Table of Child-Links-->
format whose markup has been designed to thwart or discourage
subsequent modification by readers is not Transparent. A copy that is
not ``Transparent'' is called ``Opaque''.
<P>
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format,
<SPAN
CLASS=
"logo,LaTeX"
>
L
<SUP><SMALL>
A
</SMALL></SUP>
T
<SMALL>
E
</SMALL>
X
</SPAN>
input format, SGML
or XML using a publicly available DTD, and standard-conforming simple
HTML designed for human modification. Opaque formats include
PostScript, PDF, proprietary formats that can be read and edited only
by proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the
machine-generated HTML produced by some word processors for output
purposes only.
<P>
The ``Title Page'' means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in
formats which do not have any title page as such, ``Title Page'' means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
<P>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
<p><hr>
<p><hr>
...
@@ -94,7 +127,7 @@ Everyone is permitted to copy and distribute verbatim copies
...
@@ -94,7 +127,7 @@ Everyone is permitted to copy and distribute verbatim copies
<td><A
HREF=
"node40.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node40.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"
zodb
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"
node39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node42.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node42.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -111,11 +144,11 @@ Everyone is permitted to copy and distribute verbatim copies
...
@@ -111,11 +144,11 @@ Everyone is permitted to copy and distribute verbatim copies
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node40.html"
>
A. Resources
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node40.html"
>
Preamble
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"
node39.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node42.html"
>
Preamble
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node42.html"
>
B..2 Verbatim Copying
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node42.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
Preamble
</title>
<title>
B..2 Verbatim Copying
</title>
<META
NAME=
"description"
CONTENT=
"
Preamble
"
>
<META
NAME=
"description"
CONTENT=
"
B..2 Verbatim Copying
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node43.html"
>
<LINK
REL=
"next"
HREF=
"node43.html"
>
<LINK
REL=
"previous"
HREF=
"node41.html"
>
<LINK
REL=
"previous"
HREF=
"node41.html"
>
<LINK
REL=
"up"
HREF=
"node
41
.html"
>
<LINK
REL=
"up"
HREF=
"node
39
.html"
>
<LINK
REL=
"next"
HREF=
"node43.html"
>
<LINK
REL=
"next"
HREF=
"node43.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<td><A
HREF=
"node41.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node41.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node43.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node43.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,40 +41,31 @@
...
@@ -40,40 +41,31 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node41.html"
>
B.
GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node41.html"
>
B.
.1 Applicability and Definitions
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node43.html"
>
B..
1 Applicability and Definitions
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node43.html"
>
B..
3 Copying in Quantity
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION0008
1
0000000000000000"
>
<H2><A
NAME=
"SECTION0008
3
0000000000000000"
>
Preamble
</A>
B..2 Verbatim Copying
</A>
</H2>
</H2>
<P>
<P>
The purpose of this License is to make a manual, textbook, or other
You may copy and distribute the Document in any medium, either
written document ``free'' in the sense of freedom: to assure everyone
commercially or noncommercially, provided that this License, the
the effective freedom to copy and redistribute it, with or without
copyright notices, and the license notice saying this License applies
modifying it, either commercially or noncommercially. Secondarily,
to the Document are reproduced in all copies, and that you add no other
this License preserves for the author and publisher a way to get
conditions whatsoever to those of this License. You may not use
credit for their work, while not being considered responsible for
technical measures to obstruct or control the reading or further
modifications made by others.
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.
<P>
<P>
This License is a kind of ``copyleft'', which means that derivative
You may also lend copies, under the same conditions stated above, and
works of the document must themselves be free in the same sense. It
you may publicly display copies.
complements the GNU General Public License, which is a copyleft
license designed for free software.
<P>
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
<P>
<P>
...
@@ -84,7 +76,7 @@ principally for works whose purpose is instruction or reference.
...
@@ -84,7 +76,7 @@ principally for works whose purpose is instruction or reference.
<td><A
HREF=
"node41.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node41.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node43.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node43.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -101,11 +93,11 @@ principally for works whose purpose is instruction or reference.
...
@@ -101,11 +93,11 @@ principally for works whose purpose is instruction or reference.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node41.html"
>
B.
GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node41.html"
>
B.
.1 Applicability and Definitions
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node43.html"
>
B..
1 Applicability and Definitions
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node43.html"
>
B..
3 Copying in Quantity
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node43.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
B..
1 Applicability and Definitions
</title>
<title>
B..
3 Copying in Quantity
</title>
<META
NAME=
"description"
CONTENT=
"B..
1 Applicability and Definitions
"
>
<META
NAME=
"description"
CONTENT=
"B..
3 Copying in Quantity
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node44.html"
>
<LINK
REL=
"next"
HREF=
"node44.html"
>
<LINK
REL=
"previous"
HREF=
"node42.html"
>
<LINK
REL=
"previous"
HREF=
"node42.html"
>
<LINK
REL=
"up"
HREF=
"node
41
.html"
>
<LINK
REL=
"up"
HREF=
"node
39
.html"
>
<LINK
REL=
"next"
HREF=
"node44.html"
>
<LINK
REL=
"next"
HREF=
"node44.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<td><A
HREF=
"node42.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node42.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node44.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node44.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,82 +41,55 @@
...
@@ -40,82 +41,55 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node42.html"
>
Preamble
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node42.html"
>
B..2 Verbatim Copying
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node44.html"
>
B..
2 Verbatim Copying
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node44.html"
>
B..
4 Modifications
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION0008
2
0000000000000000"
>
<H2><A
NAME=
"SECTION0008
4
0000000000000000"
>
B..
1 Applicability and Definitions
</A>
B..
3 Copying in Quantity
</A>
</H2>
</H2>
<P>
<P>
This License applies to any manual or other work that contains a
If you publish printed copies of the Document numbering more than 100,
notice placed by the copyright holder saying it can be distributed
and the Document's license notice requires Cover Texts, you must enclose
under the terms of this License. The ``Document'', below, refers to any
the copies in covers that carry, clearly and legibly, all these Cover
such manual or work. Any member of the public is a licensee, and is
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
addressed as ``you''.
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
the full title with all words of the title equally prominent and
visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.
<P>
<P>
A ``Modified Version'' of the Document means any work containing the
If the required texts for either cover are too voluminous to fit
Document or a portion of it, either copied verbatim, or with
legibly, you should put the first ones listed (as many as fit
modifications and/or translated into another language.
reasonably) on the actual cover, and continue the rest onto adjacent
pages.
<P>
<P>
A ``Secondary Section'' is a named appendix or a front-matter section of
If you publish or distribute Opaque copies of the Document numbering
the Document that deals exclusively with the relationship of the
more than 100, you must either include a machine-readable Transparent
publishers or authors of the Document to the Document's overall subject
copy along with each Opaque copy, or state in or with each Opaque copy
(or to related matters) and contains nothing that could fall directly
a publicly-accessible computer-network location containing a complete
within that overall subject. (For example, if the Document is in part a
Transparent copy of the Document, free of added material, which the
textbook of mathematics, a Secondary Section may not explain any
general network-using public has access to download anonymously at no
mathematics.) The relationship could be a matter of historical
charge using public-standard network protocols. If you use the latter
connection with the subject or with related matters, or of legal,
option, you must take reasonably prudent steps, when you begin
commercial, philosophical, ethical or political position regarding
distribution of Opaque copies in quantity, to ensure that this
them.
Transparent copy will remain thus accessible at the stated location
until at least one year after the last time you distribute an Opaque
copy (directly or through your agents or retailers) of that edition to
the public.
<P>
<P>
The ``Invariant Sections'' are certain Secondary Sections whose titles
It is requested, but not required, that you contact the authors of the
are designated, as being those of Invariant Sections, in the notice
Document well before redistributing any large number of copies, to give
that says that the Document is released under this License.
them a chance to provide you with an updated version of the Document.
<P>
The ``Cover Texts'' are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License.
<P>
A ``Transparent'' copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, whose contents can be viewed and edited directly and
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
format whose markup has been designed to thwart or discourage
subsequent modification by readers is not Transparent. A copy that is
not ``Transparent'' is called ``Opaque''.
<P>
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format,
<SPAN
CLASS=
"logo,LaTeX"
>
L
<SUP><SMALL>
A
</SMALL></SUP>
T
<SMALL>
E
</SMALL>
X
</SPAN>
input format, SGML
or XML using a publicly available DTD, and standard-conforming simple
HTML designed for human modification. Opaque formats include
PostScript, PDF, proprietary formats that can be read and edited only
by proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the
machine-generated HTML produced by some word processors for output
purposes only.
<P>
The ``Title Page'' means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in
formats which do not have any title page as such, ``Title Page'' means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
<P>
<P>
...
@@ -126,7 +100,7 @@ preceding the beginning of the body of the text.
...
@@ -126,7 +100,7 @@ preceding the beginning of the body of the text.
<td><A
HREF=
"node42.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node42.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node44.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node44.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -143,11 +117,11 @@ preceding the beginning of the body of the text.
...
@@ -143,11 +117,11 @@ preceding the beginning of the body of the text.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node42.html"
>
Preamble
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node42.html"
>
B..2 Verbatim Copying
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node44.html"
>
B..
2 Verbatim Copying
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node44.html"
>
B..
4 Modifications
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node44.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
B..
2 Verbatim Copying
</title>
<title>
B..
4 Modifications
</title>
<META
NAME=
"description"
CONTENT=
"B..
2 Verbatim Copying
"
>
<META
NAME=
"description"
CONTENT=
"B..
4 Modifications
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node45.html"
>
<LINK
REL=
"next"
HREF=
"node45.html"
>
<LINK
REL=
"previous"
HREF=
"node43.html"
>
<LINK
REL=
"previous"
HREF=
"node43.html"
>
<LINK
REL=
"up"
HREF=
"node
41
.html"
>
<LINK
REL=
"up"
HREF=
"node
39
.html"
>
<LINK
REL=
"next"
HREF=
"node45.html"
>
<LINK
REL=
"next"
HREF=
"node45.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<td><A
HREF=
"node43.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node43.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node45.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node45.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,31 +41,121 @@
...
@@ -40,31 +41,121 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node43.html"
>
B..
1 Applicability and Definitions
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node43.html"
>
B..
3 Copying in Quantity
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node45.html"
>
B..
3 Copying in Quantity
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node45.html"
>
B..
5 Combining Documents
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION0008
3
0000000000000000"
>
<H2><A
NAME=
"SECTION0008
5
0000000000000000"
>
B..
2 Verbatim Copying
</A>
B..
4 Modifications
</A>
</H2>
</H2>
<P>
<P>
You may copy and distribute the Document in any medium, either
You may copy and distribute a Modified Version of the Document under
commercially or noncommercially, provided that this License, the
the conditions of sections 2 and 3 above, provided that you release
copyright notices, and the license notice saying this License applies
the Modified Version under precisely this License, with the Modified
to the Document are reproduced in all copies, and that you add no other
Version filling the role of the Document, thus licensing distribution
conditions whatsoever to those of this License. You may not use
and modification of the Modified Version to whoever possesses a copy
technical measures to obstruct or control the reading or further
of it. In addition, you must do these things in the Modified Version:
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.
<P>
<P>
You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
<UL>
<LI>
Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous version
if the original publisher of that version gives permission.
</LI>
<LI>
List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has less than five).
</LI>
<LI>
State on the Title page the name of the publisher of the
Modified Version, as the publisher.
</LI>
<LI>
Preserve all the copyright notices of the Document.
</LI>
<LI>
Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.
</LI>
<LI>
Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the
terms of this License, in the form shown in the Addendum below.
</LI>
<LI>
Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.
</LI>
<LI>
Include an unaltered copy of this License.
</LI>
<LI>
Preserve the section entitled ``History'', and its title, and add to
it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
there is no section entitled ``History'' in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
</LI>
<LI>
Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
it was based on. These may be placed in the ``History'' section.
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.
</LI>
<LI>
In any section entitled ``Acknowledgements'' or ``Dedications'',
preserve the section's title, and preserve in the section all the
substance and tone of each of the contributor acknowledgements
and/or dedications given therein.
</LI>
<LI>
Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section titles.
</LI>
<LI>
Delete any section entitled ``Endorsements''. Such a section
may not be included in the Modified Version.
</LI>
<LI>
Do not retitle any existing section as ``Endorsements''
or to conflict in title with any Invariant Section.
<P>
</LI>
</UL>
<P>
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
<P>
You may add a section entitled ``Endorsements'', provided it contains
nothing but endorsements of your Modified Version by various
parties - for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
<P>
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.
<P>
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
<P>
<P>
...
@@ -75,7 +166,7 @@ you may publicly display copies.
...
@@ -75,7 +166,7 @@ you may publicly display copies.
<td><A
HREF=
"node43.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node43.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node45.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node45.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -92,11 +183,11 @@ you may publicly display copies.
...
@@ -92,11 +183,11 @@ you may publicly display copies.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node43.html"
>
B..
1 Applicability and Definitions
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node43.html"
>
B..
3 Copying in Quantity
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node45.html"
>
B..
3 Copying in Quantity
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node45.html"
>
B..
5 Combining Documents
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node45.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
B..
3 Copying in Quantity
</title>
<title>
B..
5 Combining Documents
</title>
<META
NAME=
"description"
CONTENT=
"B..
3 Copying in Quantity
"
>
<META
NAME=
"description"
CONTENT=
"B..
5 Combining Documents
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node46.html"
>
<LINK
REL=
"next"
HREF=
"node46.html"
>
<LINK
REL=
"previous"
HREF=
"node44.html"
>
<LINK
REL=
"previous"
HREF=
"node44.html"
>
<LINK
REL=
"up"
HREF=
"node
41
.html"
>
<LINK
REL=
"up"
HREF=
"node
39
.html"
>
<LINK
REL=
"next"
HREF=
"node46.html"
>
<LINK
REL=
"next"
HREF=
"node46.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<td><A
HREF=
"node44.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node44.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node46.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node46.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,55 +41,41 @@
...
@@ -40,55 +41,41 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node44.html"
>
B..
2 Verbatim Copying
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node44.html"
>
B..
4 Modifications
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node46.html"
>
B..
4 Modification
s
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node46.html"
>
B..
6 Collections of Document
s
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION0008
4
0000000000000000"
>
<H2><A
NAME=
"SECTION0008
6
0000000000000000"
>
B..
3 Copying in Quantity
</A>
B..
5 Combining Documents
</A>
</H2>
</H2>
<P>
<P>
If you publish printed copies of the Document numbering more than 100,
You may combine the Document with other documents released under this
and the Document's license notice requires Cover Texts, you must enclose
License, under the terms defined in section 4 above for modified
the copies in covers that carry, clearly and legibly, all these Cover
versions, provided that you include in the combination all of the
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
Invariant Sections of all of the original documents, unmodified, and
the back cover. Both covers must also clearly and legibly identify
list them all as Invariant Sections of your combined work in its
you as the publisher of these copies. The front cover must present
license notice.
the full title with all words of the title equally prominent and
visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.
<P>
<P>
If the required texts for either cover are too voluminous to fit
The combined work need only contain one copy of this License, and
legibly, you should put the first ones listed (as many as fit
multiple identical Invariant Sections may be replaced with a single
reasonably) on the actual cover, and continue the rest onto adjacent
copy. If there are multiple Invariant Sections with the same name but
pages.
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
<P>
<P>
If you publish or distribute Opaque copies of the Document numbering
In the combination, you must combine any sections entitled ``History''
more than 100, you must either include a machine-readable Transparent
in the various original documents, forming one section entitled
copy along with each Opaque copy, or state in or with each Opaque copy
``History''; likewise combine any sections entitled ``Acknowledgements'',
a publicly-accessible computer-network location containing a complete
and any sections entitled ``Dedications''. You must delete all sections
Transparent copy of the Document, free of added material, which the
entitled ``Endorsements.''
general network-using public has access to download anonymously at no
charge using public-standard network protocols. If you use the latter
option, you must take reasonably prudent steps, when you begin
distribution of Opaque copies in quantity, to ensure that this
Transparent copy will remain thus accessible at the stated location
until at least one year after the last time you distribute an Opaque
copy (directly or through your agents or retailers) of that edition to
the public.
<P>
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
<P>
<P>
...
@@ -99,7 +86,7 @@ them a chance to provide you with an updated version of the Document.
...
@@ -99,7 +86,7 @@ them a chance to provide you with an updated version of the Document.
<td><A
HREF=
"node44.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node44.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node46.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node46.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -116,11 +103,11 @@ them a chance to provide you with an updated version of the Document.
...
@@ -116,11 +103,11 @@ them a chance to provide you with an updated version of the Document.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node44.html"
>
B..
2 Verbatim Copying
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node44.html"
>
B..
4 Modifications
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node46.html"
>
B..
4 Modification
s
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node46.html"
>
B..
6 Collections of Document
s
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node46.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
B..
4 Modification
s
</title>
<title>
B..
6 Collections of Document
s
</title>
<META
NAME=
"description"
CONTENT=
"B..
4 Modification
s"
>
<META
NAME=
"description"
CONTENT=
"B..
6 Collections of Document
s"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node47.html"
>
<LINK
REL=
"next"
HREF=
"node47.html"
>
<LINK
REL=
"previous"
HREF=
"node45.html"
>
<LINK
REL=
"previous"
HREF=
"node45.html"
>
<LINK
REL=
"up"
HREF=
"node
41
.html"
>
<LINK
REL=
"up"
HREF=
"node
39
.html"
>
<LINK
REL=
"next"
HREF=
"node47.html"
>
<LINK
REL=
"next"
HREF=
"node47.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<td><A
HREF=
"node45.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node45.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node47.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node47.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,121 +41,29 @@
...
@@ -40,121 +41,29 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node45.html"
>
B..
3 Copying in Quantity
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node45.html"
>
B..
5 Combining Documents
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node47.html"
>
B..
5 Combining Documents
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node47.html"
>
B..
7 Aggregation With Independent
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION0008
5
0000000000000000"
>
<H2><A
NAME=
"SECTION0008
7
0000000000000000"
>
B..
4 Modification
s
</A>
B..
6 Collections of Document
s
</A>
</H2>
</H2>
<P>
<P>
You may copy and distribute a Modified Version of the Document under
You may make a collection consisting of the Document and other documents
the conditions of sections 2 and 3 above, provided that you release
released under this License, and replace the individual copies of this
the Modified Version under precisely this License, with the Modified
License in the various documents with a single copy that is included in
Version filling the role of the Document, thus licensing distribution
the collection, provided that you follow the rules of this License for
and modification of the Modified Version to whoever possesses a copy
verbatim copying of each of the documents in all other respects.
of it. In addition, you must do these things in the Modified Version:
<P>
<P>
You may extract a single document from such a collection, and distribute
<UL>
it individually under this License, provided you insert a copy of this
<LI>
Use in the Title Page (and on the covers, if any) a title distinct
License into the extracted document, and follow this License in all
from that of the Document, and from those of previous versions
other respects regarding verbatim copying of that document.
(which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous version
if the original publisher of that version gives permission.
</LI>
<LI>
List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has less than five).
</LI>
<LI>
State on the Title page the name of the publisher of the
Modified Version, as the publisher.
</LI>
<LI>
Preserve all the copyright notices of the Document.
</LI>
<LI>
Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.
</LI>
<LI>
Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the
terms of this License, in the form shown in the Addendum below.
</LI>
<LI>
Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.
</LI>
<LI>
Include an unaltered copy of this License.
</LI>
<LI>
Preserve the section entitled ``History'', and its title, and add to
it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
there is no section entitled ``History'' in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
</LI>
<LI>
Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
it was based on. These may be placed in the ``History'' section.
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.
</LI>
<LI>
In any section entitled ``Acknowledgements'' or ``Dedications'',
preserve the section's title, and preserve in the section all the
substance and tone of each of the contributor acknowledgements
and/or dedications given therein.
</LI>
<LI>
Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section titles.
</LI>
<LI>
Delete any section entitled ``Endorsements''. Such a section
may not be included in the Modified Version.
</LI>
<LI>
Do not retitle any existing section as ``Endorsements''
or to conflict in title with any Invariant Section.
<P>
</LI>
</UL>
<P>
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
<P>
You may add a section entitled ``Endorsements'', provided it contains
nothing but endorsements of your Modified Version by various
parties - for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
<P>
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.
<P>
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
<P>
<P>
...
@@ -165,7 +74,7 @@ imply endorsement of any Modified Version.
...
@@ -165,7 +74,7 @@ imply endorsement of any Modified Version.
<td><A
HREF=
"node45.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node45.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node47.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node47.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -182,11 +91,11 @@ imply endorsement of any Modified Version.
...
@@ -182,11 +91,11 @@ imply endorsement of any Modified Version.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node45.html"
>
B..
3 Copying in Quantity
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node45.html"
>
B..
5 Combining Documents
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node47.html"
>
B..
5 Combining Documents
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node47.html"
>
B..
7 Aggregation With Independent
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node47.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
B..
5 Combining Document
s
</title>
<title>
B..
7 Aggregation With Independent Work
s
</title>
<META
NAME=
"description"
CONTENT=
"B..
5 Combining Document
s"
>
<META
NAME=
"description"
CONTENT=
"B..
7 Aggregation With Independent Work
s"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node48.html"
>
<LINK
REL=
"next"
HREF=
"node48.html"
>
<LINK
REL=
"previous"
HREF=
"node46.html"
>
<LINK
REL=
"previous"
HREF=
"node46.html"
>
<LINK
REL=
"up"
HREF=
"node
41
.html"
>
<LINK
REL=
"up"
HREF=
"node
39
.html"
>
<LINK
REL=
"next"
HREF=
"node48.html"
>
<LINK
REL=
"next"
HREF=
"node48.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<td><A
HREF=
"node46.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node46.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node48.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node48.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,41 +41,33 @@
...
@@ -40,41 +41,33 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node46.html"
>
B..
4 Modification
s
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node46.html"
>
B..
6 Collections of Document
s
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node48.html"
>
B..
6 Collections of Documents
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node48.html"
>
B..
8 Translation
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION0008
6
0000000000000000"
>
<H2><A
NAME=
"SECTION0008
8
0000000000000000"
>
B..
5 Combining Document
s
</A>
B..
7 Aggregation With Independent Work
s
</A>
</H2>
</H2>
<P>
<P>
You may combine the Document with other documents released under this
A compilation of the Document or its derivatives with other separate
License, under the terms defined in section 4 above for modified
and independent documents or works, in or on a volume of a storage or
versions, provided that you include in the combination all of the
distribution medium, does not as a whole count as a Modified Version
Invariant Sections of all of the original documents, unmodified, and
of the Document, provided no compilation copyright is claimed for the
list them all as Invariant Sections of your combined work in its
compilation. Such a compilation is called an ``aggregate'', and this
license notice.
License does not apply to the other self-contained works thus compiled
with the Document, on account of their being thus compiled, if they
are not themselves derivative works of the Document.
<P>
<P>
The combined work need only contain one copy of this License, and
If the Cover Text requirement of section 3 is applicable to these
multiple identical Invariant Sections may be replaced with a single
copies of the Document, then if the Document is less than one quarter
copy. If there are multiple Invariant Sections with the same name but
of the entire aggregate, the Document's Cover Texts may be placed on
different contents, make the title of each such section unique by
covers that surround only the Document within the aggregate.
adding at the end of it, in parentheses, the name of the original
Otherwise they must appear on covers around the whole aggregate.
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
<P>
In the combination, you must combine any sections entitled ``History''
in the various original documents, forming one section entitled
``History''; likewise combine any sections entitled ``Acknowledgements'',
and any sections entitled ``Dedications''. You must delete all sections
entitled ``Endorsements.''
<P>
<P>
...
@@ -85,7 +78,7 @@ entitled ``Endorsements.''
...
@@ -85,7 +78,7 @@ entitled ``Endorsements.''
<td><A
HREF=
"node46.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node46.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node48.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node48.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -102,11 +95,11 @@ entitled ``Endorsements.''
...
@@ -102,11 +95,11 @@ entitled ``Endorsements.''
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node46.html"
>
B..
4 Modification
s
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node46.html"
>
B..
6 Collections of Document
s
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node48.html"
>
B..
6 Collections of Documents
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node48.html"
>
B..
8 Translation
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node48.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
B..
6 Collections of Documents
</title>
<title>
B..
8 Translation
</title>
<META
NAME=
"description"
CONTENT=
"B..
6 Collections of Documents
"
>
<META
NAME=
"description"
CONTENT=
"B..
8 Translation
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node49.html"
>
<LINK
REL=
"next"
HREF=
"node49.html"
>
<LINK
REL=
"previous"
HREF=
"node47.html"
>
<LINK
REL=
"previous"
HREF=
"node47.html"
>
<LINK
REL=
"up"
HREF=
"node
41
.html"
>
<LINK
REL=
"up"
HREF=
"node
39
.html"
>
<LINK
REL=
"next"
HREF=
"node49.html"
>
<LINK
REL=
"next"
HREF=
"node49.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<td><A
HREF=
"node47.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node47.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node49.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node49.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,29 +41,28 @@
...
@@ -40,29 +41,28 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node47.html"
>
B..
5 Combining Documents
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node47.html"
>
B..
7 Aggregation With Independent
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node49.html"
>
B..
7 Aggregation With Independent
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node49.html"
>
B..
9 Termination
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION0008
7
0000000000000000"
>
<H2><A
NAME=
"SECTION0008
9
0000000000000000"
>
B..
6 Collections of Documents
</A>
B..
8 Translation
</A>
</H2>
</H2>
<P>
<P>
You may make a collection consisting of the Document and other documents
Translation is considered a kind of modification, so you may
released under this License, and replace the individual copies of this
distribute translations of the Document under the terms of section 4.
License in the various documents with a single copy that is included in
Replacing Invariant Sections with translations requires special
the collection, provided that you follow the rules of this License for
permission from their copyright holders, but you may include
verbatim copying of each of the documents in all other respects.
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
<P>
translation of this License provided that you also include the
You may extract a single document from such a collection, and distribute
original English version of this License. In case of a disagreement
it individually under this License, provided you insert a copy of this
between the translation and the original English version of this
License into the extracted document, and follow this License in all
License, the original English version will prevail.
other respects regarding verbatim copying of that document.
<P>
<P>
...
@@ -73,7 +73,7 @@ other respects regarding verbatim copying of that document.
...
@@ -73,7 +73,7 @@ other respects regarding verbatim copying of that document.
<td><A
HREF=
"node47.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node47.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node49.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node49.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -90,11 +90,11 @@ other respects regarding verbatim copying of that document.
...
@@ -90,11 +90,11 @@ other respects regarding verbatim copying of that document.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node47.html"
>
B..
5 Combining Documents
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node47.html"
>
B..
7 Aggregation With Independent
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node49.html"
>
B..
7 Aggregation With Independent
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node49.html"
>
B..
9 Termination
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node49.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
B..
7 Aggregation With Independent Works
</title>
<title>
B..
9 Termination
</title>
<META
NAME=
"description"
CONTENT=
"B..
7 Aggregation With Independent Works
"
>
<META
NAME=
"description"
CONTENT=
"B..
9 Termination
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node50.html"
>
<LINK
REL=
"next"
HREF=
"node50.html"
>
<LINK
REL=
"previous"
HREF=
"node48.html"
>
<LINK
REL=
"previous"
HREF=
"node48.html"
>
<LINK
REL=
"up"
HREF=
"node
41
.html"
>
<LINK
REL=
"up"
HREF=
"node
39
.html"
>
<LINK
REL=
"next"
HREF=
"node50.html"
>
<LINK
REL=
"next"
HREF=
"node50.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<td><A
HREF=
"node48.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node48.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node50.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node50.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,33 +41,25 @@
...
@@ -40,33 +41,25 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node48.html"
>
B..
6 Collections of Documents
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node48.html"
>
B..
8 Translation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node50.html"
>
B..
8 Translation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node50.html"
>
B..
10 Future Revisions of
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION0008
8
0000000000000000"
>
<H2><A
NAME=
"SECTION0008
10
0000000000000000"
>
B..
7 Aggregation With Independent Works
</A>
B..
9 Termination
</A>
</H2>
</H2>
<P>
<P>
A compilation of the Document or its derivatives with other separate
You may not copy, modify, sublicense, or distribute the Document except
and independent documents or works, in or on a volume of a storage or
as expressly provided for under this License. Any other attempt to
distribution medium, does not as a whole count as a Modified Version
copy, modify, sublicense or distribute the Document is void, and will
of the Document, provided no compilation copyright is claimed for the
automatically terminate your rights under this License. However,
compilation. Such a compilation is called an ``aggregate'', and this
parties who have received copies, or rights, from you under this
License does not apply to the other self-contained works thus compiled
License will not have their licenses terminated so long as such
with the Document, on account of their being thus compiled, if they
parties remain in full compliance.
are not themselves derivative works of the Document.
<P>
If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one quarter
of the entire aggregate, the Document's Cover Texts may be placed on
covers that surround only the Document within the aggregate.
Otherwise they must appear on covers around the whole aggregate.
<P>
<P>
...
@@ -77,7 +70,7 @@ Otherwise they must appear on covers around the whole aggregate.
...
@@ -77,7 +70,7 @@ Otherwise they must appear on covers around the whole aggregate.
<td><A
HREF=
"node48.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node48.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node50.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node50.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -94,11 +87,11 @@ Otherwise they must appear on covers around the whole aggregate.
...
@@ -94,11 +87,11 @@ Otherwise they must appear on covers around the whole aggregate.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node48.html"
>
B..
6 Collections of Documents
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node48.html"
>
B..
8 Translation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node50.html"
>
B..
8 Translation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node50.html"
>
B..
10 Future Revisions of
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node5.html
View file @
243c4e27
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<LINK
REL=
"previous"
HREF=
"node4.html"
>
<LINK
REL=
"previous"
HREF=
"node4.html"
>
<LINK
REL=
"up"
HREF=
"node2.html"
>
<LINK
REL=
"up"
HREF=
"node2.html"
>
<LINK
REL=
"next"
HREF=
"node6.html"
>
<LINK
REL=
"next"
HREF=
"node6.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -95,7 +96,7 @@ we'll see later on in this document, it opens up many possibilities.
...
@@ -95,7 +96,7 @@ we'll see later on in this document, it opens up many possibilities.
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node2.html"
>
1 Introduction
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node2.html"
>
1 Introduction
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node6.html"
>
1.4 About this guide
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node6.html"
>
1.4 About this guide
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node50.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
B..
8 Translation
</title>
<title>
B..
10 Future Revisions of This Licence
</title>
<META
NAME=
"description"
CONTENT=
"B..
8 Translation
"
>
<META
NAME=
"description"
CONTENT=
"B..
10 Future Revisions of This Licence
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node51.html"
>
<LINK
REL=
"next"
HREF=
"node51.html"
>
<LINK
REL=
"previous"
HREF=
"node49.html"
>
<LINK
REL=
"previous"
HREF=
"node49.html"
>
<LINK
REL=
"up"
HREF=
"node
41
.html"
>
<LINK
REL=
"up"
HREF=
"node
39
.html"
>
<LINK
REL=
"next"
HREF=
"node51.html"
>
<LINK
REL=
"next"
HREF=
"node51.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<td><A
HREF=
"node49.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node49.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node51.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node51.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -40,28 +41,33 @@
...
@@ -40,28 +41,33 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node49.html"
>
B..
7 Aggregation With Independent
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node49.html"
>
B..
9 Termination
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node51.html"
>
B..9 Termination
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node51.html"
>
ADDENDUM: How to use
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION0008
9
0000000000000000"
>
<H2><A
NAME=
"SECTION0008
11
0000000000000000"
>
B..
8 Translation
</A>
B..
10 Future Revisions of This Licence
</A>
</H2>
</H2>
<P>
<P>
Translation is considered a kind of modification, so you may
The Free Software Foundation may publish new, revised versions
distribute translations of the Document under the terms of section 4.
of the GNU Free Documentation License from time to time. Such new
Replacing Invariant Sections with translations requires special
versions will be similar in spirit to the present version, but may
permission from their copyright holders, but you may include
differ in detail to address new problems or concerns. See
translations of some or all Invariant Sections in addition to the
<a
class=
"url"
href=
"http://www.gnu.org/copyleft/"
>
http://www.gnu.org/copyleft/
</a>
.
original versions of these Invariant Sections. You may include a
translation of this License provided that you also include the
<P>
original English version of this License. In case of a disagreement
Each version of the License is given a distinguishing version number.
between the translation and the original English version of this
If the Document specifies that a particular numbered version of this
License, the original English version will prevail.
License "or any later version" applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.
<P>
<P>
...
@@ -72,7 +78,7 @@ License, the original English version will prevail.
...
@@ -72,7 +78,7 @@ License, the original English version will prevail.
<td><A
HREF=
"node49.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node49.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node51.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node51.html"
><img
src=
"/python/writing/icons/next.gif"
...
@@ -89,11 +95,11 @@ License, the original English version will prevail.
...
@@ -89,11 +95,11 @@ License, the original English version will prevail.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node49.html"
>
B..
7 Aggregation With Independent
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node49.html"
>
B..
9 Termination
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node51.html"
>
B..9 Termination
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node51.html"
>
ADDENDUM: How to use
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node51.html
View file @
243c4e27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<html>
<head>
<head>
<title>
B..9 Termination
</title>
<title>
ADDENDUM: How to use this License for your documents
</title>
<META
NAME=
"description"
CONTENT=
"
B..9 Termination
"
>
<META
NAME=
"description"
CONTENT=
"
ADDENDUM: How to use this License for your documents
"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node52.html"
>
<LINK
REL=
"previous"
HREF=
"node50.html"
>
<LINK
REL=
"previous"
HREF=
"node50.html"
>
<LINK
REL=
"up"
HREF=
"node41.html"
>
<LINK
REL=
"up"
HREF=
"node39.html"
>
<LINK
REL=
"next"
HREF=
"node52.html"
>
<LINK
REL=
"next"
href=
"about.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -23,10 +23,10 @@
...
@@ -23,10 +23,10 @@
<td><A
HREF=
"node50.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node50.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node52
.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
href=
"about
.html"
><img
src=
"/python/writing/icons/next.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Next Page"
width=
"32"
></A></td>
alt=
"Next Page"
width=
"32"
></A></td>
<td
align=
"center"
width=
"100%"
>
ZODB/ZEO Programming Guide
</td>
<td
align=
"center"
width=
"100%"
>
ZODB/ZEO Programming Guide
</td>
...
@@ -40,25 +40,49 @@
...
@@ -40,25 +40,49 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node50.html"
>
B..
8 Translation
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node50.html"
>
B..
10 Future Revisions of
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node52.html"
>
B..10 Future Revisions of
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
href=
"about.html"
>
About this document ...
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
<H2><A
NAME=
"SECTION00081
0
0000000000000000"
>
<H2><A
NAME=
"SECTION00081
2
0000000000000000"
>
B..9 Termination
</A>
ADDENDUM: How to use this License for your documents
</A>
</H2>
</H2>
<P>
<P>
You may not copy, modify, sublicense, or distribute the Document except
To use this License in a document you have written, include a copy of
as expressly provided for under this License. Any other attempt to
the License in the document and put the following copyright and
copy, modify, sublicense or distribute the Document is void, and will
license notices just after the title page:
automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
<P>
License will not have their licenses terminated so long as such
<P>
parties remain in full compliance.
<BLOCKQUOTE>
Copyright
<SPAN
CLASS=
"MATH"
><IMG
WIDTH=
"20"
HEIGHT=
"29"
ALIGN=
"MIDDLE"
BORDER=
"0"
SRC=
"img1.gif"
ALT=
"$\copyright$"
></SPAN>
YEAR YOUR NAME.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with the Invariant Sections being LIST THEIR TITLES, with the
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
A copy of the license is included in the section entitled ``GNU
Free Documentation License''.
</BLOCKQUOTE>
<P>
<P>
If you have no Invariant Sections, write ``with no Invariant Sections''
instead of saying which ones are invariant. If you have no
Front-Cover Texts, write ``no Front-Cover Texts'' instead of
``Front-Cover Texts being LIST''; likewise for Back-Cover Texts.
<P>
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.
<P>
<P>
...
@@ -69,10 +93,10 @@ parties remain in full compliance.
...
@@ -69,10 +93,10 @@ parties remain in full compliance.
<td><A
HREF=
"node50.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node50.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"node
41
.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"node
39
.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node52
.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
href=
"about
.html"
><img
src=
"/python/writing/icons/next.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Next Page"
width=
"32"
></A></td>
alt=
"Next Page"
width=
"32"
></A></td>
<td
align=
"center"
width=
"100%"
>
ZODB/ZEO Programming Guide
</td>
<td
align=
"center"
width=
"100%"
>
ZODB/ZEO Programming Guide
</td>
...
@@ -86,11 +110,11 @@ parties remain in full compliance.
...
@@ -86,11 +110,11 @@ parties remain in full compliance.
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node50.html"
>
B..
8 Translation
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node50.html"
>
B..
10 Future Revisions of
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
41
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node
39
.html"
>
B. GNU Free Documentation
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node52.html"
>
B..10 Future Revisions of
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
href=
"about.html"
>
About this document ...
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node6.html
View file @
243c4e27
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<LINK
REL=
"previous"
HREF=
"node5.html"
>
<LINK
REL=
"previous"
HREF=
"node5.html"
>
<LINK
REL=
"up"
HREF=
"node2.html"
>
<LINK
REL=
"up"
HREF=
"node2.html"
>
<LINK
REL=
"next"
HREF=
"node7.html"
>
<LINK
REL=
"next"
HREF=
"node7.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -97,7 +98,7 @@ suggest clarifications or additional topics, please send your comments to
...
@@ -97,7 +98,7 @@ suggest clarifications or additional topics, please send your comments to
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node2.html"
>
1 Introduction
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node2.html"
>
1 Introduction
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node7.html"
>
1.5 Acknowledgements
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node7.html"
>
1.5 Acknowledgements
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node7.html
View file @
243c4e27
...
@@ -6,14 +6,15 @@
...
@@ -6,14 +6,15 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"previous"
HREF=
"node6.html"
>
<LINK
REL=
"previous"
HREF=
"node6.html"
>
<LINK
REL=
"up"
HREF=
"node2.html"
>
<LINK
REL=
"up"
HREF=
"node2.html"
>
<LINK
REL=
"next"
HREF=
"node8.html"
>
<LINK
REL=
"next"
HREF=
"node8.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -86,7 +87,7 @@ Chris McDonough, George Runyan.
...
@@ -86,7 +87,7 @@ Chris McDonough, George Runyan.
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node2.html"
>
1 Introduction
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node2.html"
>
1 Introduction
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node8.html"
>
2 ZODB Programming
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node8.html"
>
2 ZODB Programming
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node8.html
View file @
243c4e27
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<LINK
REL=
"previous"
HREF=
"node2.html"
>
<LINK
REL=
"previous"
HREF=
"node2.html"
>
<LINK
REL=
"up"
HREF=
"zodb.html"
>
<LINK
REL=
"up"
HREF=
"zodb.html"
>
<LINK
REL=
"next"
HREF=
"node9.html"
>
<LINK
REL=
"next"
HREF=
"node9.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -70,12 +71,11 @@
...
@@ -70,12 +71,11 @@
<UL>
<UL>
<LI><A
href=
"node16.html"
>
2.5.1 Modifying Mutable Objects
</a>
<LI><A
href=
"node16.html"
>
2.5.1 Modifying Mutable Objects
</a>
<LI><A
href=
"node17.html"
>
2.5.2 Some Special Methods Don't Work
</a>
<LI><A
href=
"node17.html"
>
2.5.2 Some Special Methods Don't Work
</a>
<LI><A
href=
"node18.html"
>
2.5.3 Fixing
<tt
class=
"function"
>
isinstance
</tt>
and
<tt
class=
"function"
>
issubclass
</tt></a>
<LI><A
href=
"node18.html"
>
2.5.3
<tt
class=
"method"
>
__getattr__
</tt>
,
<tt
class=
"method"
>
__delattr__
</tt>
, and
<tt
class=
"method"
>
__setattr__
</tt></a>
<LI><A
href=
"node19.html"
>
2.5.4
<tt
class=
"method"
>
__getattr__
</tt>
,
<tt
class=
"method"
>
__delattr__
</tt>
, and
<tt
class=
"method"
>
__setattr__
</tt></a>
</ul>
</ul>
<LI><A
href=
"node
20
.html"
>
2.6 Writing Persistent Classes
</a>
<LI><A
href=
"node
19
.html"
>
2.6 Writing Persistent Classes
</a>
<UL>
<UL>
<LI><A
href=
"node2
1
.html"
>
2.6.1 Changing Instance Attributes
</a>
<LI><A
href=
"node2
0
.html"
>
2.6.1 Changing Instance Attributes
</a>
</ul></ul>
</ul></ul>
<!--End of Table of Child-Links-->
<!--End of Table of Child-Links-->
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node9.html"
>
2.1 Installing ZODB
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node9.html"
>
2.1 Installing ZODB
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/node9.html
View file @
243c4e27
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<LINK
REL=
"previous"
HREF=
"node8.html"
>
<LINK
REL=
"previous"
HREF=
"node8.html"
>
<LINK
REL=
"up"
HREF=
"node8.html"
>
<LINK
REL=
"up"
HREF=
"node8.html"
>
<LINK
REL=
"next"
HREF=
"node10.html"
>
<LINK
REL=
"next"
HREF=
"node10.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -105,7 +106,7 @@ difficulties you encounter.
...
@@ -105,7 +106,7 @@ difficulties you encounter.
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node8.html"
>
2 ZODB Programming
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"node8.html"
>
2 ZODB Programming
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node10.html"
>
2.1.1 Requirements
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node10.html"
>
2.1.1 Requirements
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/zeo.html
View file @
243c4e27
...
@@ -6,27 +6,28 @@
...
@@ -6,27 +6,28 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
HREF=
"node
31
.html"
>
<LINK
REL=
"next"
HREF=
"node
29
.html"
>
<LINK
REL=
"previous"
HREF=
"node8.html"
>
<LINK
REL=
"previous"
HREF=
"node8.html"
>
<LINK
REL=
"up"
HREF=
"zodb.html"
>
<LINK
REL=
"up"
HREF=
"zodb.html"
>
<LINK
REL=
"next"
HREF=
"node23.html"
>
<LINK
REL=
"next"
HREF=
"node22.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
<tr>
<tr>
<td><A
HREF=
"node2
1
.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node2
0
.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"zodb.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"zodb.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node2
3
.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node2
2
.html"
><img
src=
"/python/writing/icons/next.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Next Page"
width=
"32"
></A></td>
alt=
"Next Page"
width=
"32"
></A></td>
<td
align=
"center"
width=
"100%"
>
ZODB/ZEO Programming Guide
</td>
<td
align=
"center"
width=
"100%"
>
ZODB/ZEO Programming Guide
</td>
...
@@ -40,9 +41,9 @@
...
@@ -40,9 +41,9 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node2
1
.html"
>
2.6.1 Changing Instance Attributes
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node2
0
.html"
>
2.6.1 Changing Instance Attributes
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node2
3
.html"
>
3.1 How ZEO Works
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node2
2
.html"
>
3.1 How ZEO Works
</A>
<br><hr>
<br><hr>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
@@ -59,16 +60,15 @@
...
@@ -59,16 +60,15 @@
<A
NAME=
"CHILD_LINKS"
><STRONG>
Subsections
</STRONG></a>
<A
NAME=
"CHILD_LINKS"
><STRONG>
Subsections
</STRONG></a>
<UL>
<UL>
<LI><A
href=
"node2
3
.html"
>
3.1 How ZEO Works
</a>
<LI><A
href=
"node2
2
.html"
>
3.1 How ZEO Works
</a>
<LI><A
href=
"node2
4
.html"
>
3.2 Installing ZEO
</a>
<LI><A
href=
"node2
3
.html"
>
3.2 Installing ZEO
</a>
<UL>
<UL>
<LI><A
href=
"node2
5
.html"
>
3.2.1 Requirements
</a>
<LI><A
href=
"node2
4
.html"
>
3.2.1 Requirements
</a>
<LI><A
href=
"node2
6.html"
>
3.2.2 Installation
</a>
<LI><A
href=
"node2
5.html"
>
3.2.2 Running a server
</a>
</ul>
</ul>
<LI><A
href=
"node27.html"
>
3.3 Configuring and Running a ZEO Server
</a>
<LI><A
href=
"node26.html"
>
3.3 Testing the ZEO Installation
</a>
<LI><A
href=
"node28.html"
>
3.4 Testing the ZEO Installation
</a>
<LI><A
href=
"node27.html"
>
3.4 ZEO Programming Notes
</a>
<LI><A
href=
"node29.html"
>
3.5 ZEO Programming Notes
</a>
<LI><A
href=
"node28.html"
>
3.5 Sample Application: chatter.py
</a>
<LI><A
href=
"node30.html"
>
3.6 Sample Application: chatter.py
</a>
</ul>
</ul>
<!--End of Table of Child-Links-->
<!--End of Table of Child-Links-->
...
@@ -76,13 +76,13 @@
...
@@ -76,13 +76,13 @@
<p><hr>
<p><hr>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
<table
align=
"center"
width=
"100%"
cellpadding=
"0"
cellspacing=
"2"
>
<tr>
<tr>
<td><A
HREF=
"node2
1
.html"
><img
src=
"/python/writing/icons/previous.gif"
<td><A
HREF=
"node2
0
.html"
><img
src=
"/python/writing/icons/previous.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Previous Page"
width=
"32"
></A></td>
alt=
"Previous Page"
width=
"32"
></A></td>
<td><A
HREF=
"zodb.html"
><img
src=
"/python/writing/icons/up.gif"
<td><A
HREF=
"zodb.html"
><img
src=
"/python/writing/icons/up.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Up One Level"
width=
"32"
></A></td>
alt=
"Up One Level"
width=
"32"
></A></td>
<td><A
HREF=
"node2
3
.html"
><img
src=
"/python/writing/icons/next.gif"
<td><A
HREF=
"node2
2
.html"
><img
src=
"/python/writing/icons/next.gif"
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
"Next Page"
width=
"32"
></A></td>
alt=
"Next Page"
width=
"32"
></A></td>
<td
align=
"center"
width=
"100%"
>
ZODB/ZEO Programming Guide
</td>
<td
align=
"center"
width=
"100%"
>
ZODB/ZEO Programming Guide
</td>
...
@@ -96,11 +96,11 @@
...
@@ -96,11 +96,11 @@
border=
"0"
height=
"32"
border=
"0"
height=
"32"
alt=
""
width=
"32"
></td>
alt=
""
width=
"32"
></td>
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node2
1
.html"
>
2.6.1 Changing Instance Attributes
</A>
<b
class=
"navlabel"
>
Previous:
</b>
<a
class=
"sectref"
HREF=
"node2
0
.html"
>
2.6.1 Changing Instance Attributes
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Up:
</b>
<a
class=
"sectref"
HREF=
"zodb.html"
>
ZODB/ZEO Programming Guide
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node2
3
.html"
>
3.1 How ZEO Works
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
HREF=
"node2
2
.html"
>
3.1 How ZEO Works
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
doc/guide/zodb/zodb.css
View file @
243c4e27
...
@@ -39,6 +39,7 @@ body { color: #000000;
...
@@ -39,6 +39,7 @@ body { color: #000000;
background-color
:
#ffffff
;
}
background-color
:
#ffffff
;
}
a
:active
{
color
:
#ff0000
;
}
a
:active
{
color
:
#ff0000
;
}
a
[
href
]
:hover
{
background-color
:
#bbeeff
;
}
a
:visited
{
color
:
#551a8b
;
}
a
:visited
{
color
:
#551a8b
;
}
a
:link
{
color
:
#0000bb
;
}
a
:link
{
color
:
#0000bb
;
}
...
@@ -60,18 +61,30 @@ var { font-family: times, serif;
...
@@ -60,18 +61,30 @@ var { font-family: times, serif;
font-family
:
avantgarde
,
sans-serif
;
font-family
:
avantgarde
,
sans-serif
;
font-size
:
110%
;
}
font-size
:
110%
;
}
div
.warning
{
background-color
:
#fffaf0
;
border
:
thin
solid
black
;
padding
:
0.5em
;
margin-left
:
2em
;
margin-right
:
2em
;
}
div
.warning
.label
{
font-size
:
110%
;
margin-right
:
0.5em
;
}
.release-info
{
font-style
:
italic
;
}
.release-info
{
font-style
:
italic
;
}
.titlegraphic
{
vertical-align
:
top
;
}
.titlegraphic
{
vertical-align
:
top
;
}
.verbatim
{
color
:
#00008b
;
.verbatim
pre
{
color
:
#00008b
;
font-family
:
lucida
typewriter
,
lucidatypewriter
,
font-family
:
lucida
typewriter
,
lucidatypewriter
,
monospace
;
}
monospace
;
font-size
:
90%
;
}
.verbatim
{
margin-left
:
2em
;
}
.grammar
{
background-color
:
#99ccff
;
.grammar
{
background-color
:
#99ccff
;
margin-right
:
0.5in
;
margin-right
:
0.5in
;
padding
:
0.05in
;
}
padding
:
0.05in
;
}
.productions
{
background-color
:
#bbeeff
;
}
.productions
{
background-color
:
#bbeeff
;
}
.productions
a
:hover
{
background-color
:
#99ccff
;
}
.productions
table
{
vertical-align
:
baseline
;
}
.productions
table
{
vertical-align
:
baseline
;
}
.grammar-footer
{
padding
:
0.05in
;
.grammar-footer
{
padding
:
0.05in
;
font-size
:
85%
;
}
font-size
:
85%
;
}
...
...
doc/guide/zodb/zodb.html
View file @
243c4e27
...
@@ -6,12 +6,13 @@
...
@@ -6,12 +6,13 @@
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"keywords"
CONTENT=
"zodb"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"resource-type"
CONTENT=
"document"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<META
NAME=
"distribution"
CONTENT=
"global"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset="
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=
iso-8859-1
"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
>
<link
rel=
"STYLESHEET"
href=
"zodb.css"
type=
'text/css'
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"first"
href=
"zodb.html"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<link
rel=
"contents"
href=
"contents.html"
title=
"Contents"
>
<LINK
REL=
"next"
href=
"contents.html"
>
<LINK
REL=
"next"
href=
"contents.html"
>
<meta
name=
'aesop'
content=
'information'
>
</head>
</head>
<body>
<body>
<DIV
CLASS=
"navigation"
>
<DIV
CLASS=
"navigation"
>
...
@@ -47,8 +48,8 @@
...
@@ -47,8 +48,8 @@
<h1>
ZODB/ZEO Programming Guide
</h1>
<h1>
ZODB/ZEO Programming Guide
</h1>
<p><b><font
size=
"+2"
>
A.M. Kuchling
</font></b></p>
<p><b><font
size=
"+2"
>
A.M. Kuchling
</font></b></p>
<p>
akuchlin@mems-exchange.org
</p>
<p>
akuchlin@mems-exchange.org
</p>
<p><strong>
Release 0.0
3
</strong><br>
<p><strong>
Release 0.0
4
</strong><br>
<strong>
February 8
, 2002
</strong></p>
<strong>
October 4
, 2002
</strong></p>
<p>
<p>
</center>
</center>
</div>
</div>
...
@@ -81,55 +82,53 @@
...
@@ -81,55 +82,53 @@
<UL>
<UL>
<LI><A
href=
"node16.html"
>
2.5.1 Modifying Mutable Objects
</a>
<LI><A
href=
"node16.html"
>
2.5.1 Modifying Mutable Objects
</a>
<LI><A
href=
"node17.html"
>
2.5.2 Some Special Methods Don't Work
</a>
<LI><A
href=
"node17.html"
>
2.5.2 Some Special Methods Don't Work
</a>
<LI><A
href=
"node18.html"
>
2.5.3 Fixing
<tt
class=
"function"
>
isinstance
</tt>
and
<tt
class=
"function"
>
issubclass
</tt></a>
<LI><A
href=
"node18.html"
>
2.5.3
<tt
class=
"method"
>
__getattr__
</tt>
,
<tt
class=
"method"
>
__delattr__
</tt>
, and
<tt
class=
"method"
>
__setattr__
</tt></a>
<LI><A
href=
"node19.html"
>
2.5.4
<tt
class=
"method"
>
__getattr__
</tt>
,
<tt
class=
"method"
>
__delattr__
</tt>
, and
<tt
class=
"method"
>
__setattr__
</tt></a>
</ul>
</ul>
<LI><A
href=
"node
20
.html"
>
2.6 Writing Persistent Classes
</a>
<LI><A
href=
"node
19
.html"
>
2.6 Writing Persistent Classes
</a>
<UL>
<UL>
<LI><A
href=
"node2
1
.html"
>
2.6.1 Changing Instance Attributes
</a>
<LI><A
href=
"node2
0
.html"
>
2.6.1 Changing Instance Attributes
</a>
</ul>
</ul>
</ul>
</ul>
<LI><A
href=
"zeo.html"
>
3 ZEO
</a>
<LI><A
href=
"zeo.html"
>
3 ZEO
</a>
<UL>
<UL>
<LI><A
href=
"node2
3
.html"
>
3.1 How ZEO Works
</a>
<LI><A
href=
"node2
2
.html"
>
3.1 How ZEO Works
</a>
<LI><A
href=
"node2
4
.html"
>
3.2 Installing ZEO
</a>
<LI><A
href=
"node2
3
.html"
>
3.2 Installing ZEO
</a>
<UL>
<UL>
<LI><A
href=
"node2
5
.html"
>
3.2.1 Requirements
</a>
<LI><A
href=
"node2
4
.html"
>
3.2.1 Requirements
</a>
<LI><A
href=
"node2
6.html"
>
3.2.2 Installation
</a>
<LI><A
href=
"node2
5.html"
>
3.2.2 Running a server
</a>
</ul>
</ul>
<LI><A
href=
"node27.html"
>
3.3 Configuring and Running a ZEO Server
</a>
<LI><A
href=
"node26.html"
>
3.3 Testing the ZEO Installation
</a>
<LI><A
href=
"node28.html"
>
3.4 Testing the ZEO Installation
</a>
<LI><A
href=
"node27.html"
>
3.4 ZEO Programming Notes
</a>
<LI><A
href=
"node29.html"
>
3.5 ZEO Programming Notes
</a>
<LI><A
href=
"node28.html"
>
3.5 Sample Application: chatter.py
</a>
<LI><A
href=
"node30.html"
>
3.6 Sample Application: chatter.py
</a>
</ul>
</ul>
<LI><A
href=
"node
31
.html"
>
4 Transactions and Versioning
</a>
<LI><A
href=
"node
29
.html"
>
4 Transactions and Versioning
</a>
<UL>
<UL>
<LI><A
href=
"node3
2
.html"
>
4.1 Subtransactions
</a>
<LI><A
href=
"node3
0
.html"
>
4.1 Subtransactions
</a>
<LI><A
href=
"node3
3
.html"
>
4.2 Undoing Changes
</a>
<LI><A
href=
"node3
1
.html"
>
4.2 Undoing Changes
</a>
<LI><A
href=
"node3
4
.html"
>
4.3 Versions
</a>
<LI><A
href=
"node3
2
.html"
>
4.3 Versions
</a>
<LI><A
href=
"node3
5
.html"
>
4.4 Multithreaded ZODB Programs
</a>
<LI><A
href=
"node3
3
.html"
>
4.4 Multithreaded ZODB Programs
</a>
</ul>
</ul>
<LI><A
href=
"node3
6
.html"
>
5 Related Modules
</a>
<LI><A
href=
"node3
4
.html"
>
5 Related Modules
</a>
<UL>
<UL>
<LI><A
href=
"node3
7
.html"
>
5.1
<tt
class=
"module"
>
ZODB.PersistentMapping
</tt></a>
<LI><A
href=
"node3
5
.html"
>
5.1
<tt
class=
"module"
>
ZODB.PersistentMapping
</tt></a>
<LI><A
href=
"node3
8
.html"
>
5.2
<tt
class=
"module"
>
ZODB.PersistentList
</tt></a>
<LI><A
href=
"node3
6
.html"
>
5.2
<tt
class=
"module"
>
ZODB.PersistentList
</tt></a>
<LI><A
href=
"node3
9.html"
>
5.3 B-tree Modules
</a>
<LI><A
href=
"node3
7.html"
>
5.3 BTrees Package
</a>
</ul>
</ul>
<LI><A
href=
"node
40
.html"
>
A. Resources
</a>
<LI><A
href=
"node
38
.html"
>
A. Resources
</a>
<LI><A
href=
"node
41
.html"
>
B. GNU Free Documentation License
</a>
<LI><A
href=
"node
39
.html"
>
B. GNU Free Documentation License
</a>
<UL>
<UL>
<LI><A
href=
"node4
2
.html"
>
Preamble
</a>
<LI><A
href=
"node4
0
.html"
>
Preamble
</a>
<LI><A
href=
"node4
3
.html"
>
B..1 Applicability and Definitions
</a>
<LI><A
href=
"node4
1
.html"
>
B..1 Applicability and Definitions
</a>
<LI><A
href=
"node4
4
.html"
>
B..2 Verbatim Copying
</a>
<LI><A
href=
"node4
2
.html"
>
B..2 Verbatim Copying
</a>
<LI><A
href=
"node4
5
.html"
>
B..3 Copying in Quantity
</a>
<LI><A
href=
"node4
3
.html"
>
B..3 Copying in Quantity
</a>
<LI><A
href=
"node4
6
.html"
>
B..4 Modifications
</a>
<LI><A
href=
"node4
4
.html"
>
B..4 Modifications
</a>
<LI><A
href=
"node4
7
.html"
>
B..5 Combining Documents
</a>
<LI><A
href=
"node4
5
.html"
>
B..5 Combining Documents
</a>
<LI><A
href=
"node4
8
.html"
>
B..6 Collections of Documents
</a>
<LI><A
href=
"node4
6
.html"
>
B..6 Collections of Documents
</a>
<LI><A
href=
"node4
9
.html"
>
B..7 Aggregation With Independent Works
</a>
<LI><A
href=
"node4
7
.html"
>
B..7 Aggregation With Independent Works
</a>
<LI><A
href=
"node
50
.html"
>
B..8 Translation
</a>
<LI><A
href=
"node
48
.html"
>
B..8 Translation
</a>
<LI><A
href=
"node
51
.html"
>
B..9 Termination
</a>
<LI><A
href=
"node
49
.html"
>
B..9 Termination
</a>
<LI><A
href=
"node5
2
.html"
>
B..10 Future Revisions of This Licence
</a>
<LI><A
href=
"node5
0
.html"
>
B..10 Future Revisions of This Licence
</a>
<LI><A
href=
"node5
3
.html"
>
ADDENDUM: How to use this License for your documents
</a>
<LI><A
href=
"node5
1
.html"
>
ADDENDUM: How to use this License for your documents
</a>
</ul>
</ul>
<LI><A
href=
"about.html"
>
About this document ...
</a>
<LI><A
href=
"about.html"
>
About this document ...
</a>
</ul>
</ul>
...
@@ -161,7 +160,7 @@
...
@@ -161,7 +160,7 @@
</tr></table>
</tr></table>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
href=
"contents.html"
>
Contents
</A>
<b
class=
"navlabel"
>
Next:
</b>
<a
class=
"sectref"
href=
"contents.html"
>
Contents
</A>
<hr>
<hr>
<span
class=
"release-info"
>
Release 0.0
3, documentation updated on February 8
, 2002.
</span>
<span
class=
"release-info"
>
Release 0.0
4, documentation updated on October 4
, 2002.
</span>
</DIV>
</DIV>
<!--End of Navigation Panel-->
<!--End of Navigation Panel-->
...
...
src/BTrees/BTreeTemplate.c
View file @
243c4e27
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
****************************************************************************/
****************************************************************************/
#define BTREETEMPLATE_C "$Id: BTreeTemplate.c,v 1.7
1 2002/06/28 20:52:30 tim_one
Exp $\n"
#define BTREETEMPLATE_C "$Id: BTreeTemplate.c,v 1.7
2 2002/10/05 00:39:56 gvanrossum
Exp $\n"
/* Sanity-check a BTree. This is a private helper for BTree_check. Return:
/* Sanity-check a BTree. This is a private helper for BTree_check. Return:
* -1 Error. If it's an internal inconsistency in the BTree,
* -1 Error. If it's an internal inconsistency in the BTree,
...
@@ -1618,10 +1618,10 @@ static struct PyMethodDef BTree_methods[] = {
...
@@ -1618,10 +1618,10 @@ static struct PyMethodDef BTree_methods[] = {
"Return the default (or None) if the key is not found."
"Return the default (or None) if the key is not found."
},
},
{
"maxKey"
,
(
PyCFunction
)
BTree_maxKey
,
METH_VARARGS
,
{
"maxKey"
,
(
PyCFunction
)
BTree_maxKey
,
METH_VARARGS
,
"maxKey([key]) -- Fin
e
the maximum key
\n\n
"
"maxKey([key]) -- Fin
d
the maximum key
\n\n
"
"If an argument is given, find the maximum <= the argument"
},
"If an argument is given, find the maximum <= the argument"
},
{
"minKey"
,
(
PyCFunction
)
BTree_minKey
,
METH_VARARGS
,
{
"minKey"
,
(
PyCFunction
)
BTree_minKey
,
METH_VARARGS
,
"minKey([key]) -- Fin
e
the minimum key
\n\n
"
"minKey([key]) -- Fin
d
the minimum key
\n\n
"
"If an argument is given, find the minimum >= the argument"
},
"If an argument is given, find the minimum >= the argument"
},
{
"clear"
,
(
PyCFunction
)
BTree_clear
,
METH_VARARGS
,
{
"clear"
,
(
PyCFunction
)
BTree_clear
,
METH_VARARGS
,
"clear() -- Remove all of the items from the BTree"
},
"clear() -- Remove all of the items from the BTree"
},
...
...
src/BTrees/BucketTemplate.c
View file @
243c4e27
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
****************************************************************************/
****************************************************************************/
#define BUCKETTEMPLATE_C "$Id: BucketTemplate.c,v 1.4
7 2002/06/27 22:09:32 tim_one
Exp $\n"
#define BUCKETTEMPLATE_C "$Id: BucketTemplate.c,v 1.4
8 2002/10/05 00:39:56 gvanrossum
Exp $\n"
/* Use BUCKET_SEARCH to find the index at which a key belongs.
/* Use BUCKET_SEARCH to find the index at which a key belongs.
* INDEX An int lvalue to hold the index i such that KEY belongs at
* INDEX An int lvalue to hold the index i such that KEY belongs at
...
@@ -1305,10 +1305,10 @@ static struct PyMethodDef Bucket_methods[] = {
...
@@ -1305,10 +1305,10 @@ static struct PyMethodDef Bucket_methods[] = {
{
"__init__"
,
(
PyCFunction
)
Mapping_update
,
METH_VARARGS
,
{
"__init__"
,
(
PyCFunction
)
Mapping_update
,
METH_VARARGS
,
"__init__(collection) -- Initialize with items from the given collection"
},
"__init__(collection) -- Initialize with items from the given collection"
},
{
"maxKey"
,
(
PyCFunction
)
Bucket_maxKey
,
METH_VARARGS
,
{
"maxKey"
,
(
PyCFunction
)
Bucket_maxKey
,
METH_VARARGS
,
"maxKey([key]) -- Fin
e
the maximum key
\n\n
"
"maxKey([key]) -- Fin
d
the maximum key
\n\n
"
"If an argument is given, find the maximum <= the argument"
},
"If an argument is given, find the maximum <= the argument"
},
{
"minKey"
,
(
PyCFunction
)
Bucket_minKey
,
METH_VARARGS
,
{
"minKey"
,
(
PyCFunction
)
Bucket_minKey
,
METH_VARARGS
,
"minKey([key]) -- Fin
e
the minimum key
\n\n
"
"minKey([key]) -- Fin
d
the minimum key
\n\n
"
"If an argument is given, find the minimum >= the argument"
},
"If an argument is given, find the minimum >= the argument"
},
{
"values"
,
(
PyCFunction
)
bucket_values
,
METH_VARARGS
,
{
"values"
,
(
PyCFunction
)
bucket_values
,
METH_VARARGS
,
"values([min, max]) -- Return the values"
},
"values([min, max]) -- Return the values"
},
...
...
src/BTrees/SetTemplate.c
View file @
243c4e27
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
****************************************************************************/
****************************************************************************/
#define SETTEMPLATE_C "$Id: SetTemplate.c,v 1.1
5 2002/02/21 21:41:17 jeremy
Exp $\n"
#define SETTEMPLATE_C "$Id: SetTemplate.c,v 1.1
6 2002/10/05 00:39:57 gvanrossum
Exp $\n"
static
PyObject
*
static
PyObject
*
Set_insert
(
Bucket
*
self
,
PyObject
*
args
)
Set_insert
(
Bucket
*
self
,
PyObject
*
args
)
...
@@ -152,10 +152,10 @@ static struct PyMethodDef Set_methods[] = {
...
@@ -152,10 +152,10 @@ static struct PyMethodDef Set_methods[] = {
{
"clear"
,
(
PyCFunction
)
bucket_clear
,
METH_VARARGS
,
{
"clear"
,
(
PyCFunction
)
bucket_clear
,
METH_VARARGS
,
"clear() -- Remove all of the items from the bucket"
},
"clear() -- Remove all of the items from the bucket"
},
{
"maxKey"
,
(
PyCFunction
)
Bucket_maxKey
,
METH_VARARGS
,
{
"maxKey"
,
(
PyCFunction
)
Bucket_maxKey
,
METH_VARARGS
,
"maxKey([key]) -- Fin
e
the maximum key
\n\n
"
"maxKey([key]) -- Fin
d
the maximum key
\n\n
"
"If an argument is given, find the maximum <= the argument"
},
"If an argument is given, find the maximum <= the argument"
},
{
"minKey"
,
(
PyCFunction
)
Bucket_minKey
,
METH_VARARGS
,
{
"minKey"
,
(
PyCFunction
)
Bucket_minKey
,
METH_VARARGS
,
"minKey([key]) -- Fin
e
the minimum key
\n\n
"
"minKey([key]) -- Fin
d
the minimum key
\n\n
"
"If an argument is given, find the minimum >= the argument"
},
"If an argument is given, find the minimum >= the argument"
},
#ifdef PERSISTENT
#ifdef PERSISTENT
{
"_p_resolveConflict"
,
(
PyCFunction
)
bucket__p_resolveConflict
,
METH_VARARGS
,
{
"_p_resolveConflict"
,
(
PyCFunction
)
bucket__p_resolveConflict
,
METH_VARARGS
,
...
...
src/BTrees/TreeSetTemplate.c
View file @
243c4e27
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
****************************************************************************/
****************************************************************************/
#define TREESETTEMPLATE_C "$Id: TreeSetTemplate.c,v 1.1
4 2002/06/19 23:44:20 tim_one
Exp $\n"
#define TREESETTEMPLATE_C "$Id: TreeSetTemplate.c,v 1.1
5 2002/10/05 00:39:57 gvanrossum
Exp $\n"
static
PyObject
*
static
PyObject
*
TreeSet_insert
(
BTree
*
self
,
PyObject
*
args
)
TreeSet_insert
(
BTree
*
self
,
PyObject
*
args
)
...
@@ -99,10 +99,10 @@ static struct PyMethodDef TreeSet_methods[] = {
...
@@ -99,10 +99,10 @@ static struct PyMethodDef TreeSet_methods[] = {
{
"keys"
,
(
PyCFunction
)
BTree_keys
,
METH_VARARGS
,
{
"keys"
,
(
PyCFunction
)
BTree_keys
,
METH_VARARGS
,
"keys() -- Return the keys"
},
"keys() -- Return the keys"
},
{
"maxKey"
,
(
PyCFunction
)
BTree_maxKey
,
METH_VARARGS
,
{
"maxKey"
,
(
PyCFunction
)
BTree_maxKey
,
METH_VARARGS
,
"maxKey([key]) -- Fin
e
the maximum key
\n\n
"
"maxKey([key]) -- Fin
d
the maximum key
\n\n
"
"If an argument is given, find the maximum <= the argument"
},
"If an argument is given, find the maximum <= the argument"
},
{
"minKey"
,
(
PyCFunction
)
BTree_minKey
,
METH_VARARGS
,
{
"minKey"
,
(
PyCFunction
)
BTree_minKey
,
METH_VARARGS
,
"minKey([key]) -- Fin
e
the minimum key
\n\n
"
"minKey([key]) -- Fin
d
the minimum key
\n\n
"
"If an argument is given, find the minimum >= the argument"
},
"If an argument is given, find the minimum >= the argument"
},
{
"clear"
,
(
PyCFunction
)
BTree_clear
,
METH_VARARGS
,
{
"clear"
,
(
PyCFunction
)
BTree_clear
,
METH_VARARGS
,
"clear() -- Remove all of the items from the BTree"
},
"clear() -- Remove all of the items from the BTree"
},
...
...
src/ZEO/ClientStorage.py
View file @
243c4e27
...
@@ -20,7 +20,7 @@ ClientStorageError -- exception raised by ClientStorage
...
@@ -20,7 +20,7 @@ ClientStorageError -- exception raised by ClientStorage
UnrecognizedResult -- exception raised by ClientStorage
UnrecognizedResult -- exception raised by ClientStorage
ClientDisconnected -- exception raised by ClientStorage
ClientDisconnected -- exception raised by ClientStorage
$Id: ClientStorage.py,v 1.7
4 2002/10/04 16:46:23
gvanrossum Exp $
$Id: ClientStorage.py,v 1.7
5 2002/10/05 00:35:25
gvanrossum Exp $
"""
"""
# XXX TO DO
# XXX TO DO
...
@@ -88,6 +88,8 @@ class DisconnectedServerStub:
...
@@ -88,6 +88,8 @@ class DisconnectedServerStub:
# Singleton instance of DisconnectedServerStub
# Singleton instance of DisconnectedServerStub
disconnected_stub
=
DisconnectedServerStub
()
disconnected_stub
=
DisconnectedServerStub
()
MB
=
1024
**
2
class
ClientStorage
:
class
ClientStorage
:
"""A Storage class that is a network client to a remote storage.
"""A Storage class that is a network client to a remote storage.
...
@@ -105,7 +107,7 @@ class ClientStorage:
...
@@ -105,7 +107,7 @@ class ClientStorage:
ConnectionManagerClass
=
ConnectionManager
ConnectionManagerClass
=
ConnectionManager
StorageServerStubClass
=
ServerStub
.
StorageServer
StorageServerStubClass
=
ServerStub
.
StorageServer
def
__init__
(
self
,
addr
,
storage
=
'1'
,
cache_size
=
20
000000
,
def
__init__
(
self
,
addr
,
storage
=
'1'
,
cache_size
=
20
*
MB
,
name
=
''
,
client
=
None
,
debug
=
0
,
var
=
None
,
name
=
''
,
client
=
None
,
debug
=
0
,
var
=
None
,
min_disconnect_poll
=
5
,
max_disconnect_poll
=
300
,
min_disconnect_poll
=
5
,
max_disconnect_poll
=
300
,
wait_for_server_on_startup
=
None
,
# deprecated alias for wait
wait_for_server_on_startup
=
None
,
# deprecated alias for wait
...
@@ -120,15 +122,16 @@ class ClientStorage:
...
@@ -120,15 +122,16 @@ class ClientStorage:
Arguments:
Arguments:
addr -- The server address(es). This is either a list of
addr -- The server address(es). This is either a list of
addresses
,
or a single address. Each address can be a
addresses or a single address. Each address can be a
(hostname, port) tuple to signify a TCP/IP connection
,
or
(hostname, port) tuple to signify a TCP/IP connection or
a pathname string to signify a Unix domain socket
a pathname string to signify a Unix domain socket
connection. A hostname may be a DNS name or a dotted IP
connection. A hostname may be a DNS name or a dotted IP
address. Required.
address. Required.
storage -- The storage name, defaulting to '1'. Th
is
must
storage -- The storage name, defaulting to '1'. Th
e name
must
match one of the storage names supported by the server(s)
match one of the storage names supported by the server(s)
specified by the addr argument.
specified by the addr argument. The storage name is
displayed in the Zope control panel.
cache_size -- The disk cache size, defaulting to 20 megabytes.
cache_size -- The disk cache size, defaulting to 20 megabytes.
This is passed to the ClientCache constructor.
This is passed to the ClientCache constructor.
...
@@ -137,16 +140,15 @@ class ClientStorage:
...
@@ -137,16 +140,15 @@ class ClientStorage:
str(addr) is used as the storage name.
str(addr) is used as the storage name.
client -- The client name, defaulting to None. If this is
client -- The client name, defaulting to None. If this is
false, the environment value ZEO_CLIENT is used.
i
f the
false, the environment value ZEO_CLIENT is used.
I
f the
effective value is true, the client cache is persistent.
effective value is true, the client cache is persistent.
See ClientCache for more info.
See ClientCache for more info.
debug -- Ignored. This is present only for backwards
debug -- Ignored. This is present only for backwards
compatibility with ZEO 1.
compatibility with ZEO 1.
var -- The 'var' directory, defaulting to None. This is
var -- The 'var' directory, defaulting to None, in which
passed to the ClientCache constructor, which picks a
the persistent cache files should be written.
default if the value is None.
min_disconnect_poll -- The minimum delay in seconds between
min_disconnect_poll -- The minimum delay in seconds between
attempts to connect to the server, in seconds. Defaults
attempts to connect to the server, in seconds. Defaults
...
...
src/ZEO/StorageServer.py
View file @
243c4e27
...
@@ -43,7 +43,7 @@ def set_label():
...
@@ -43,7 +43,7 @@ def set_label():
"""Internal helper to reset the logging label (e.g. after fork())."""
"""Internal helper to reset the logging label (e.g. after fork())."""
global
_label
global
_label
_label
=
"ZSS:%s"
%
os
.
getpid
()
_label
=
"ZSS:%s"
%
os
.
getpid
()
def
log
(
message
,
level
=
zLOG
.
INFO
,
label
=
None
,
error
=
None
):
def
log
(
message
,
level
=
zLOG
.
INFO
,
label
=
None
,
error
=
None
):
"""Internal helper to log a message using zLOG."""
"""Internal helper to log a message using zLOG."""
zLOG
.
LOG
(
label
or
_label
,
level
,
message
,
error
=
error
)
zLOG
.
LOG
(
label
or
_label
,
level
,
message
,
error
=
error
)
...
...
src/ZEO/__init__.py
View file @
243c4e27
...
@@ -21,4 +21,4 @@ ZEO's home on the web is
...
@@ -21,4 +21,4 @@ ZEO's home on the web is
"""
"""
version
=
"2.0b
1
"
version
=
"2.0b
2
"
src/ZEO/simul.py
View file @
243c4e27
...
@@ -18,7 +18,7 @@ Usage: simul.py [-bflyz] [-s size] tracefile
...
@@ -18,7 +18,7 @@ Usage: simul.py [-bflyz] [-s size] tracefile
Use one of -b, -f, -l, -y or -z select the cache simulator:
Use one of -b, -f, -l, -y or -z select the cache simulator:
-b: buddy system allocator
-b: buddy system allocator
-f: simple free list allocator
-f: simple free list allocator
-l: idealized LRU (no allocator)
-l: idealized LRU (no allocator)
-y: variation on the existing ZEO cache that copies to current file
-y: variation on the existing ZEO cache that copies to current file
-z: existing ZEO cache (default)
-z: existing ZEO cache (default)
...
...
src/ZEO/tests/ConnectionTests.py
View file @
243c4e27
...
@@ -469,7 +469,7 @@ class ConnectionTests(StorageTestBase.StorageTestBase):
...
@@ -469,7 +469,7 @@ class ConnectionTests(StorageTestBase.StorageTestBase):
def
checkBadMessage1
(
self
):
def
checkBadMessage1
(
self
):
# not even close to a real message
# not even close to a real message
self
.
_bad_message
(
"salty"
)
self
.
_bad_message
(
"salty"
)
def
checkBadMessage2
(
self
):
def
checkBadMessage2
(
self
):
# just like a real message, but with an unpicklable argument
# just like a real message, but with an unpicklable argument
global
Hack
global
Hack
...
@@ -484,7 +484,7 @@ class ConnectionTests(StorageTestBase.StorageTestBase):
...
@@ -484,7 +484,7 @@ class ConnectionTests(StorageTestBase.StorageTestBase):
# Establish a connection, then send the server an ill-formatted
# Establish a connection, then send the server an ill-formatted
# request. Verify that the connection is closed and that it is
# request. Verify that the connection is closed and that it is
# possible to establish a new connection.
# possible to establish a new connection.
self
.
_storage
=
self
.
openClientStorage
()
self
.
_storage
=
self
.
openClientStorage
()
self
.
_dostore
()
self
.
_dostore
()
...
...
src/ZEO/tests/testConnection.py
View file @
243c4e27
...
@@ -95,7 +95,7 @@ def test_suite():
...
@@ -95,7 +95,7 @@ def test_suite():
# shutup warnings about mktemp
# shutup warnings about mktemp
import
warnings
import
warnings
warnings
.
filterwarnings
(
"ignore"
,
"mktemp"
)
warnings
.
filterwarnings
(
"ignore"
,
"mktemp"
)
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
for
klass
in
test_classes
:
for
klass
in
test_classes
:
sub
=
unittest
.
makeSuite
(
klass
,
'check'
)
sub
=
unittest
.
makeSuite
(
klass
,
'check'
)
...
...
src/ZEO/tests/testZEO.py
View file @
243c4e27
...
@@ -26,6 +26,7 @@ import unittest
...
@@ -26,6 +26,7 @@ import unittest
import
zLOG
import
zLOG
# ZODB test support
# ZODB test support
import
ZODB
from
ZODB.tests.MinPO
import
MinPO
from
ZODB.tests.MinPO
import
MinPO
from
ZODB.tests.StorageTestBase
import
zodb_unpickle
from
ZODB.tests.StorageTestBase
import
zodb_unpickle
...
@@ -130,6 +131,16 @@ class GenericTests(
...
@@ -130,6 +131,16 @@ class GenericTests(
self
.
_storage
.
close
()
self
.
_storage
.
close
()
self
.
_storage
=
ClientStorage
(
addr
,
read_only
=
read_only
,
wait
=
1
)
self
.
_storage
=
ClientStorage
(
addr
,
read_only
=
read_only
,
wait
=
1
)
def
checkWriteMethods
(
self
):
# ReadOnlyStorage defines checkWriteMethods. The decision
# about where to raise the read-only error was changed after
# Zope 2.5 was released. So this test needs to detect Zope
# of the 2.5 vintage and skip the test.
# The __version__ attribute was not present in Zope 2.5.
if
hasattr
(
ZODB
,
"__version__"
):
ReadOnlyStorage
.
ReadOnlyStorage
.
checkWriteMethods
(
self
)
class
UnixTests
(
GenericTests
):
class
UnixTests
(
GenericTests
):
"""Add Unix-specific scaffolding to the generic test suite."""
"""Add Unix-specific scaffolding to the generic test suite."""
...
@@ -200,7 +211,7 @@ def test_suite():
...
@@ -200,7 +211,7 @@ def test_suite():
# shutup warnings about mktemp
# shutup warnings about mktemp
import
warnings
import
warnings
warnings
.
filterwarnings
(
"ignore"
,
"mktemp"
)
warnings
.
filterwarnings
(
"ignore"
,
"mktemp"
)
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
for
klass
in
test_classes
:
for
klass
in
test_classes
:
sub
=
unittest
.
makeSuite
(
klass
,
'check'
)
sub
=
unittest
.
makeSuite
(
klass
,
'check'
)
...
...
src/ZEO/version.txt
View file @
243c4e27
2.0b
1
2.0b
2
src/ZEO/zrpc/client.py
View file @
243c4e27
...
@@ -430,7 +430,7 @@ class ConnectWrapper:
...
@@ -430,7 +430,7 @@ class ConnectWrapper:
def
test_connection
(
self
):
def
test_connection
(
self
):
"""Establish and test a connection at the zrpc level.
"""Establish and test a connection at the zrpc level.
Call the client's testConnection(), giving the client a chance
Call the client's testConnection(), giving the client a chance
to do app-level check of the connection.
to do app-level check of the connection.
"""
"""
...
...
src/ZODB/__init__.py
View file @
243c4e27
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
#
#
##############################################################################
##############################################################################
__version__
=
'3.1b
1+
'
__version__
=
'3.1b
2
'
import
sys
import
sys
import
cPersistence
,
Persistence
import
cPersistence
,
Persistence
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment