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

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

Parent Directory

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


Revision 1791 - (view) (download) (as text) - [select for diffs]
Modified Sun Jul 25 04:24:12 2004 UTC (19 years, 8 months ago) by pje
File length: 8439 byte(s)
Diff to previous 1719
Removed 'peak.running.timers' and 'peak.util.dispatch'.  Neither was in
active use, and both are being replaced by the new generic functions
package in PyProtocols.

Revision 1719 - (view) (download) (as text) - [select for diffs]
Modified Thu Mar 18 22:07:28 2004 UTC (20 years ago) by pje
File length: 8469 byte(s)
Diff to previous 1614
The 'events.IEventSource' interface now returns a 'canceller' function
from the 'addCallback()' method, allowing you to cancel a previously-
scheduled callback.  This fixes a memory leak and performance problem with
'events.AnyOf()', which previously could accumulate unneeded callbacks on
the sources it was monitoring.  Note that if you have developed any custom
event sources with 'addCallback()' methods, you must make sure that they
return a canceller from now on.

Revision 1614 - (view) (download) (as text) - [select for diffs]
Modified Wed Jan 21 22:35:04 2004 UTC (20 years, 2 months ago) by pje
File length: 8407 byte(s)
Diff to previous 1613
Simplified activity timeout algorithm to a two-line loop with no
arithmetic, using the standard 'peak.events' approach: an interesting
example of converting callback-think into thread-think.

Revision 1613 - (view) (download) (as text) - [select for diffs]
Modified Wed Jan 21 03:19:01 2004 UTC (20 years, 2 months ago) by pje
File length: 8339 byte(s)
Diff to previous 1606
Big migration to 'peak.events': 'UntwistedReactor' and 'MainLoop' are now
just facades over 'EventLoop'.  Added untested Twisted support to implement
'peak.events' interfaces as facades over a reactor.  Minor interface tweaks
in 'peak.events' to cover the needs of real (and testable) event loops.
Moved 'ifTwisted' and 'makeTwisted' to 'peak.events.api'.  Ported
'TaskQueue' and 'FastCGIAcceptor' to use threads for scheduling.  Por

Other: fixed 'commands.AbstractInterpreter' failing with usage errors at
construction time, rather than at use time.  Refactored 'CGIInterpreter' to
be an actual interpreter, and 'CGICommand' to not run an event loop unless
FastCGI is being used.  Also changed 'CGICommand' to perform setup at _run
time rather than immediately upon assembly.

Revision 1606 - (view) (download) (as text) - [select for diffs]
Modified Mon Jan 19 03:35:36 2004 UTC (20 years, 2 months ago) by pje
File length: 8656 byte(s)
Diff to previous 1591
Lots of 'peak.events' migration:

Added 'events.ISignalSource', that returns 'events.Broadcaster' objects for
signals.  This allows you to yield to signals in an 'events.Thread', or
safely set one-time callbacks on them.

'running.ISignalManager' is now DEPRECATED; please use
'events.ISignalSource' instead.

'running.IMainLoop' has been changed to use an 'events.IReadable' for
the 'lastActivity' attribute, and the 'setExitCode' and 'childForked'
methods have been replaced with an 'exitWith()' method.

The 'peak.running.mainLoop.signalHandler' property has been replaced with
'peak.running.mainLoop.stopOnSignals', which defaults to including SIGINT,
SIGTERM, and SIGBREAK.  If you need custom signal handling, please use
the event sources provided by an 'events.ISignalSource'.

'peak.running.process.ChildProcess' has been rewritten to use
'events.ISignalSource' and an 'events.Thread' to monitor SIGCHLD.  Removed
'checkStatus()' from the 'running.IProcessProxy' interface.

Made most event sources weak-referenceable.

Changed 'events.Thread' to keep a reference to an object it's yielding on,
so that "weak" events like signals and I/O events will hang around until
they call back to the thread.

Revision 1591 - (view) (download) (as text) - [select for diffs]
Modified Wed Jan 14 00:13:44 2004 UTC (20 years, 2 months ago) by pje
File length: 8701 byte(s)
Diff to previous 1590
Removed some more obsolete scheduling baggage.

Revision 1590 - (view) (download) (as text) - [select for diffs]
Modified Tue Jan 13 23:59:11 2004 UTC (20 years, 2 months ago) by pje
File length: 8805 byte(s)
Diff to previous 1577
Replaced scheduler of 'UntwistedReactor' with an 'events.Scheduler', so we
can begin to use time-based events and threads in reactor-driven apps.

Revision 1577 - (view) (download) (as text) - [select for diffs]
Modified Sun Dec 28 20:58:28 2003 UTC (20 years, 3 months ago) by pje
File length: 8681 byte(s)
Diff to previous 1562
First pass of 'logs' framework refactoring.  Highlights include:

 * Lots of new unit tests for logging.

 * Logs are now accessed via a 'logs.ILoggingService' instance.  The
   'logger:' URL scheme automatically accesses the nearest such service.
   For backward compatibility, the old 'peak.logs' namespace is still used
   to supply the actual loggers.  This will be gradually replaced with a
   plugin-based mechanism.

 * Log events don't use a positional 'message' argument any more, and
   loggers aren't responsible for interpolating message arguments any more.
   The new signature is 'Event(parent, msg=msg, args=args, ...)'.  Loggers
   also now tell events what logger name they are, via the 'ident' keyword.

 * The logging system now uses a property namespace, 'peak.logging.levels',
   to obtain log level names and values.  The various 'logs.LEVEL'
   constants are now DEPRECATED.  Please use the 'getLevelFor()' method of
   the nearest 'logs.ILoggingService' instead.  URL schemes such as
   'logfile:' also no longer convert their level names to numbers, since
   the level names are only meaningful in the context of a logging service.

 * Support for integration with the Python 2.3/PEP 282 logging module has
   been scaled back.  There are too many globalisms and dependencies there.
   When we add plugin-based log configuration, it should be possible to use
   the logging package's handlers and formatters with the PEAK logging
   services.  At that point, you'll be able to replace 'logging.getLogger'
   and 'logging.getLevelName' with the corresponding methods of a PEAK
   logging service, if you need to force non-PEAK packages to use PEAK's
   logging.

 * 'config.Namespace()' objects now have a 'keys()' method that can be used
   when the namespace is bound to a context component.  It returns a list
   of strings that may be used as keys for that namespace.  See
   'CHANGES.txt' for an example.

Revision 1562 - (view) (download) (as text) - [select for diffs]
Modified Wed Dec 24 22:44:15 2003 UTC (20 years, 3 months ago) by pje
File length: 8654 byte(s)
Diff to previous 1453
Partial implementation of the performance timer system described at:

  http://www.eby-sarna.com/pipermail/peak/2003-December/001020.html

It's missing the 'addListener()' function for the timer service, so you
can only add listeners directly to individual timers.  The actual
interfaces are also a bit different than what was originally proposed.
An exhaustive test suite is included, covering all of the implemented
behavior.  This draft implementation will probably get moved to Pyrex,
at least to create a a Timer base class with fast-path execution for
frequently called methods.  The goal is to have timer invocation be so
fast that leaving timers in production code isn't an issue.

(TODO: 'addListener()' for keys/wildcards, 'timer:' URL scheme, and
Pyrex port of Timer base.)

Revision 1453 - (view) (download) (as text) - [select for diffs]
Modified Fri Nov 21 19:04:57 2003 UTC (20 years, 4 months ago) by pje
File length: 8232 byte(s)
Diff to previous 1435
DEPRECATED 'peak.util.signal_stack'.  Instead, bind to a
'running.ISignalManager' and use its 'addHandler()/removeHandler()'
methods.  This has the same effect as 'pushSignals()' and 'popSignals()',
except that you do not have to remove handlers in the same order as you add
them, and *all* active handlers are invoked for a given signal that they
handle.

Added 'IBasicReactor.crash()', which forces an immediate reactor loop exit,
ignoring pending scheduled calls.  This required changing some tests,
because the precise moment of reactor termination is now different in some
scheduling scenarios.  Some changes were also made to task scheduling for
CGI programs to account for this.

Revision 1435 - (view) (download) (as text) - [select for diffs]
Modified Thu Oct 30 19:28:49 2003 UTC (20 years, 5 months ago) by pje
File length: 8183 byte(s)
Diff to previous 1402
Merged 'Fallback' and 'PropertySet' to create 'config.Namespace'.  Removed
'Fallback' and deprecated 'PropertySet'.

Revision 1402 - (view) (download) (as text) - [select for diffs]
Modified Tue Sep 30 23:04:33 2003 UTC (20 years, 6 months ago) by pje
File length: 8163 byte(s)
Diff to previous 1338
Removed all uses of deprecated binding APIs.

Revision 1338 - (view) (download) (as text) - [select for diffs]
Modified Fri Aug 15 19:39:06 2003 UTC (20 years, 7 months ago) by pje
File length: 8194 byte(s)
Diff to previous 1281
'peak.running.scheduler.MainLoop' now supports using a "signal manager"
component (via the 'peak.running.signalManager' property) to process signals
while a 'run()' loop is in progress.  Signal managers can also be added or
removed at any time via the new 'peak.util.signal_stack' module.

Also, fixed scheduler tests using an app object without a config root.

Revision 1281 - (view) (download) (as text) - [select for diffs]
Modified Mon Jul 28 22:02:45 2003 UTC (20 years, 8 months ago) by pje
File length: 8157 byte(s)
Diff to previous 1189
Use propertyMap.setValue() instead of duplicating its implementation.

Revision 1189 - (view) (download) (as text) - [select for diffs]
Modified Wed Jun 18 15:44:45 2003 UTC (20 years, 9 months ago) by pje
File length: 8134 byte(s)
Diff to previous 1055
The 'provides' keyword argument to various 'peak.binding' APIs has been
renamed to 'offerAs', and it must be a sequence of configuration keys.
(Previously, it accepted either a single key or a tuple of keys.)
The signature of 'binding.Constant()' was changed as well; the first
positional argument is now the constant value, and 'offerAs' is now a
keyword argument.  (Previously, 'provides' was the first positional
argument of 'binding.Constant()'.)  The 'registerProvider()' method of
'config.IConfigurable()' also now accepts only a single configuration key,
as does 'EigenRegistry.register()'.

Revision 1055 - (view) (download) (as text) - [select for diffs]
Modified Wed Apr 30 22:40:30 2003 UTC (20 years, 11 months ago) by pje
File length: 8131 byte(s)
Diff to previous 1054
Finished adding tests for daemons and schedulers.

Revision 1054 - (view) (download) (as text) - [select for diffs]
Modified Wed Apr 30 22:19:53 2003 UTC (20 years, 11 months ago) by pje
File length: 6715 byte(s)
Diff to previous 1053
More "root" cleanups.  'config.makeRoot()' can now take an 'iniFiles'
argument listing file paths (or '(modulename,filename)' tuples) to load;
it defaults to '[('peak','peak.ini')]', providing the default behavior we
know and love. :)

If you create a binding.Component with a parent of 'None', it will now
believe you and make itself a root.  The default value of parentComponent
is now 'NOT_GIVEN', so that if you don't specify a parent, the object will
be "undecided" until it really needs to know who its parent is (at which
point it will be 'None' if it hasn't been "adopted" in the meantime).
Interface docs and tests have been updated to reflect/take advantage of
this.  (Specifically, the tests used to use 'getParentComponent()' to force
a root to acknowledge its orphan status; now they can just *tell* it.)

Finally, I removed the use of weak references from the assembly events
system.  If you created an object, intending that it register itself with
some kind of registry, it could get GC'd before the assembly event kicked
in, unless you specifically held onto a reference until then.  Since
components that don't need assembly events don't register for them, it
seems harmless to use simple references rather than weak ones.

Revision 1053 - (view) (download) (as text) - [select for diffs]
Modified Wed Apr 30 21:27:13 2003 UTC (20 years, 11 months ago) by pje
File length: 6748 byte(s)
Diff to previous 1052
Replaced 'config.Application' class with 'config.makeRoot()' function.
(There's still a 'ConfigurationRoot' class behind the scenes, but it's no
longer part of the public API.)

Revision 1052 - (view) (download) (as text) - [select for diffs]
Modified Wed Apr 30 19:11:16 2003 UTC (20 years, 11 months ago) by pje
File length: 6771 byte(s)
Diff to previous 656
Added unit tests for daemons, reactor, and mainloop.  Fixed a problem with
missing 'priority' attribute on daemons.

Revision 656 - (view) (download) (as text) - [select for diffs]
Added Sun Nov 10 02:46:58 2002 UTC (21 years, 4 months ago) by pje
File length: 1518 byte(s)
Added [Load on demand] rules section, and made running.clusters use it.
Also added basic unit tests for peak.running.clusters.

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