E&S CVS Commit: PEAK - Moved all PEAK API exceptions to 'peak.exceptions' module, because it

pje at eby-sarna.com pje at eby-sarna.com
Wed Oct 9 09:41:00 EDT 2002


Module Name:	PEAK
Committed By:	pje
Date:		Wed Oct  9 13:40:59 UTC 2002

Modified Files:
	PEAK/src/peak/api: __init__.py
	PEAK/src/peak/binding: components.py
	PEAK/src/peak/binding/tests: __init__.py
	PEAK/src/peak/config: api_impl.py config_components.py interfaces.py
	PEAK/src/peak/naming: contexts.py interfaces.py names.py spi.py
	PEAK/src/peak/naming/factories: ldap.py uuid.py
	PEAK/src/peak/storage: interfaces.py transactions.py
Added Files:
	PEAK/src/peak: exceptions.py

Log Message:
Moved all PEAK API exceptions to 'peak.exceptions' module, because it
was getting pretty darn inconvenient to keep importing them across
subpackages.  'from peak.api import exceptions' or 'from peak import
exceptions' can be used to access them.  It's worth the trouble of
referring to 'exceptions.SomeException', because it allows the names
to be shorter (no need for Exception or Error in the name) and makes
the exceptions globally available.

Added 'binding.iterParents()', which walks from a component up through
its root parent, into the local and global configuration objects, if
available.  It's now used in getProperty() and findUtilities().

Synchronized interface of 'binding.findUtility()' and
'config.getProperty()'.  Now both take an optional 'default' argument
which will be returned if the sought item is not found, or, if a default
is not supplied and the item isn't found, an 'exceptions.NameNotFound'
error is raised.  (findUtility() used to return 'None' to mean
not-found).

Fixed a bug in 'binding.lookupComponent()' for looking up utilities
(which also caused 'bindTo(ISomething)' to not work correctly).

Added a 'config.Property' class, a subclass of 'str', which parses and
validates property names, as well as handling wildcard iteration.  It
also implements enough of 'IInterface' to allow it to be used as a key in
an EigenRegistry.  There's a new interface 'config.IConfigKey', which is
implemented by both Interface objects and Property objects, so everything
that can be used as a configuration key now implements it.  This is
another step towards unification of configuration properties (keyed by
name) and utilities (keyed by Interface).  After a few more passes, I
should be able to eliminate the rest of the parallel logic that exists to
process both Utilities and Properties.

Fixed a typo in 'storage.TransactionComponent' which would have caused it
to raise an error upon joining a transaction.


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PEAK/src/peak/exceptions.py?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.eby-sarna.com/PEAK/src/peak/api/__init__.py.diff?r1=1.15&r2=1.16
http://cvs.eby-sarna.com/PEAK/src/peak/binding/components.py.diff?r1=1.43&r2=1.44
http://cvs.eby-sarna.com/PEAK/src/peak/binding/tests/__init__.py.diff?r1=1.15&r2=1.16
http://cvs.eby-sarna.com/PEAK/src/peak/config/api_impl.py.diff?r1=1.3&r2=1.4
http://cvs.eby-sarna.com/PEAK/src/peak/config/config_components.py.diff?r1=1.6&r2=1.7
http://cvs.eby-sarna.com/PEAK/src/peak/config/interfaces.py.diff?r1=1.8&r2=1.9
http://cvs.eby-sarna.com/PEAK/src/peak/naming/contexts.py.diff?r1=1.14&r2=1.15
http://cvs.eby-sarna.com/PEAK/src/peak/naming/interfaces.py.diff?r1=1.17&r2=1.18
http://cvs.eby-sarna.com/PEAK/src/peak/naming/names.py.diff?r1=1.15&r2=1.16
http://cvs.eby-sarna.com/PEAK/src/peak/naming/spi.py.diff?r1=1.21&r2=1.22
http://cvs.eby-sarna.com/PEAK/src/peak/naming/factories/ldap.py.diff?r1=1.3&r2=1.4
http://cvs.eby-sarna.com/PEAK/src/peak/naming/factories/uuid.py.diff?r1=1.2&r2=1.3
http://cvs.eby-sarna.com/PEAK/src/peak/storage/interfaces.py.diff?r1=1.13&r2=1.14
http://cvs.eby-sarna.com/PEAK/src/peak/storage/transactions.py.diff?r1=1.10&r2=1.11

To generate a diff of this commit:
cvs rdiff -r0 -r1.1 PEAK/src/peak/exceptions.py
cvs rdiff -r1.15 -r1.16 PEAK/src/peak/api/__init__.py
cvs rdiff -r1.43 -r1.44 PEAK/src/peak/binding/components.py
cvs rdiff -r1.15 -r1.16 PEAK/src/peak/binding/tests/__init__.py
cvs rdiff -r1.3 -r1.4 PEAK/src/peak/config/api_impl.py
cvs rdiff -r1.6 -r1.7 PEAK/src/peak/config/config_components.py
cvs rdiff -r1.8 -r1.9 PEAK/src/peak/config/interfaces.py
cvs rdiff -r1.14 -r1.15 PEAK/src/peak/naming/contexts.py
cvs rdiff -r1.17 -r1.18 PEAK/src/peak/naming/interfaces.py
cvs rdiff -r1.15 -r1.16 PEAK/src/peak/naming/names.py
cvs rdiff -r1.21 -r1.22 PEAK/src/peak/naming/spi.py
cvs rdiff -r1.3 -r1.4 PEAK/src/peak/naming/factories/ldap.py
cvs rdiff -r1.2 -r1.3 PEAK/src/peak/naming/factories/uuid.py
cvs rdiff -r1.13 -r1.14 PEAK/src/peak/storage/interfaces.py
cvs rdiff -r1.10 -r1.11 PEAK/src/peak/storage/transactions.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




More information about the source-changes mailing list