Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1163

Show
Ignore:
Timestamp:
06/27/06 12:11:19
Author:
fumanchu
Message:

Renamed lib.encodings to lib.encoding to avoid shadowing the builtin.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cptools.py

    r1161 r1163  
    145145#                              Builtin tools                              # 
    146146 
    147 from cherrypy.lib import cptools, encodings, static 
     147from cherrypy.lib import cptools, encoding, static 
    148148from cherrypy.lib import sessions as _sessions, xmlrpc as _xmlrpc 
    149149from cherrypy.lib import caching as _caching, wsgiapp as _wsgiapp 
     
    294294default_toolbox.err_redirect = ErrorTool(cptools.redirect) 
    295295default_toolbox.etags = Tool('before_finalize', cptools.validate_etags) 
    296 default_toolbox.decode = Tool('before_main', encodings.decode) 
    297 default_toolbox.encode = Tool('before_finalize', encodings.encode) 
    298 default_toolbox.gzip = Tool('before_finalize', encodings.gzip) 
     296default_toolbox.decode = Tool('before_main', encoding.decode) 
     297default_toolbox.encode = Tool('before_finalize', encoding.encode) 
     298default_toolbox.gzip = Tool('before_finalize', encoding.gzip) 
    299299default_toolbox.staticdir = StaticDirTool(static.staticdir) 
    300300default_toolbox.staticfile = MainTool(static.staticfile) 
     
    305305 
    306306 
    307 del cptools, encodings, static 
     307del cptools, encoding, static 
  • trunk/cherrypy/lib/caching.py

    r1145 r1163  
    104104    # Ignore POST, PUT, DELETE. 
    105105    # See http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.10. 
    106     if cherrypy.request.method in cherrypy.config.get("tools.caching.invalid_methods", 
    107                                                       ("POST", "PUT", "DELETE")): 
     106    invalid = cherrypy.config.get("tools.caching.invalid_methods", 
     107                                  ("POST", "PUT", "DELETE")) 
     108    if cherrypy.request.method in invalid: 
    108109        cherrypy.request.cached = c = False 
    109110    else: 
  • trunk/cherrypy/lib/encoding.py

    r1145 r1163  
    66 
    77def decode(encoding=None, default_encoding='utf-8'): 
     8    """Decode cherrypy.request.params .""" 
    89    if not encoding: 
    910        ct = cherrypy.request.headers.elements("Content-Type") 

Hosted by WebFaction

Log in as guest/cpguest to create tickets