summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt24
-rw-r--r--docs/narr/project.rst2
-rw-r--r--docs/whatsnew-1.1.rst19
-rw-r--r--pyramid/paster.py3
4 files changed, 46 insertions, 2 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index ff4036036..ae8395234 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,21 @@ Next release
Features
--------
+- It is now possible to invoke ``paster pshell`` even if the paste ini file
+ section name pointed to in its argument is not actually a Pyramid WSGI
+ application. The shell will work in a degraded mode, and will warn the
+ user. See "The Interactive Shell" in the "Creating a Pyramid Project"
+ narrative documentation section.
+
+- ``paster pshell`` now offers more built-in global variables by default
+ (including ``app`` and ``settings``). See "The Interactive Shell" in the
+ "Creating a Pyramid Project" narrative documentation section.
+
+- It is now possible to add a ``[pshell]`` section to your application's .ini
+ configuration file, which influences the global names available to a pshell
+ session. See "Extending the Shell" in the "Creating a Pyramid Project"
+ narrative documentation chapter.
+
- The ``config.scan`` method has grown a ``**kw`` argument. ``kw`` argument
represents a set of keyword arguments to pass to the Venusian ``Scanner``
object created by Pyramid. (See the Venusian documentation for more
@@ -78,6 +93,15 @@ Documentation
- Added a section in the "Webob" chapter named "Dealing With A JSON-Encoded
Request Body" (usage of ``request.json_body``).
+Behavior Changes
+----------------
+
+- The ``paster pshell``, ``paster proutes``, and ``paster pviews`` commands
+ now take a single argument in the form ``/path/to/config.ini#sectionname``
+ rather than the previous 2-argument spelling ``/path/to/config.ini
+ sectionname``. ``#sectionname`` may be omitted, in which case ``#main`` is
+ assumed.
+
1.1a4 (2011-07-01)
==================
diff --git a/docs/narr/project.rst b/docs/narr/project.rst
index be673c370..ab7023561 100644
--- a/docs/narr/project.rst
+++ b/docs/narr/project.rst
@@ -336,6 +336,8 @@ development.ini#MyProject``).
Press ``Ctrl-D`` to exit the interactive shell (or ``Ctrl-Z`` on Windows).
+.. _extending_pshell:
+
Extending the Shell
~~~~~~~~~~~~~~~~~~~
diff --git a/docs/whatsnew-1.1.rst b/docs/whatsnew-1.1.rst
index a9df38a45..b249b0ba7 100644
--- a/docs/whatsnew-1.1.rst
+++ b/docs/whatsnew-1.1.rst
@@ -94,6 +94,19 @@ Default HTTP Exception View
Minor Feature Additions
-----------------------
+- It is now possible to invoke ``paster pshell`` even if the paste ini file
+ section name pointed to in its argument is not actually a Pyramid WSGI
+ application. The shell will work in a degraded mode, and will warn the
+ user. See "The Interactive Shell" in the "Creating a Pyramid Project"
+ narrative documentation section.
+
+- ``paster pshell`` now offers more built-in global variables by default
+ (including ``app`` and ``settings``). See :ref:`interactive_shell`.
+
+- It is now possible to add a ``[pshell]`` section to your application's .ini
+ configuration file, which influences the global names available to a pshell
+ session. See :ref:`extending_pshell`.
+
- The :meth:`pyramid.config.Configurator.scan` method has grown a ``**kw``
argument. ``kw`` argument represents a set of keyword arguments to pass to
the Venusian ``Scanner`` object created by Pyramid. (See the
@@ -295,6 +308,12 @@ Backwards Incompatibilities
Deprecations and Behavior Differences
-------------------------------------
+- The ``paster pshell``, ``paster proutes``, and ``paster pviews`` commands
+ now take a single argument in the form ``/path/to/config.ini#sectionname``
+ rather than the previous 2-argument spelling ``/path/to/config.ini
+ sectionname``. ``#sectionname`` may be omitted, in which case ``#main`` is
+ assumed.
+
- The default Mako renderer is now configured to escape all HTML in
expression tags. This is intended to help prevent XSS attacks caused by
rendering unsanitized input from users. To revert this behavior in user's
diff --git a/pyramid/paster.py b/pyramid/paster.py
index eabd12a1b..ad807d53f 100644
--- a/pyramid/paster.py
+++ b/pyramid/paster.py
@@ -1,6 +1,5 @@
import ConfigParser
import os
-import re
import sys
from code import interact
@@ -105,7 +104,7 @@ class PShellCommand(PCommand):
from IPython.Shell import IPShell
except ImportError:
IPShell = None
- cprt =('Type "help" for more information.')
+ cprt = 'Type "help" for more information.'
banner = "Python %s on %s\n%s" % (sys.version, sys.platform, cprt)
app_spec = self.args[0]
config_file = app_spec.split('#', 1)[0]