summaryrefslogtreecommitdiff
path: root/cherrypy/_cpengine.py
Commit message (Collapse)AuthorAgeFilesLines
* New pywebd module. Trunk is now "3.1alpha".Robert Brewer2007-03-051-380/+0
|
* New engine.release method, which decouples request and engine. Also new ↵Robert Brewer2007-02-011-10/+21
| | | | server.base method, which simplifies cherrypy.url. Finally, cherrypy._serving is promoted to cherrypy.serving, and has a new "load" method.
* Fix for #637 (Move signal handlers into Engine class).Robert Brewer2007-01-091-16/+42
|
* Moved checker back to cherrypy.checker from engine, and also added a new ↵Robert Brewer2006-12-281-4/+2
| | | | check_config_types method. There's also a new checker config namespace, so you can turn off the checker with "checker.on = False", or turn off specific methods with "checker.check_method_foo = None".
* checker:Robert Brewer2006-12-211-4/+4
| | | | | | 1. Moved cherrypy.checker to cherrypy.engine.checker so it can be set to None or another Checker instance in config. 2. Replaced Checker.checkall with {{{Checker.__call__}}}. 3. Fixed an output bug in check_compatibility.
* New cherrypy.checker which runs by default in development mode.Robert Brewer2006-12-201-0/+4
|
* New Engine.reexec_retry (timeout in seconds) for os.execv call.Robert Brewer2006-11-181-2/+8
|
* Fix for #581 (Problem Re-spawning on Mac OS X).Robert Brewer2006-11-181-1/+10
|
* Engine.stop was calling monitor_thread.cancel() but not .join(). ↵Robert Brewer2006-11-181-5/+14
| | | | Engine.monitor_thread is also now a PerpetualTimer, so it keeps the same thread rather than spawning new ones on each run.
* More default attributes for NotReady.Robert Brewer2006-09-271-0/+2
|
* docstring updates.Robert Brewer2006-09-151-3/+3
|
* Made NotReadyRequest default to throw_errors = True.Robert Brewer2006-09-121-0/+2
|
* Engine.drop_privileges: default umask to None.Robert Brewer2006-09-101-4/+2
|
* Engine.drop_privileges: bugfix and allow uid/gid to be names or ints.Robert Brewer2006-09-101-6/+20
|
* New engine.autoreload_match attribute for filtering autoreload to a single ↵Robert Brewer2006-09-061-9/+12
| | | | package (adapted from TG).
* Fixes to test_states.Robert Brewer2006-09-031-14/+7
|
* Oops.Robert Brewer2006-08-291-33/+0
|
* Fix for #428 (drop privileges).Robert Brewer2006-08-281-1/+47
|
* API and docstring cleanups:Robert Brewer2006-08-261-3/+3
| | | | | | | | 1. Removed WrongConfigValue, decorate, decorate_all, and ExposeItems. 2. Moved cherrypy.logtime to cherrypy.log.time. 3. Reduced cherrypy.config.globalconf back to just cherrypy.config. 4. Moved _cpconfig.default_conf to config.defaults. .
* Hook priority system:Robert Brewer2006-08-261-2/+2
| | | | | | | 1. All hook callbacks are now wrapped in an instance of _cprequest.Hook, where failsafe, priority, and kwargs are now stored. 2. Hooks are run in order of their "priority" attribute; lower numbers first. Default 50, range 0-100, floats OK. 2. cherrypy namespace: moved "serving" to "_serving", added cherrypy.Tool, changed "LogManager" to "_LogManager". 3. Set gzip.priority to 90.
* More (final?) config overhaul work:Robert Brewer2006-08-251-8/+9
| | | | | | | | | | 1. Removed cherrypy.config.get! Instead, you should directly inspect cherrypy.request, response, server, etc. Note that request.config.get still works fine. 2. a) cherrypy.log is now an instance of LogManager. It's still callable, but now is the object you inspect instead of calling config.get("log*"). b) cherrypy.log_access is now cherrypy.log.access. 3. All threads should now have access to default Request and Response objects, not just the main thread. 4. deadlock.timeout is now request.timeout. 5. Renamed config.py to _cpconfig.py; cherrypy.config is now an instance of _cpconfig.Config. I still need to decide what to do about log_config (removed for now).
* Overhaul of config system:Robert Brewer2006-08-241-6/+2
| | | | | | | | | | | | | | | | | 1. New docstring for config module! 2. Put all entries into a config namespace. New deadlock, log, request and response namespaces. 3. Request and response entries now directly modify attributes of cherrypy.request and .response, and consumer code looks up those attributes, not config. This also allows interactive inspection of defaults. 4. Removed 'log_config' config entry. Use engine.on_start_engine_list.append(config.log_config) instead. 5. Old 'dispatch' entry is now 'request.dispatch'. 6. New log entries: log.error.file, log.error.function, log.access.file, log.access.function, log.screen. 7. 'server.max_request_body_size' is now 'request.max_body_size'. 8. environments now only apply to globalconf. 9. The 'development' environment has been removed, since its settings were all the default anyway. 10. The 'embedded' environment has been removed, since it duplicates the 'production' environment now. 11. There's a new 'test_suite' environment. 12. Removed log_file_not_found (from static.py). Something still needs to be done to config.wrap, so it can take dotted names as kwarg keys.
* Fixed the HTTP/1.0 test suite. This involved moving wsgi SERVER_PROTOCOL ↵Robert Brewer2006-08-211-2/+4
| | | | back (to what the spec says!) and adding a new non-standard ACTUAL_SERVER_PROTOCOL entry.
* Engine.monitor_thread defaults to None now.Christian Wyglendowski2006-08-161-0/+2
| | | | This is in case an Exception is raised in an on_start_engine function and the code to start/stop the engine is wrapped in a try/finally, where Engine.stop is called in finally.
* Lots of mixedCase to lower_with_underscores.Robert Brewer2006-08-121-0/+33
|
* New deadlock monitor which sets Response.timed_out to True if Response.time ↵Robert Brewer2006-08-091-6/+29
| | | | < now - config.get("deadlock_timeout"). The request thread periodically checkes Response.timed_out and raises TimeoutError if it is True. Current checks are in HookMap.run, Request.respond, Body.__set__, and Response.finalize, more can be added later if needed.
* Giving NotReadyRequest a protocol attribute.Christian Wyglendowski2006-08-071-0/+1
|
* Replaced request.remote_addr, remote_port, and remote_host with a single ↵Robert Brewer2006-08-071-7/+5
| | | | "remote" attribute, an instance of lib.http.Host, which has "ip", "port" and "name" attributes. Added a similar request.local attribute. Changed request() signature to (local, remote, scheme). This allows requests run behind multiple HTTP servers to know the address info for their particular connection.
* WSGI-related changes:Robert Brewer2006-08-071-1/+1
| | | | | | | 1. Changed Request.run from request_line arg to deconstructed args: method, path, query_string, and protocol. 2. Moved HTTP protocol checking from _cprequest to _cpwsgiserver. What was cherrypy.response.version is now cherrypy.request.protocol (tuple form of SERVER_PROTOCOL). request.version and response.version attributes removed. _cpwsgiserver now writes out server.protocol, not SERVER_PROTOCOL (which is a misnomer, it really should have been REQUEST_PROTOCOL). 3. path unquoting was also moved from _cprequest to _cpwsgiserver (like most other WSGI servers). 4. New test for absoluteURI in the Request-Line.
* Fix for #438 (autoreload.py: Server fails to start if a .pyc is imported ↵Robert Brewer2006-08-051-8/+12
| | | | with no corresponding .py).
* silently disable signal handlers when running behind Apache (i.e. when ↵Robert Brewer2006-08-051-10/+13
| | | | "import _cprequest" is not done in the main thread).
* Oops. Windows doesn't have SIGHUP.Robert Brewer2006-08-051-5/+7
|
* Fix for #540.Robert Brewer2006-08-051-0/+11
|
* Merged the reexec branch. Autoreload now uses exec instead of spawn, and ↵Robert Brewer2006-07-191-33/+61
| | | | | | therefore never runs more than one process at a time. There's a new test for autoreload in test_states.py. The state-management for the HTTP server is a mess, by the way. I only got test_states' KeyboardInterrupt test working by inlining the client threads. So wait() and interrupts, etc. only really work when there's a single master thread. This needs fixed.
* Cleanup of cherrypy and cherrypy.config namespaces. Changed ↵Robert Brewer2006-07-021-2/+2
| | | | 'log_config_options' to 'log_config'. Moved cherrypy.set_config to cherrypy.config.wrap.
* Moved coverage out of the core.Robert Brewer2006-06-121-9/+0
|
* More unnecessary imports removed.Robert Brewer2006-06-121-1/+1
|
* Made Engine.stop check Engine.state. This allows e.g. mod_python to call ↵Robert Brewer2006-06-071-10/+11
| | | | stop() once per thread on shutdown.
* Removed cherrypy.NotReady. Instead, cherrypy.engine will return HTTP 503 ↵Robert Brewer2006-06-061-20/+31
| | | | Service Unavailable, and cherrypy.server will raise IOError.
* Comment improvements.Robert Brewer2006-05-191-1/+3
|
* Moved the profiler setup into _cprequest (so it's all in one place now).Robert Brewer2006-05-071-8/+1
|
* Root and config are now isolated per app:Robert Brewer2006-05-071-13/+1
| | | | | | | | | | | 1. object_path is now called path_info, and there's a new request.script_name attribute. This should equal the mount point of the current application. 2. cherrypy.root is gone, use cherrypy.request.app.root for now instead. Perhaps cherrypy.root will reappear and point to that. 3. cherrypy.tree.mount_points has been replaced with cherrypy.tree.apps, a dict of the form {script_name: Application(root, conf)}. 4. The [global] config namespace is now contained in a flat cherrypy.config.globalconf dict. 5. Got rid of handling favicon.ico and the "*" URI (although they may return someday). 6. Upshot is that e.g. test_objectmapping.py takes 1/3 the time as CP 2.2. 7. Moved request body size check into _cprequest from _cpwsgi. 8. Fixed lib/wsgiapp and made a tool for it.
* Moved the following config keys out of the "server." namespace (so that ↵Robert Brewer2006-05-071-2/+2
| | | | | | | | | | | | | | "server." may mean "httpserver"): * default_content_type * log_access_file * log_config_options * log_file * log_file_not_found * log_request_headers * log_to_screen * show_tracebacks * throw_errors
* Separated cherrypy.server (HTTP) from cherrypy.engine (app):Robert Brewer2006-05-041-41/+54
| | | | | | | | 1. Most CP apps must now make both a call to cherrypy.server.start(server=None) and a call to cherrypy.engine.start(blocking=True). 2. The on_start_server_list and on_stop_server_list are now on_start_engine_list and on_stop_engine_list. 3. "start_with_callback" is now an attribute of Engine. So is "request". 4. Server.start now takes a single "server" arg, which can be a server instance, a string (fully qualified class name), or None (to start the default WSGI server). 5. Server still has a wait method, but otherwise does no blocking.
* Removed a bunch of instances of the word "filter".Robert Brewer2006-04-251-3/+0
|
* CP 3 initial checkin. Global filters have been replaced by request.hooks. ↵Robert Brewer2006-04-211-7/+7
| | | | Lots of renaming and reorg of modules.
* New Engine.response_class attribute (which allows a new -null switch for ↵Robert Brewer2006-03-021-1/+2
| | | | benchmark.py, to show how much of the request is spent in the HTTP server as opposed to the Request object).
* server.stop() works now even if init_only is False.Robert Brewer2006-02-221-2/+2
|
* Another re-raise of SystemExit.Robert Brewer2006-02-201-0/+1
|
* Final fix for #461 and #455:Robert Brewer2006-02-141-0/+190
1. There's a new _cpengine module which isolates the "app server" from the "HTTP server" state-management logic. _cpserver.Server inherits from _cpengine.Engine. The _cpengine module should remain clean so that it can be used with few changes in CP 3, at which point we can rewrite the http server API. 2. Fixed an issue with the native HTTP server--it wasn't truly restartable (closed but didn't rebind on restart). 3. Server.start now takes a "server" arg (an instance of an HTTP server). Use it or server_class, not both. 4. Fixed _cpwsgiserver's handling of the URI: "*".