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

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

Parent Directory

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


Revision 2146 - (view) (download) (as text) - [select for diffs]
Modified Wed May 24 04:13:36 2006 UTC (17 years, 10 months ago) by pje
File length: 106 byte(s)
Diff to previous 582
Split out peak.util.imports and use the new Importing package instead.
peak and peak.util are now namespace packages, so any pkgfile: 
references within these packages must now refer to some specific module 
in order to work correctly (e.g. peak.core/peak.ini instead of 
peak/peak.ini).

Revision 582 - (view) (download) (as text) - [select for diffs]
Modified Thu Oct 31 02:08:38 2002 UTC (21 years, 5 months ago) by pje
File length: 50 byte(s)
Diff to previous 434
Misc. doc fixes for HappyDoc.

Revision 434 - (view) (download) (as text) - [select for diffs]
Modified Sun Jun 23 16:55:32 2002 UTC (21 years, 9 months ago) by tsarna
File length: 55 byte(s)
Diff to previous 323
TransWarp -> PEAK in some docstrings for modules that are fairly
stable. Didn't do ones which seem up in the air to me (eg is EigenDict
relevant anymore?) or like model where the docstrings may need more
overhaul anyway.

Revision 323 - (view) (download) (as text) - [select for diffs]
Modified Thu Feb 14 21:12:54 2002 UTC (22 years, 1 month ago) by pje
File length: 51 byte(s)
Diff to previous 311
"And now, witness the power of this fully operational Python language
 upgrade..."

   -- This change makes use of 2.2 metaclasses, plus TransWarp module
      inheritance (and metaclass constraint inheritance), to achieve
      everything that the old code did.  As a consequence, various
      modules just plain went away, and their unit tests and docs
      largely went with them.  Other modules got refactored, or at
      least "unbundled" and maybe patched up a little.  If they're not
      unit tested, however, chances are very good that they don't
      actually work right now!


"I heard thousands of lines of code, calling out to me through the
 Source..."

   -- (This change wipes out over 100K of code - in *deleted* files
       alone, not counting lines removed from files that stayed.)


"No matter how cool your [user] interface is, less of it would be better."

   -- Alan Cooper, "About Face"

      (It's still ugly in spots, but there's now a lot less of it!)


"Gate, gate, paragate, parasamgate, bodhi svaha!"

   -- or, in English::

	Gone, Gone!
        Gone Beyond!
        Fully Beyond!
        Awake, rejoice!

Revision 311 - (view) (download) (as text) - [select for diffs]
Modified Sun Feb 10 15:32:57 2002 UTC (22 years, 1 month ago) by pje
File length: 134 byte(s)
Diff to previous 307
Merged Simplification-Branch back onto the trunk; see the logs from
the Simplification-Branch for details.

Revision 307 - (view) (download) (as text) - [select for diffs]
Modified Wed Jan 2 05:57:29 2002 UTC (22 years, 3 months ago) by pje
File length: 3309 byte(s)
Diff to previous 306
Callback-driven, "push" dependencies, a sane event model, and an
end to the previous peculiarities of postprocessors!  Plus syntactic
sugar for hooking phase callbacks from builders, and more.

Postprocessor handling is now part of the 'IParentBuilder' interface,
through a new method 'registerPostprocessor()'.  Registering a builder
as a postprocessor means that it will be treated as being dependent on
all sibling builders which are not themselves postprocessors or dependent
on postprocessors.  Postprocessors, in other words, depend on anything
which does not depend on them.  :)  This made unnecessary the ugly hack I
had in 'Database.DataModel' to do an 'Eval' on the result of a
postprocessor.  Any builder such as an 'Eval' which depends on a
postprocessor will automatically follow it, and the postprocessor will not
depend on it.

'AbstractBuilder' is shaping up into a nice little base class, now with a
nested utility class 'hooks' which can be used to set up callbacks
automatically when a builder is added to a build tree.  I'll have to add
some docstrings to actually describe how that works, though.  For right
now, it's UTSL (Use The Source, Luke!) all the way.

The build callbacks/phases have now stabilized into something both stable
and relatively obvious: 'beforeBuild', 'beforeSubcomponents',
'afterSubcomponents', and 'afterBuild'.  Simple, symmetrical, useful, but
still not obvious.  Again, I've gotta document them, but probably not
tonight.  :)

Dependencies are now push-driven; builders can report local dependencies
to their parent builders at any time up through their immediate parent's
'beforeSubcomponents' event.  However, dependencies to a non-sibling
builder must be reported by the end of the lowest common parent's
'beforeSubcomponents' event for all dependencies to be handled properly.
This implies that to be fully general, a builder that can't report
dependencies when added to the build tree should report its dependencies
during the root 'beforeSubcomponents' event.  'Eval()' does this,
since it can't be sure it knows how its referenced names will be
qualified.

This eliminates the last of the major eccentricities of the kernel.
The only remaining limitation of note is that 'copyIntoSubclasses' may
not work properly when used on a ComponentBuilder.  So far I have no
need to have this sort of "fractal inheritance", but if I or someone
else does in future I'll need to re-examine a few things.  First,
ComponentBuilder isn't really a correct implementation of IBuilder at
present: it doesn't support 'copy()', for instance!  Second, creating
new ComponentBuilders during the root 'beforeBuild' phase would cause
them to subscribe to a callback list *while it was executing*.  This
would probably work, but it makes me a little uneasy to rely on it.
But those are really pretty minor nits, and probably straightforward
to fix.

Misc. other changes...  Stuff moved around in Components.py, trying to
get a little more order to ComponentBuilder's methods.  'IRootBuilder'
is no more; it turns out that the new before/after events can be
considered uniform among all builders.  Other changes to interfaces
have occurred, to support the new dependency model.

This is probably the last major refactoring codewise, but there will
probably be a few cleanup and documentation passes yet to go, perhaps
some minor refitting of methods, probably mostly private ones.  I may
also try to get rid of or redo 'getSubclassRecipes()' and 'getPathFor()'
as they are annoyingly unencapsulated, and poorly explained.  These
changes will likely be very minor in impact, however, compared to what
I've been doing so far.

I also have some performance concerns, given that the UML metamodel
takes 3-4 seconds to build.  Although it's a complex model, I'm not sure
the performance will scale well to really large models used in transient
programs (e.g. command-line tools, as opposed to longer-running
"server"-type processes).  Since build overhead is only at program
startup, most apps can probably pay the price for now.  In future I may
want to find a way to "compile" builds so that the cost is only paid when
a program or its configuration changes.

Revision 306 - (view) (download) (as text) - [select for diffs]
Modified Sun Dec 30 19:36:54 2001 UTC (22 years, 3 months ago) by pje
File length: 3326 byte(s)
Diff to previous 305
Another big refactoring, this one to tighten up on "correctness" by making
errors more uniform, adding stricter checking of parameters, fixing
long-outstanding minor bugs, etc.  Another goal was to further shrink
Components.py, especially by simplifying the 'ComponentBuilder' class where
possible.  This led to some inlining of private methods that were called in
only one place, and the like.  Also, certain items were moved from one file
to another, but this should not be externally visible if you're importing
from the top-level package.

Externally Visible Changes (but which still shouldn't impact most users):

* Removed deprecated & unused 'Ref' builder

* 'SpecificationError' is now the standard error for all TW-detected
  specification problems.  (Previously, 'KeyError', 'NameError', and
  'TypeError' could be thrown.)

* "Vertical inheritance" now *only* includes inheritance from the
  immediately enclosing namespace; previously it could incorrectly
  search further-out namespaces as well.

* The implementation of 'qualifyPath()' is now more "correct" for most
  users.  Specifically, 'qualifyPath()' used to match a path fragment
  based solely on the first name in the path.  Now, the matching is
  based on the *entire* path, which is both more and less strict.
  Previously, such a partial match could fail later in the build
  process, when you tried to use the rest of the qualified path.
  Now, if there is no match at all, 'qualifyPath()' will fail
  immediately, but if only a partial match is made, the search will
  continue up the builder tree.  This means that searching for a
  path '("foo","bar")' will not bind to a parent builder 'foo' unless
  it has a sub-builder 'bar', preventing "false positives" that would
  otherwise interfere with using partial or relative paths to classes.

* Builder APIs and implementations have changed again; this generally
  shouldn't affect you unless you have implemented your own builders
  that either do *not* derive from 'AbstractBuilder', or which assume
  that builder paths include the root builder's name.  (Root
  builder's paths no longer include their own name; this was done to
  simplify handling of relative paths all around.)  Please check the
  diffs if you have implemented builders of your own.

  API change details:

   * Added 'NullParentBuilder' singleton to allow recursive methods to
     "top out" without the need to check whether they have a parent
     builder.

   * New IBuilder methods: 'hasSubpath()', 'getSubBuilder()'

   * New IBuilder attributes: 'name', 'isNotNull'  (Note: 'name' was
     always required, but previously wasn't documented.)

   * New or changed IParentBuilder methods: 'qualifyPath()',
     'getPathFor()', and 'getOutput()'.  (Also, 'getDataForPath()' has been
     removed.)

Revision 305 - (view) (download) (as text) - [select for diffs]
Modified Sat Dec 29 21:50:27 2001 UTC (22 years, 3 months ago) by pje
File length: 579 byte(s)
Diff to previous 300
A heroic attempt to further shrink the still-bloated Components.py module,
by splitting out specification-related classes to Specifications.py.  In
the process, some 1.5.2-isms were also eliminated, while others still
remain.  Next up...  refactoring the build process phases and adding
build phase callback hooks.

Revision 300 - (view) (download) (as text) - [select for diffs]
Modified Tue Nov 27 01:53:41 2001 UTC (22 years, 4 months ago) by pje
File length: 1006 byte(s)
Diff to previous 293
Made NOT_GIVEN and NOT_FOUND globals available from the TW package, so as
to avoid continually re-defining them in various places - especially apps!

Revision 293 - (view) (download) (as text) - [select for diffs]
Modified Mon Oct 22 13:59:59 2001 UTC (22 years, 5 months ago) by pje
File length: 975 byte(s)
Diff to previous 289
Added "SEF" convenience module for late-binding components in the Service-
Element-Feature pattern.

Revision 289 - (view) (download) (as text) - [select for diffs]
Modified Wed Jul 11 19:47:21 2001 UTC (22 years, 8 months ago) by pje
File length: 964 byte(s)
Diff to previous 282
Added "unicode support"...  or to be precise, munging to fix places where
unicode can break things.  Also moved class building and related machinery
to the Utilities module, out of the mainline of TW.Components.  Fixed an
issue with importAllFrom() that masked syntax and import errors.  Last, but
not least, added more UML.Generators design notes.

Revision 282 - (view) (download) (as text) - [select for diffs]
Modified Mon Jun 11 01:39:39 2001 UTC (22 years, 9 months ago) by pje
File length: 993 byte(s)
Diff to previous 281
Fixes for bugs in last checkin, such as importAllFrom() needing a
dictionary into which to import.

Revision 281 - (view) (download) (as text) - [select for diffs]
Modified Sat Jun 9 16:37:38 2001 UTC (22 years, 9 months ago) by pje
File length: 941 byte(s)
Diff to previous 262
Re-organized modules to split up the huge Components.py file, while making
it possible to do 'from TW import *' or 'import TW' to get all the best
goodies from the kernel.  Reinstated "Aspect" as an empty catalyst that
turns a class into a template.  Refined builder-replacement rules a bit, so
default builders (ComponentBuilder and DefaultBuilder) have to explicitly
defer to existing builders.  Reinstated some old tests which depended on
Aspect-ness.

Revision 262 - (view) (download) (as text) - [select for diffs]
Added Tue Jan 30 04:13:23 2001 UTC (23 years, 2 months ago) by pje
File length: 19 byte(s)
Initial revision

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