summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2010-10-29 16:57:28 -0400
committerChris McDonough <chrism@plope.com>2010-10-29 16:57:28 -0400
commit6a3184b3e02015ac3349d87c1f96a68827b47990 (patch)
tree052c1fa688ddc4319be38123237177b7e93dca80
parentbba6d8bd106b39a617a637726cb2e0cc065cf5b8 (diff)
downloadpyramid-6a3184b3e02015ac3349d87c1f96a68827b47990.tar.gz
pyramid-6a3184b3e02015ac3349d87c1f96a68827b47990.tar.bz2
pyramid-6a3184b3e02015ac3349d87c1f96a68827b47990.zip
- The ``bfgshell`` paster command is now named ``pshell``.
-rw-r--r--CHANGES.txt6
-rw-r--r--docs/narr/project.rst40
-rw-r--r--docs/tutorials/catalog/index.rst6
-rw-r--r--docs/tutorials/zeo/index.rst4
-rw-r--r--pyramid/paster.py12
-rw-r--r--pyramid/tests/test_paster.py8
-rw-r--r--setup.py2
7 files changed, 43 insertions, 35 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 8d3bfe3a0..a48e3556d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -42,6 +42,9 @@ Features (delta from BFG 1.3.X)
paster templates. An import of ``pyramid.view.bfg_view``, however,
will continue to work "forever".
+- New API methods in ``pyramid.session``: ``signed_serialize`` and
+ ``signed_deserialize``.
+
Documentation (delta from BFG 1.3)
-----------------------------------
@@ -81,3 +84,6 @@ Backwards Incompatibilities (with BFG 1.3.X)
- The literal pattern ``{<anything>}`` is no longer permitted in route
patterns (due to the addition of squiggly route pattern syntax
support).
+
+- The ``bfgshell`` paster command is now named ``pshell``.
+
diff --git a/docs/narr/project.rst b/docs/narr/project.rst
index f88496fcc..4e140709c 100644
--- a/docs/narr/project.rst
+++ b/docs/narr/project.rst
@@ -117,7 +117,7 @@ project we name ``MyProject``:
$ bin/paster create -t pyramid_starter
Selected and implied templates:
- pyramid#bfg pyramid starter project
+ pyramid#pyramid_starter pyramid starter project
Enter project name: MyProject
Variables:
@@ -223,18 +223,18 @@ the ``pyramid_starter`` template, a single sample test exists.
.. index::
single: interactive shell
single: IPython
- single: paster bfgshell
+ single: paster pshell
The Interactive Shell
---------------------
Once you've installed your program for development using ``setup.py
develop``, you can use an interactive Python shell to examine your
-:mod:`pyramid` application :term:`model` and :term:`view` objects
-from a Python prompt. To do so, use the ``paster`` shell command with
-the ``bfgshell`` argument:
+:mod:`pyramid` application :term:`model` and :term:`view` objects from
+a Python prompt. To do so, use the ``paster`` shell command with the
+``pshell`` argument:
-The first argument to ``bfgshell`` is the path to your application's
+The first argument to ``pshell`` is the path to your application's
``.ini`` file. The second is the section name inside the ``.ini``
file which points to your *application* as opposed to any other
section within the ``.ini`` file. For example, if your application
@@ -256,37 +256,37 @@ the name ``main`` as a section name:
.. code-block:: text
- [chrism@vitaminf bfgshellenv]$ ../bin/paster --plugin=pyramid bfgshell \
- MyProject.ini main
+ [chrism@vitaminf shellenv]$ ../bin/paster --plugin=pyramid \
+ pshell MyProject.ini main
Python 2.4.5 (#1, Aug 29 2008, 12:27:37)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
- Type "help" for more information. "root" is the BFG app root object.
+ Type "help" for more information. "root" is the Pyramid app root object.
>>> root
<foo.models.MyModel object at 0x445270>
.. note:: You *might* get away without passing
- ``--plugin=pyramid`` to the bfgshell command.
+ ``--plugin=pyramid`` to the ``pshell`` command.
If you have `IPython <http://en.wikipedia.org/wiki/IPython>`_
installed in the interpreter you use to invoke the ``paster`` command,
-the ``bfgshell`` command will use an IPython interactive shell instead
+the ``pshell`` command will use an IPython interactive shell instead
of a standard Python interpreter shell. If you don't want this to
happen, even if you have IPython installed, you can pass the
-``--disable-ipython`` flag to the ``bfgshell`` command to use a
-standard Python interpreter shell unconditionally.
+``--disable-ipython`` flag to the ``pshell`` command to use a standard
+Python interpreter shell unconditionally.
.. code-block:: text
- [chrism@vitaminf bfgshellenv]$ ../bin/paster --plugin=pyramid bfgshell \
+ [chrism@vitaminf shellenv]$ ../bin/paster --plugin=pyramid pshell \
--disable-ipython MyProject.ini main
You should always use a section name argument that refers to the
actual ``app`` section within the Paste configuration file that points
-at your :mod:`pyramid` application *without any middleware
-wrapping*. In particular, a section name is inappropriate as the
-second argument to "bfgshell" if the configuration section it names is
-a ``pipeline`` rather than an ``app``. For example, if you have the
-following ``.ini`` file content:
+at your :mod:`pyramid` application *without any middleware wrapping*.
+In particular, a section name is inappropriate as the second argument
+to ``pshell`` if the configuration section it names is a ``pipeline``
+rather than an ``app``. For example, if you have the following
+``.ini`` file content:
.. code-block:: ini
:linenos:
@@ -307,7 +307,7 @@ The command you use to invoke the interactive shell should be:
.. code-block:: text
- [chrism@vitaminf bfgshellenv]$ ../bin/paster --plugin=pyramid bfgshell \
+ [chrism@vitaminf shellenv]$ ../bin/paster --plugin=pyramid pshell \
MyProject.ini myapp
If you use ``main`` as the section name argument instead of ``myapp``
diff --git a/docs/tutorials/catalog/index.rst b/docs/tutorials/catalog/index.rst
index 424286bd9..e4f6fe70e 100644
--- a/docs/tutorials/catalog/index.rst
+++ b/docs/tutorials/catalog/index.rst
@@ -78,12 +78,12 @@ want the application to be based on :term:`traversal`.
return root['site']
#. We'll demonstrate how you might interact with a catalog from code
- by manipulating the database directly using the ``bfgshell``
+ by manipulating the database directly using the ``pshell``
command in a terminal window:
.. code-block:: text
- [chrism@snowpro sess]$ ../bin/paster --plugin=pyramid bfgshell \
+ [chrism@snowpro sess]$ ../bin/paster --plugin=pyramid pshell \
myapp.ini myapp
Python 2.5.4 (r254:67916, Sep 4 2009, 02:12:16)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
@@ -103,7 +103,7 @@ As you need them, add other indexes required by your application to
the catalog by modifying the ``update_indexes`` method of the ``Site``
object. Whenever an index is added or removed, invoke the
``update_indexes`` method of the site (the root object) from a script
-or from within a ``bfgshell`` session to update the set of indexes
+or from within a ``pshell`` session to update the set of indexes
used by your application.
In :term:`view` code, you should be able to get a hold of the root
diff --git a/docs/tutorials/zeo/index.rst b/docs/tutorials/zeo/index.rst
index 1f6d1dac3..2e9d4aa2f 100644
--- a/docs/tutorials/zeo/index.rst
+++ b/docs/tutorials/zeo/index.rst
@@ -218,13 +218,13 @@ Running
about the application has changed.
#. You can manipulate the database directly (even when the
- application's HTTP server is running) by using the ``bfgshell``
+ application's HTTP server is running) by using the ``pshell``
command in a third terminal window:
.. code-block:: text
:linenos:
- [chrism@snowpro sess]$ ../bin/paster --plugin=pyramid bfgshell \
+ [chrism@snowpro sess]$ ../bin/paster --plugin=pyramid pshell \
myapp.ini myapp
Python 2.5.4 (r254:67916, Sep 4 2009, 02:12:16)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
diff --git a/pyramid/paster.py b/pyramid/paster.py
index 1a0e3f6cb..a1e895fcf 100644
--- a/pyramid/paster.py
+++ b/pyramid/paster.py
@@ -53,7 +53,7 @@ def get_app(config_file, name, loadapp=loadapp):
return app
_marker = object()
-class BFGShellCommand(Command):
+class PShellCommand(Command):
"""Open an interactive shell with a :mod:`pyramid` app loaded.
This command accepts two positional arguments:
@@ -66,11 +66,11 @@ class BFGShellCommand(Command):
Example::
- $ paster bfgshell myapp.ini main
+ $ paster pshell myapp.ini main
.. note:: You should use a ``section_name`` that refers to the
actual ``app`` section in the config file that points at
- your BFG app without any middleware wrapping, or this
+ your Pyramid app without any middleware wrapping, or this
command will almost certainly fail.
"""
@@ -78,7 +78,7 @@ class BFGShellCommand(Command):
min_args = 2
max_args = 2
- group_name = 'bfg'
+ group_name = 'pyramid'
parser = Command.standard_parser(simulate=True)
parser.add_option('-d', '--disable-ipython',
@@ -104,7 +104,7 @@ class BFGShellCommand(Command):
from IPython.Shell import IPShell
except ImportError: #pragma no cover
IPShell = None
- cprt =('Type "help" for more information. "root" is the BFG app '
+ cprt =('Type "help" for more information. "root" is the Pyramid app '
'root object.')
banner = "Python %s on %s\n%s" % (sys.version, sys.platform, cprt)
config_file, section_name = self.args
@@ -123,3 +123,5 @@ class BFGShellCommand(Command):
self.interact[0](banner, local={'root':root})
finally:
closer()
+
+BFGShellCommand = PShellCommand # b/w compat forever
diff --git a/pyramid/tests/test_paster.py b/pyramid/tests/test_paster.py
index 69976e3b8..3c13a0ef0 100644
--- a/pyramid/tests/test_paster.py
+++ b/pyramid/tests/test_paster.py
@@ -1,12 +1,12 @@
import unittest
-class TestBFGShellCommand(unittest.TestCase):
+class TestPShellCommand(unittest.TestCase):
def _getTargetClass(self):
- from pyramid.paster import BFGShellCommand
- return BFGShellCommand
+ from pyramid.paster import PShellCommand
+ return PShellCommand
def _makeOne(self):
- return self._getTargetClass()('bfgshell')
+ return self._getTargetClass()('pshell')
def test_command_ipython_disabled(self):
command = self._makeOne()
diff --git a/setup.py b/setup.py
index d7c549c03..b8330013e 100644
--- a/setup.py
+++ b/setup.py
@@ -86,7 +86,7 @@ setup(name='pyramid',
pylons_minimal=pyramid.paster:PylonsMinimalProjectTemplate
pylons_sqla=pyramid.paster:PylonsSQLAlchemyProjectTemplate
[paste.paster_command]
- pyramid_shell=pyramid.paster:BFGShellCommand
+ pshell=pyramid.paster:PShellCommand
[console_scripts]
bfg2pyramid = pyramid.fixers.fix_bfg_imports:main
"""