| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
server.base method, which simplifies cherrypy.url. Finally, cherrypy._serving is promoted to cherrypy.serving, and has a new "load" method.
|
| |
|
|
|
|
| |
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".
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
Engine.monitor_thread is also now a PerpetualTimer, so it keeps the same thread rather than spawning new ones on each run.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
package (adapted from TG).
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
back (to what the spec says!) and adding a new non-standard ACTUAL_SERVER_PROTOCOL entry.
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
< 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.
|
| |
|
|
|
|
| |
"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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
with no corresponding .py).
|
|
|
|
| |
"import _cprequest" is not done in the main thread).
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
'log_config_options' to 'log_config'. Moved cherrypy.set_config to cherrypy.config.wrap.
|
| |
|
| |
|
|
|
|
| |
stop() once per thread on shutdown.
|
|
|
|
| |
Service Unavailable, and cherrypy.server will raise IOError.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"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
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Lots of renaming and reorg of modules.
|
|
|
|
| |
benchmark.py, to show how much of the request is spent in the HTTP server as opposed to the Request object).
|
| |
|
| |
|
|
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: "*".
|