summaryrefslogtreecommitdiff
path: root/cherrypy/_cpmodpy.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove reliance on sixJason R. Coombs2018-09-021-3/+1
|
* Re-use logic from always_iterableJason R. Coombs2018-08-171-6/+4
|
* Use bytes literals where appropriatev14.0.0Jason R. Coombs2018-02-041-2/+2
|
* Alternatively, engine.subscribe now allows calling without a callback, in ↵Jason R. Coombs2017-10-291-1/+1
| | | | which case it creates the decorator.
* Add cherrypy.engine.subscribe for nicer, linter-friendly syntax when ↵Jason R. Coombs2017-10-291-1/+1
| | | | subscribing a callback.
* Feed the hobgoblins (delint).Jason R. Coombs2017-10-271-1/+1
|
* Replace iteritems with six usage.Jason R. Coombs2017-07-081-2/+4
|
* PEP8fy codebase: eliminated F821 flake8 errorSviatoslav Sydorenko2017-03-121-1/+3
| | | | | | | Also fix usage of undeclared variables inroduces in commits: * 9913ddbc3 * c4b693e11 * d3c9807ba
* Convert all strings to conform single-quoted styleSviatoslav Sydorenko2016-09-081-30/+30
| | | | pre-commit run double-quote-string-fixer --all-files
* Fix E402 in _cpmodpySviatoslav Sydorenko2016-09-081-3/+3
|
* Use the preferred name text_or_bytes to avoid conflation with 'basestring' ↵Jason R. Coombs2016-07-241-1/+1
| | | | which has no equivalent on Python 3.
* Remove StringIO and BytesIO from compatibility module and use io module ↵Jason R. Coombs2016-06-051-2/+3
| | | | directly.
* More PEP8 work.Gustavo Picon2014-01-121-5/+10
|
* More pep8 cleanupsGustavo Picon2014-01-121-5/+5
|
* Running: autopep8 -vvvvv -i `find . -name '*.py'`Gustavo Picon2014-01-121-11/+15
| | | | | --HG-- branch : autopep8
* Removed trailing whitespace from the codebase.Gustavo Picon2012-04-031-28/+28
| | | | sed -i '' -e 's/ *$//' `find cherrypy -name '*.py'`
* Fix for #1051 (mod_python 'NoneType' object is not subscriptable)Robert Brewer2011-07-051-1/+1
|
* Bye bye, py2/3.Robert Brewer2011-07-021-0/+344
|
* Bringing python3 back into trunk with its own py3 folder; what was in trunk ↵trunkRobert Brewer2011-02-251-333/+0
| | | | 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.
* Freeow. The magic cherrypy/_cpcompat.py module to take all our py3k fears away.Robert Brewer2011-02-241-9/+9
|
* Oops. Fix for buglet introduced in [2499].Robert Brewer2009-08-151-1/+1
|
* Fix for #881 (Support specifying multiple imports/function calls via ↵Robert Brewer2009-08-111-9/+10
| | | | PythonOption cherrypy.setup instead of just one.).
* Removed py3print.Robert Brewer2009-06-141-2/+4
|
* trunk - more changes to bring the two branches into a more similar state - ↵Lakin Wecker2009-06-011-2/+2
| | | | this time normalizing StringIO imports.
* trunk - Porting the cherrypy.lib.httputil name change. It'll be easier to ↵Lakin Wecker2009-05-311-3/+3
| | | | maintain two released branches if the modules are named the same. However, in the 2.6 branch we'll leave cherrypy.lib.http working and deprecate it for 3.3.
* Moved all bus plugins onto the engine object itself, and fixed a couple bus ↵Robert Brewer2008-06-241-15/+9
| | | | details along the way.
* Only call the _console_control_handler unsubscribe if the attribute is ↵Lakin Wecker2008-06-171-1/+2
| | | | available.
* mod_python: send bus messages to the apache log, plus cherrypy.setup arg now ↵Robert Brewer2008-04-051-6/+30
| | | | can take a bare module to import (without having to call a ::function).
* Fix for #751 (logging: Python file objects are not thread-safe). Whew. ↵Robert Brewer2007-11-141-1/+1
| | | | | | | | | Finally got all the bus operations where I want em: 1. There's a new EXITING state 2. bus.block() waits for EXITING now instead of STOPPED, and also wait for all threads to exit, so the main thread doesn't exit (and run atexit callbacks) too early. 3. bus.exit() no longer calls sys.exit. Instead, exit is used to signal the main thread to unblock and terminate normally. This means some callers of stop need(ed) to be changed to call exit instead. 4. bus.block() no longer takes a state arg; it's now only for use by the main thread. Call bus.wait(state) to wait for other states.
* Trunk fix for #752 (Return cherrypy.server to a single-server model):Robert Brewer2007-11-111-0/+1
| | | | | | | | | 1. Change restsrv.servers.ServerManager (multiple httpservers) to ServerAdapter (one httpserver). 2. cherrypy.server is now a subclass of ServerAdapter, and is subscribed by default. 3. Made several plugin methods idempotent that weren't before. 4. Added names to win32 bus state events. Also fixed a buglet in win32 block(). 5. Added repr to wspbus.states.State objects. 6. Did ''not'' change any callers of cherrypy.server other than what was necessary, to help prove the fixes work without breaking compatibility. Future changesets will be used to modify docs and tutorials n such.
* Fix to cpmodpy for latest Bus, plus some test fixes for mod_python runs.Robert Brewer2007-10-281-3/+1
|
* Fix for #740 (Default server.socket_host to IPv4 address).Robert Brewer2007-10-261-1/+1
|
* restsrv changes:Robert Brewer2007-06-241-2/+3
| | | | | | | | | | | | 1. Renamed base.Engine to wspbus.Bus and made it generally useful in isolation. 2. Renamed 'reexec' channel to 'restart'. 3. Merged engine.wait into bus.block. The block method now takes an optional 'state' arg. 4. Made the SignalHandler auto-register some signals on init. 5. Added win32events for all states. 6. Made all states into sentinels instead of ints. New wspbus.states (and bus.states) enums. 7. Added an 'exit' channel. 8. The stop event now publishes even if state is already STOPPED. 9. Added a Bus instance to wspbus (instead of restsrv init).
* Fixes to cpmodpy to allow streaming and guarantee running on_end_request hooks.Robert Brewer2007-06-241-36/+44
|
* cpmodpy fix for get_serving bugs.Robert Brewer2007-06-231-3/+4
|
* Doc updates.Robert Brewer2007-05-021-1/+7
|
* New pywebd module. Trunk is now "3.1alpha".Robert Brewer2007-03-051-9/+7
|
* New engine.release method, which decouples request and engine. Also new ↵Robert Brewer2007-02-011-2/+2
| | | | server.base method, which simplifies cherrypy.url. Finally, cherrypy._serving is promoted to cherrypy.serving, and has a new "load" method.
* InternalRedirect changes:Robert Brewer2006-11-171-9/+43
| | | | | | | | | | | 1. Moved InternalRedirect out of the Request object, so that an IR creates a separate Request object per redirect. This makes the design of hooks and tools (both builtin and user-defined) much simpler and safer. 2. New _cpwsgi.InternalRedirector for the WSGI implementation. Users who do not use InternalRedirects at all can remove this from the wsgi pipeline if they wish. 3. InternalRedirect trap implemented in _cpmodpy.py 4. Custom servers/gateways will have to write their own handling for InternalRedirect being thrown from request.run. 5. Request.redirections (a list of URL's) removed in favor of request.prev, which points to the previous Request object in a redirection chain. Defaults to None. 6. Replace "request.recursive" (per request) with "wsgi.iredir.recursive" (per app). 7. Removed Request.body_read and .headers_read. 8. New Request.throws tuple of exceptions which should not be trapped.
* Updated docstring with a basic example on how to use the _cpmodpy moduleSylvain Hellegouarch2006-10-091-1/+59
|
* Fix for #535 (Apache re-processes Range headers). _cpmodpy now uses a new ↵Robert Brewer2006-09-021-1/+4
| | | | "ignore_headers(['Range'])" Tool by default.
* Overhaul of config system:Robert Brewer2006-08-241-1/+1
| | | | | | | | | | | | | | | | | 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 #553 (pure WSGI apps on the tree). Request.app now MUST be a ↵Robert Brewer2006-08-211-8/+14
| | | | cherrypy.Application instance (not None) before Request.run() is called.
* Moved some Apache control code from benchmark to _cpmodpy, where it can be ↵Robert Brewer2006-08-181-1/+77
| | | | more useful.
* Lots of mixedCase to lower_with_underscores.Robert Brewer2006-08-121-3/+3
|
* Replaced request.remote_addr, remote_port, and remote_host with a single ↵Robert Brewer2006-08-071-3/+7
| | | | "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-2/+2
| | | | | | | 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.
* Added bare_error trap in _cpmodpy (which fixes some failing tests). Also ↵Robert Brewer2006-06-251-14/+13
| | | | dropped redundant cookie logic in _cpmodpy.
* Much Better Logging (see #256). Apps now have their own access and error ↵Robert Brewer2006-06-251-1/+1
| | | | loggers (whose config entries must be at "/"), and the global access logger has been removed (although you can make one manually if you like).
* Fix for mp < 3.1 which didn't have apache.mpm_query.Robert Brewer2006-06-201-3/+28
|