| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
pre-commit run double-quote-string-fixer --all-files
|
| |
|
| |
|
|
|
|
| |
by invoking a loader on the server itself). Remove test-specific code from the tutorials.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
--HG--
branch : autopep8
|
|
|
|
|
|
|
| |
are elided from otherwise blank lines in the source.
--HG--
branch : cherrypy-3.2.x
|
|
|
|
|
|
|
| |
sed -i '' -e 's/ *$//' `find cherrypy -name '*.py'`
--HG--
branch : cherrypy-3.2.x
|
| |
|
|
|
|
| |
goes in the py2 folder, and we can use a single setup.py to install either, depending on the version of Python that runs setup.py install.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
much coverage and profiling (handled by nose) and lets you focus on writing tests.
The biggest changes that have to be done in the tests classes is you have to put the "setup_server" method on the class(es) that need them when running. If you need it for multiple classes, you can use staticmethod() to attach it to multiple classes without using inheritance.
|
| |
|
|
|
|
| |
Moved setup_server() call out of individual tests and into helper.py. Added a new test for per-handler max_request_body_size shenanigans.
|
| |
|
|
|
|
| |
for the patch.
|
|
|
|
| |
implemented yet for PG, Memcached.
|
|
|
|
|
|
|
|
| |
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. 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.
|
| |
|
|
|
|
|
|
|
|
|
| |
1. cherrypy.Application is now a WSGI callable.
2. cherrypy.tree may now be used as a WSGI dispatcher by simply calling it. This replaces the _cpwsgi.wsgiApp function.
3. You may now mount arbitrary WSGI apps using tree.graft(wsgi callable, script name).
4. If you set an Application object's script_name to None, it will try to pull script_name from cherrypy.request.wsgi_environ['SCRIPT_NAME'].
There's a new test_wsgiapps.py (copied from the branch) which helps demonstrate the changes.
|
|
|
|
| |
coming in a separate changeset.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
(tutorial test failure).
|
| |
|
|
|
|
| |
the book)
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. server.start now MUST be called from the main thread, or restart and interrupts won't work. You can stop and restart CherryPy safely now with the server.stop and server.restart methods. However, stop() only suspends the process; if you want to shut down the CP process, raise SystemExit or KeyboardInterrupt. If you need to do so in your own threads, set cherrypy._interrupt to an instance of one of those exceptions.
2. New cherrypy._httpserverclass attribute, so that threads can wait for the HTTP server to truly start.
3. server.start() now defaults serverClass to _missing, so if you were using None to get the WSGIServer, switch to _missing.
4. server has some new methods: start_app_server, start_http_server, stop_http_server, stop_app_server.
5. There's also a new start_with_callback function, so you don't have to code the threading yourself if you want to start the server but run another task in a new thread.
6. test/helper.py doesn't have startServer/stopServer methods anymore. Just call server.start/stop instead.
|
| |
|