[Subversion] / PEAK / src / peak / exceptions.py  

Log of /PEAK/src/peak/exceptions.py

Parent Directory

No default branch
Bookmark a link to HEAD: (view) (download) (as text)


Revision 1757 - (view) (download) (as text) - [select for diffs]
Modified Sun Jun 20 01:44:37 2004 UTC (19 years, 10 months ago) by pje
File length: 3384 byte(s)
Diff to previous 1701
Speed startup/reduce footprint of programs not using module inheritance, by
not loading those modules unless needed.  This cuts the total modules
needed to run a PEAK application by 4.

Revision 1701 - (view) (download) (as text) - [select for diffs]
Modified Sun Feb 22 02:11:49 2004 UTC (20 years, 2 months ago) by pje
File length: 3165 byte(s)
Diff to previous 1573
Remove items that were deprecated during alpha 3 development.  If you've
got code that breaks with this version, check HISTORY.txt for replacements,
or ask on the mailing list.

Revision 1573 - (view) (download) (as text) - [select for diffs]
Modified Sun Dec 28 00:14:24 2003 UTC (20 years, 3 months ago) by pje
File length: 3259 byte(s)
Diff to previous 1030
MAJOR API REFACTORING for 'peak.config', to support iterating over
configuration keys, 'n2' navigability of properties, and much more.
Many APIs are now DEPRECATED or renamed; please see CHANGES.txt for
a complete description.  A few highlights:

 - 'config.lookup()' replaces 'findUtility' and 'getProperty'

 - 'config.iterValues()' replaces 'findUtilities'

 - 'config.iterKeys()' finds keys in a specific namespace

 - NEW: 'config.parentProviding()' and 'config.parentsProviding()'
   APIs to find parent components that support a protocol.

 - NEW: You can now use 'peak n2 config:' to explore the default
   property namespace.  For example 'ls -l peak.naming.schemes'
   will list all defined naming schemes.

Please see CHANGES.txt for the list of deprecated or removed APIs.

Revision 1030 - (view) (download) (as text) - [select for diffs]
Modified Sun Apr 27 21:04:41 2003 UTC (20 years, 11 months ago) by pje
File length: 3391 byte(s)
Diff to previous 982
Plan-it of the APES, phase 1.  Configuration APIs now require an explicit
context argument.  There is a 'config.IConfigurationRoot' interface, that
is currently implemented by AppConfig and SystemConfig.  There is also a
'NullConfigRoot' object that implements it by giving "invalid root" errors.
Right now, however, you'll never see that message because 'iterParents'
still goes to the special config objects once a root is reached.  That'll
be changed in the next phase.

Revision 982 - (view) (download) (as text) - [select for diffs]
Modified Wed Apr 16 12:50:18 2003 UTC (21 years ago) by pje
File length: 3296 byte(s)
Diff to previous 849
First draft implementation of system scheduling proposal.  (Also, misc.
TODO additions.) Interfaces have been streamlined and names changed.
Daemons are now "periodic tasks", and the provided base class implements an
"adaptive task" interface.  "Daemonic app", "event loop", and "daemon
scheduler" are now just a single "system scheduler" interface, which can
schedule periodic tasks as well as one-offs.  I settled on "higher priority
number" = "higher priority" for priority sorting.

I'm beginning to like this whole "asynchronous programming" model that
Twisted provides.  AdaptiveTask (formerly BaseDaemon) is a lot simpler,
MultiDaemon went away, and the system scheduler is only two screens
of code to manage idle timeouts, prioritized task scheduling, and more.
Heck, "shutdown after X" was as simple as 'callLater(duration,self.stop)'!

There is one minor problem in this draft...  if a task raises an unhandled
exception, it won't be scheduled for further re-run.  I'm not sure if this
is a bug or feature yet.  It should be easy to fix, though.

Revision 849 - (view) (download) (as text) - [select for diffs]
Modified Thu Feb 6 18:38:50 2003 UTC (21 years, 2 months ago) by pje
File length: 3258 byte(s)
Diff to previous 785
Major refactoring of 'peak.model'.  Changes include:

* Added 'enumerations' module with the new implementation of
  'model.Enumeration' -- read its (thorough) docs for details on the new
  features.  Changed existing uses/test cases for the new "spelling"
  of enumerations.

* The 'interfaces' module has been thoroughly revised to drop ancient
  TransWarp stuff, and to mostly match the actual structure of today's
  'peak.model' package.  It still needs to be gone over for errors and
  omissions, and the docs need to be fleshed out some more, but it
  should actually provide some useful information now.

* Features now support an 'implAttr' attribute which can specify what
  attribute is actually used to store the feature.  It defaults to being
  the same as the feature's name, but you can override it in the feature
  definition to redirect its storage to a private attribute.

* There is now a 'structField' feature type that can be used to define
  read-only fields for immutable types without having to keep typing
  'isChangeable = False'.

* Features now won't actually allow themselves to be changed, if their
  'isChangeable' flag is false.

* Many methods have moved around, in an attempt to consolidate the
  class hierarchy for features.  This process may continue for a bit.

This check-in completes about 60-80% of the 'peak.model' refactoring that
I announced on the mailing list.  It has now progressed far enough that I
can begin experimenting with the MOF and XMI features that were blocked
waiting for this work.  Implementing those features may drive further
changes to the 'peak.model' package, but I believe the API of
'peak.model' is no longer dangerously unstable.  (One known change
that's still to come: default constructor implementations for
'model.Immutable' and 'model.Element'.)

Prior to this refactoring, it was unclear what paradigms would come out
on top in certain areas, and that uncertainty is now mostly eliminated.
It's most likely that further refactorings in 'peak.model' will be mere
"spelling" or class hierarchy implementation issues, rather than
fundamental changes of approach.  But I'm going to wait until XMI
writing and MOF->Python code generation are further along before
declaring the API "stable" on the general mailing list.

Revision 785 - (view) (download) (as text) - [select for diffs]
Modified Fri Dec 6 18:50:03 2002 UTC (21 years, 4 months ago) by pje
File length: 3167 byte(s)
Diff to previous 593
Fixed formatting of naming exceptions, so that they display as I originally
intended.  That is, with lots of useful debugging information included.

Revision 593 - (view) (download) (as text) - [select for diffs]
Modified Sun Nov 3 19:47:29 2002 UTC (21 years, 5 months ago) by pje
File length: 3106 byte(s)
Diff to previous 548
Re-org/refactoring of many items from the TODO list for 0.5, including:

* moved peak.binding.imports -> peak.util.imports, added importSuite()

* Decided not to do binding.Acquire, it should just be a documented idiom

* Moved LDAP and lockfile URLs to peak.storage.LDAP and
  peak.running.lockfiles, respectively

* Moved factories.getObjectInstance -> spi, updated peak.ini to load
  naming.spi as the provider.

* Consolidated naming.references into naming.names

* Made ParsedURLs compile their pattern strings, and automatically make
  their 'fromX()' methods classmethods (and the same is true for other
  'struct' types.

* Refactored cursors and connections out into distinct SQLCursor/LDAPCursor
  types, based on a common AbstractCursor.

* Added TooManyResults/TooFewResults errors to peak.exceptions

Revision 548 - (view) (download) (as text) - [select for diffs]
Added Wed Oct 9 13:40:58 2002 UTC (21 years, 6 months ago) by pje
File length: 2778 byte(s)
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.

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

  Diffs between and
  Type of Diff should be a

Sort log by:

cvs-admin@eby-sarna.com

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help