|| ||=?ISO-8859-1?Q?St=E9fane?= Fermigier <email@example.com>|
|| ||Europython conference report, day 3|
|| ||04 Jul 2003 12:58:43 +0200|
Europython conference report, day 3
:Location: Charleroi, Belgium
:Author: Stéfane Fermigier, Nuxeo (http://www.nuxeo.com/)
- Text is a transcription of what the speker said, or what I read on the
slides. Out of band comment are marked like this [SF: this is a comment].
- Most errors (including grammar and spelling) are mine, not the speakers.
- Since there were actually 3 tracks running at the same time, I only cover
the talks I did attend.
- Day 1 report still available at http://lwn.net/Articles/37835/
- Day 2 report still available at http://lwn.net/Articles/38472/
Cristian Zagrodnick: Zope Storage Backends
The ZODB has a layered architecture, so it is (or at least, it seems)
easy to write new storage backends.
Reasons to use Directory Storage include: scalability (since it has constant
memory usage, even while packing), replication / snapshotting (there are tools
for copying data to a replica reliably), fault-tolerance (it checks for
An interesting feature is that you can have a different expiration time for
differents classes. Main problem is that it is less mature and slower than
FilStorage (read/write about 1.5 times, packing about 8 times).
It works by storing pickles of objects on the filesystem. You will use
different schemes depending on your filesyste: "bushy" for Ext2,
"chunky" for Reiser, "lean" for XFS...
Ape motivation is that records in a dabase are not really "first class objects"
in Zope: with Ape, you can easily manipulate your RDB objects like regular Zope
objects. Ape can also deal with file system storage, other special needs like
Ape could be used without Zope, although it is currently distributed as a Zope
2 products. It has two ready to use storages (dababase and filesystem)
and is extensible to other kind of needs.
Marius Gedminas: Functional Testing in Zope 3
Functional tests complement unit tests. In XP, they are used as acceptance
tests. It is important that they are automated.
Zope 3 has extensive units tests, but didn't hav automated functional tests
until april 2003.
To run functional test on Zope 3, just type "python test.py -f". This uses
ftesting.zcml and creates a temporary in-memory ZODB storage with an empty root
folder and essential services.
This can be used to verify that different components play well together, to
simulatre te publication process. But it does not test the actual HTTP server.
Functional tests are written using PyUnit, by inheriting a special TestCase
class), so it's very similar to writing unit tests.
[SF: This is very different than Tres Seaver's FunctionalTests approach, that
does (mostly) HTTP request on a Zope 2 server, see
Alex Martelli: What's new in Python 2.3
Roadmap: beta1 (late April), beta 2 (July), final (August).
The answer to the question "Should I upgrade" is *yes*!. It is really safe. You
can keep programming to 2.2 and get 2.3 benefits, including 15%-20% extra
Other benefits include: bug fixes, generators imported w/o need to import them
from __future__, minor enhancements to built-ins, many standard library
enhancements and tools (timeit, new IDLE).
There may be some issues though: new bugs ? (there are no known bugs in 2.3),
int/long unification is proceeding, non-ASCII sources, no Bastion / rexec
(because they were unsafe anyway).
Timeit is a new module to measure micro-performance accurately. It's a precious
little tool that you can use *now*, even in 2.2.
There were minor language-level changes: MRO of new-style classes, names of
extension types now include the nodule's name, __name__ and __base__ can now be
rebound on new-style classes, super was enhanced (it had some issues).
Enhancements to file: there is now a "U" (universal) mode. And a file not just
HAS, but IS an iterator, so you can write "for line in f: ...".
Enhancements to lists: list.insert(i, value) is now fixed when i < 0.
list.sort is now faster and stable.
There is a new way to build a dict: "d = dict(a=1, b=2, ...)"
There is a new "sum" builtin to compute the sum of objects in a sequence.
Python2.3 will issue a DeprecationWarning if there is a non-ASCII caracter in
the program, unless you explicitly a encoding directive (in a comment).
Bastion and rexec have been remove, because there were unsafe with new-style
classes. There is still some hope, check out SandBox.py on www.procoders.net
Several modules have been enhanced: socket can now timeout...
Import has been enhanced, to be able for instance to import from a ZIP
file. Pickling has also been enhanced, and unpickling has been declared
Distutils now supports metadata, and has other enhancements.
There are new modules: datetime, sets (= sets (unordered collections) of
hashable elements), heapq, itertools, logging, bz2 (like gzip), optparse (used
to be called optik),
Nicolas Chauvat: Aspect Oriented Programming
We're doing advanced Python programming and knowledge management.
We experiment with other way to work with Python.
AOP is to try to capture concerns that cannot be clearly captured in OO way.
AOP weaves / unweaves concerns-related code in existing application. More info
We wanted to enable AOP in Python: logilab.aspects. That comes with a set of
implemented aspects: LoggerAspect (traces all method calls), ContractAspect
(DBC in Python), DispatcherAspect (multimethods), ProfilerAspect,
ConfirmationAspect (ask for confirmation before an operation), ObserverAspect
(AOP implementation for Observer).
Example: contracts. Preconditions / postcondition / invariants are expressed in
XXX: Introduction to PyLint
The aim is to validate Python code against a coding standard.
PyLint core is an event dispatcher. Events as dispatched to to kins of
pluggable checkers: "raw checker", which directly parse the Python module's
file, and "ASTNG checkers (ASTNG = OO representation of a Python syntax tree,
built from both living object and the syntax tree).
Checkers can compute and gather statistics on gathered results.
Jean-Paul Smets: ERP5
I'm going to show you an instance of ERP5, running live in a company located in
This is the first public presentation of a working ERP5 instance.
ERP5 is a GPL free software project started 2 years. The idea came from a
swimsuit company called Coramy. They had developped their own ERP 10 years ago
with 4D. The developper, who is the only person able to maintain the
application, is now the general manager of the company. But there are bugs, and
it is too expensive to fix them, so they don't fix them. It is a company
that doesn't like to spend money when it is not necessary, so they
thought that it would be interesting to develop a free software ERP.
ERP5 is now very easy to install (using urpmi on Mandrake). But we can't
provide yet something that is ready to use. We expect to provide this in
We used to use the standard Zope catalog, but it was really slow because there
are hundreds of tasks. To we switched to a new Catalog that called the
ERP5 is not very fast, but many people tell me it's fast compared
to PeopleSoft or SAP.
The fact that we provide a workflow is already a huge win for a customer,
because SAP for instance doesn't even provide custom workflows.
We can compute prices based on various variables. We can to computations that
neither SAP nor PeopleSoft can provide. We're using tensors and predicates
that we combine.
We still don't have accounting and personnel management, and we won't do it for
the customer, because we don't want they accountant to get angry and because
there is no money to be made by selling this kind of packages. We will do it
BTreeFolder is fine up to 1000000 objects. When we have more objects, we will
need another technology (maybe Ape).
Currently, there are 50 classes in ERP5, but just 4 tables in MySQL. The
indexing model in ERP5 is completely independent to the storage model.
Stéfane Fermigier, Tel: +33 (0)6 63 04 12 77 (mobile).
Nuxeo Collaborative Portal Server: http://www.nuxeo.com/cps
Gestion de contenu web / portail collaboratif / groupware / open source!
to post comments)