Chris McDonough
2012-03-18 ac7d27dfb97bf887f8688264187db4a6c7be18ff
Merge branch '1.3-branch'
1 files added
6 files modified
38 ■■■■■ changed files
CHANGES.txt 10 ●●●●● patch | view | raw | blame | history
docs/conf.py 2 ●●● patch | view | raw | blame | history
docs/python-3.png patch | view | raw | blame | history
docs/whatsnew-1.3.rst 2 ●●●●● patch | view | raw | blame | history
pyramid/request.py 10 ●●●●● patch | view | raw | blame | history
pyramid/tests/test_request.py 12 ●●●●● patch | view | raw | blame | history
setup.py 2 ●●● patch | view | raw | blame | history
CHANGES.txt
@@ -4,6 +4,16 @@
Bug Fixes
---------
- When ``pyramid.wsgi.wsgiapp2`` calls the downstream WSGI app, the
  app's environ will no longer have (deprecated and potentially misleading)
  ``bfg.routes.matchdict`` or ``bfg.routes.route`` keys in it.
1.3b3 (2012-03-17)
==================
Bug Fixes
---------
- ``config.add_view(<aninstancemethod>)`` raised AttributeError involving
  ``__text__``.  See https://github.com/Pylons/pyramid/issues/461
docs/conf.py
@@ -80,7 +80,7 @@
# other places throughout the built documents.
#
# The short X.Y version.
version = '1.3b2'
version = '1.3b3'
# The full version, including alpha/beta/rc tags.
release = version
docs/python-3.png
docs/whatsnew-1.3.rst
@@ -15,6 +15,8 @@
Python 3 Compatibility
~~~~~~~~~~~~~~~~~~~~~~
.. image:: python-3.png
Pyramid continues to run on Python 2, but Pyramid is now also Python 3
compatible.  To use Pyramid under Python 3, Python 3.2 or better is required.
pyramid/request.py
@@ -453,4 +453,14 @@
    new_request = request.copy()
    new_request.environ['SCRIPT_NAME'] = new_script_name
    new_request.environ['PATH_INFO'] = new_path_info
    # In case downstream WSGI app is a Pyramid app, hack around existence of
    # these envars until we can safely remove them (see router.py); in any
    # case, even if these get removed, it might be better to not copy the
    # existing environ but to create a new one instead.
    if 'bfg.routes.route' in new_request.environ:
        del new_request.environ['bfg.routes.route']
    if 'bfg.routes.matchdict' in new_request.environ:
        del new_request.environ['bfg.routes.matchdict']
    return new_request.get_response(app)
pyramid/tests/test_request.py
@@ -546,6 +546,18 @@
        self.assertEqual(request.environ['SCRIPT_NAME'], '/' + encoded)
        self.assertEqual(request.environ['PATH_INFO'], '/' + encoded)
    def test_it_removes_bfg_routes_info(self):
        request = DummyRequest({})
        request.environ['bfg.routes.route'] = True
        request.environ['bfg.routes.matchdict'] = True
        response = self._callFUT(request, 'app')
        self.assertTrue(request.copied)
        self.assertEqual(response, 'app')
        self.assertEqual(request.environ['SCRIPT_NAME'], '')
        self.assertEqual(request.environ['PATH_INFO'], '/')
        self.assertFalse('bfg.routes.route' in request.environ)
        self.assertFalse('bfg.routes.matchdict' in request.environ)
class DummyRequest:
    def __init__(self, environ=None):
        if environ is None:
setup.py
@@ -64,7 +64,7 @@
testing_extras = tests_require + ['nose', 'coverage']
setup(name='pyramid',
      version='1.3b2',
      version='1.3b3',
      description=('The Pyramid web application development framework, a '
                   'Pylons project'),
      long_description=README + '\n\n' +  CHANGES,