summaryrefslogtreecommitdiff
path: root/cherrypy/config.py
Commit message (Collapse)AuthorAgeFilesLines
* More (final?) config overhaul work:Robert Brewer2006-08-251-328/+0
| | | | | | | | | | 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-38/+122
| | | | | | | | | | | | | | | | | 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.
* Fix for #551 (_cpwsgiserver should handle persistent connections). All of CP ↵Robert Brewer2006-08-201-1/+1
| | | | should now default to HTTP/1.1. Some tests still need to be written, and 1.0 support reviewed throughout, but the basics work.
* Lots of mixedCase to lower_with_underscores.Robert Brewer2006-08-121-2/+2
|
* Fixed missing access log for global configurationSylvain Hellegouarch2006-08-111-0/+1
|
* New server.socket_timeout config entry, thanks to Albert Visagie. See ↵Robert Brewer2006-08-071-2/+3
| | | | http://groups.google.com/group/cherrypy-devel/browse_frm/thread/ef761a8063cdc72b
* Merged the reexec branch. Autoreload now uses exec instead of spawn, and ↵Robert Brewer2006-07-191-4/+5
| | | | | | 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.
* Various speedups, the only notable one being that environments are now ↵Robert Brewer2006-07-111-9/+19
| | | | always flattened as soon as possible.
* Cleanup of cherrypy and cherrypy.config namespaces. Changed ↵Robert Brewer2006-07-021-49/+61
| | | | 'log_config_options' to 'log_config'. Moved cherrypy.set_config to cherrypy.config.wrap.
* Much Better Logging (see #256). Apps now have their own access and error ↵Robert Brewer2006-06-251-2/+48
| | | | loggers (whose config entries must be at "/"), and the global access logger has been removed (although you can make one manually if you like).
* Made cherrypy.request and .response more sef-documenting by populating their ↵Robert Brewer2006-06-191-0/+2
| | | | attribute dicts outside a request.
* Renamed httptools to "http" to reduce confusion with new cherrypy.tools. ↵Robert Brewer2006-06-121-2/+2
| | | | Moved non-Tool-related code from cptools to {{{lib/__init__}}}. Added docstrings.
* Fix for #502 (log errors by default).Robert Brewer2006-06-051-1/+3
|
* Bah. I knew I had config.merge in there for a reason.Robert Brewer2006-05-101-0/+13
|
* Dispatch and config lookup now happens as early as possible, once per ↵Robert Brewer2006-05-101-94/+0
| | | | request (unless InternalRedirect is raised). Also moved the logging code out of {{{_cputil}}} and into {{{__init__}}}. xmlrpc still needs fixed so it doesn't re-write path_info.
* Moved log_access to a config entry.Robert Brewer2006-05-071-2/+1
|
* Root and config are now isolated per app:Robert Brewer2006-05-071-147/+98
| | | | | | | | | | | 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-17/+17
| | | | | | | | | | | | | | "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
* Fixed bug in request_config_section.Robert Brewer2006-05-021-1/+2
|
* Objects on the CP tree may now possess a _cp_config attribute, which ↵Robert Brewer2006-05-011-16/+72
| | | | replaces _cp_tools, _cp_on_error, and _cp_filters. The Request object now keeps its own 'config' attribute (recalculated whenever object_path changes) which mixes _cp_config settings with settings in cherrypy.config. Every tool now has a merged_args method, which is used to pass arguments to the wrapped callable.
* Lots of changes to error and log handling:Robert Brewer2006-05-011-3/+1
| | | | | | | | | | | 1. Removed RequestHandled and InternalError. 2. Error response is now overridable by replacing request.error_response. Tools should do this in setup(). 3. New request.log_access attribute. 4. Moved response.handleError to request.handle_error. 5. Logging of tracebacks and request headers are now tools. 6. New ErrorRedirect tool class. 7. Tools may now be anonymous (not necessary to be placed in tools module globals). 8. Continued the move to lower_with_underscores.
* test_core works again.Robert Brewer2006-04-251-0/+19
| | | | | | | 1. I'll look at replacing _cp_on_error with Tools some other day. 2. Moved the HookMap into tools.py. 3. New config.current_config function. 4. static.serve_file now sets body even if not modified_since.
* Fluff.Robert Brewer2006-04-221-1/+1
|
* Fixed xmlrpc tool and test. Plus:Robert Brewer2006-04-221-2/+2
| | | | | | | 1. 'path' arg is now required when calling dispatchers. 2. fixed default favicon declaration of staticfile. 3. missing import in lib/static. 4. fixed test_combinedfilters.py
* CP 3 initial checkin. Global filters have been replaced by request.hooks. ↵Robert Brewer2006-04-211-75/+15
| | | | Lots of renaming and reorg of modules.
* Addresses #480.Christian Wyglendowski2006-03-101-0/+6
| | | | | | init_only can now be set in the config (server.init_only). server.class already existed. server.instance can also be set in the config. It corresponds to the "server" parameter in the cherrypy.server.start() method. Also added "embedded" server environment to simplify running CP embedded in mod_python, FastCGI, another WSGI server, etc.
* Fix for #427 (Use RawConfigParser instead of ConfigParser).Robert Brewer2006-03-041-2/+2
|
* server.thread_pool now defaults to 10.Robert Brewer2006-03-031-1/+1
|
* Added "cherrypy.lowercase_api" switch so that users can say "I'm using the ↵Remi Delon2006-01-271-14/+31
| | | | new lowercase API" and get a (small) speed boost from it.
* Removed redundant test for favicon.Robert Brewer2006-01-051-1/+1
|
* Fix for #145. See the ticket for details about this fix.Robert Brewer2006-01-031-2/+12
|
* Fix for #416. The default favicon.ico is now served by a default ↵Remi Delon2005-12-291-0/+5
| | | | static_filter entry in the default config (much cleaner than making a special case for favicon.ico in the code).
* More PEP 8 (including objectPath -> object_path); Changed virtualhostfilter ↵Remi Delon2005-12-281-3/+3
| | | | to conform to PEP8; Fixes to sessionauthenticatefilter
* Made helper custom error handler backward-compatible from 2.2 to 2.1.Robert Brewer2005-12-171-2/+1
|
* Big change: camelCase to lower_with_underscore names (still need to update ↵Remi Delon2005-12-031-53/+66
| | | | the book)
* Got rid of some superfluous custom exceptions.Robert Brewer2005-11-261-2/+4
|
* Logging of request headers:Robert Brewer2005-11-121-4/+7
| | | | | | 1. Changed "showRequestHeaders" to "logRequestHeaders". 2. Moved header logic from _cpLogMessage (which is not just for errors) to _cpOnHTTPError. 3. Added "logTracebacks" and "logRequestHeaders" to _cputil.outputConfigMap.
* Moved the code handling OPTIONS * request to _cputil to a special function ↵Sylvain Hellegouarch2005-11-121-0/+3
| | | | | | attribute called _cpGlobalInformation. Added support for printing the HTTP request headers when an error is logged. This can be controlled via server.showRequestHeaders in the config settings.
* Moved filter-handling code into lib.filter.__init__.py. Also moved unrepr ↵Robert Brewer2005-11-101-5/+5
| | | | and modules(), attributes() functions into cptools.
* Fix for #374 (reduce license boilerplate to a single LICENSE.txt file).Robert Brewer2005-10-311-31/+1
|
* Fix for #356 (formalize server.environment as a set of config defaults). New ↵Robert Brewer2005-10-311-52/+73
| | | | server.logFileNotFound boolean.
* Fix for #373 (arbitrary mount points, or "virtual roots"). All internal use ↵Robert Brewer2005-10-291-4/+4
| | | | of request.path has been changed to inspect request.objectPath instead (the "rewritten path"). The request.path should never be rewritten; instead, it should only be used to generate new URL's based on the original path. The request.originalPath attribute can now probably be deprecated.
* 1. Fix for #305 (produce an error if a custom error page file can not be ↵Robert Brewer2005-09-291-1/+0
| | | | | | | | opened). 2. Also, a fix in _cputil.getErrorPage, where messages (and other kwargs set to None) were not printing defaults. 3. Removed defunct "server.httpErrors" config entry.
* Implemented ticket #90 (still need to write docs though)Remi Delon2005-09-111-9/+8
|
* httperrors branch merged into the trunk, the configuration paramater ↵Michael Robinson2005-09-041-0/+1
| | | | "showTracebacks" is now "server.showTracebacks"
* The maximum size of a post body can know be limited using ↵Michael Robinson2005-09-021-0/+2
| | | | sever.maxRequestSize, this does not test the header size! (yet)
* For config.py make first line of docstrings a one-line summary; needed for ↵kmierle2005-08-271-17/+12
| | | | somoe python editors.
* Minor docstring improvements to config.py. All public config.py functions ↵kmierle2005-08-271-11/+21
| | | | now have docstrings.
* Bug in config-file parsing: needed try/finally: close block.Robert Brewer2005-08-271-2/+4
|
* All raised exceptions now conform to "raise Exception([arg])" syntax (no ↵Robert Brewer2005-08-261-1/+1
| | | | more "raise Exception" or "raise Exception, arg". See http://mail.python.org/pipermail/python-dev/2005-August/055687.html for Guido's pronouncement, which is now part of PEP 8.