Chris McDonough
2011-07-10 7565006cf1f3b929d9ea54256214f3a39385936a
add info to changes.txt and whatsnew about pshell changes; removed unused import and unwrap string
4 files modified
48 ■■■■■ changed files
CHANGES.txt 24 ●●●●● patch | view | raw | blame | history
docs/narr/project.rst 2 ●●●●● patch | view | raw | blame | history
docs/whatsnew-1.1.rst 19 ●●●●● patch | view | raw | blame | history
pyramid/paster.py 3 ●●●● patch | view | raw | blame | history
CHANGES.txt
@@ -4,6 +4,21 @@
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 @@
- 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)
==================
docs/narr/project.rst
@@ -336,6 +336,8 @@
Press ``Ctrl-D`` to exit the interactive shell (or ``Ctrl-Z`` on Windows).
.. _extending_pshell:
Extending the Shell
~~~~~~~~~~~~~~~~~~~
docs/whatsnew-1.1.rst
@@ -94,6 +94,19 @@
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 @@
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
pyramid/paster.py
@@ -1,6 +1,5 @@
import ConfigParser
import os
import re
import sys
from code import interact
@@ -105,7 +104,7 @@
                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]