Commits

Jason R. Coombs committed 48ec086 Merge

Merged in chris.beelby/cherrypy (pull request #18: Small Fixes)

Comments (0)

Files changed (5)

cherrypy/_cpconfig.py

 
     def _apply(self, config):
         """Update self from a dict."""
-        if isinstance(config.get("global", None), dict):
+        if isinstance(config.get("global"), dict):
             if len(config) > 1:
                 cherrypy.checker.global_config_contained_paths = True
             config = config["global"]
 
 Config.environments = environments = {
     "staging": {
-        'engine.autoreload_on': False,
+        'engine.autoreload.on': False,
         'checker.on': False,
         'tools.log_headers.on': False,
         'request.show_tracebacks': False,
         'request.show_mismatched_params': False,
         },
     "production": {
-        'engine.autoreload_on': False,
+        'engine.autoreload.on': False,
         'checker.on': False,
         'tools.log_headers.on': False,
         'request.show_tracebacks': False,
         },
     "embedded": {
         # For use with CherryPy embedded in another deployment stack.
-        'engine.autoreload_on': False,
+        'engine.autoreload.on': False,
         'checker.on': False,
         'tools.log_headers.on': False,
         'request.show_tracebacks': False,
         'engine.SIGTERM': None,
         },
     "test_suite": {
-        'engine.autoreload_on': False,
+        'engine.autoreload.on': False,
         'checker.on': False,
         'tools.log_headers.on': False,
         'request.show_tracebacks': True,
 def _engine_namespace_handler(k, v):
     """Backward compatibility handler for the "engine" namespace."""
     engine = cherrypy.engine
+
+    deprecated = {'autoreload_on': 'autoreload.on', 'autoreload_frequency': 'autoreload.frequency',
+        'autoreload_match': 'autoreload.match', 'reload_files': 'autoreload.files',
+        'deadlock_poll_freq': 'timeout_monitor.frequency'}
+
+    if k in deprecated:
+        engine.log('WARNING: Use of engine.%s is deprecated and will be removed in '
+            'a future version. Use engine.%s instead.' % (k, deprecated[k]))
+
     if k == 'autoreload_on':
         if v:
             engine.autoreload.subscribe()

cherrypy/process/servers.py

 
     cherrypy.tree.mount(HelloWorld())
     # CherryPy autoreload must be disabled for the flup server to work
-    cherrypy.config.update({'engine.autoreload_on':False})
+    cherrypy.config.update({'engine.autoreload.on':False})
 
 Then run :doc:`/deployguide/cherryd` with the '-f' arg::
 

cherrypy/test/test_config.py

             'request.show_tracebacks': True,
             'log.screen': False,
             'environment': 'test_suite',
-            'engine.autoreload_on': False,
+            'engine.autoreload.on': False,
             # From global config
             'luxuryyacht': 'throatwobblermangrove',
             # From Root._cp_config

sphinx/source/concepts/config.rst

             'tools.trailing_slash.on': False,
         }
     }
-    cherrypy.tree.mount(Root(), "/", config=config)
+    cherrypy.tree.mount(Root(), config=config)
 
-CherryPy doesn't use any sections that don't start with ``"/"`` (except
+CherryPy only uses sections that start with ``"/"`` (except
 ``[global]``, see below). That means you can place your own configuration
 entries in a CherryPy config file by giving them a section name which does not
 start with ``"/"``. For example, you might include database entries like this::
                             })
 
     # Mount each app and pass it its own config
-    cherrypy.tree.mount(root1, "/", appconf1)
+    cherrypy.tree.mount(root1, "", appconf1)
     cherrypy.tree.mount(root2, "/forum", appconf2)
     cherrypy.tree.mount(root3, "/blog", appconf3)
 

sphinx/source/refman/_cpreqbody.rst

 
 .. autofunction:: process_multipart_form_data
 
-.. autofunction:: process_multipart
-
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.