Revision 661
Jump to revision: |
|
Author: |
pje |
Date: |
Sun Nov 10 20:07:30 2002 UTC (21 years, 4 months ago) |
Log Message:
PropertyName -> peak.api; Improved lazy import facility
* naming.PropertyName is now simply PropertyName; it never really had much
to do with naming in the first place, doesn't depend on anything else,
and needs to be accessible in all major subpackages and in end-user API
calls. So now it's in-line in the peak.api module.
* Added a 'lazyModule(moduleName)' function to peak.util.imports. This
new "next generation" way of creating a lazily-loaded module actually
creates an object that *will be* the real module in sys.modules, and once
loaded will be indistinguishable from an ordinary Python module. (Well,
under Python 2.3 the type() will be different, but you can't have
everything.) I was getting really fed up of tracing into
lazyImport.__getattr__ during debugging sessions, so I was inspired to
come up with something that would only have code overhead when it's first
touched. Subclassing ModuleType, adding a __getattribute__ method, and
clever use of the Python 'reload()' function saved the day.
* This now completes all the non-documentation items I want for 0.5a1,
although I may "work ahead" a little on the features list, especially if
Ty keeps pressing for SQL type maps and LDAP schemas. ;) (In truth, I'd
like those and some of the other database features Real Soon Now myself.)
Changed paths: