From 2b9b6cab969eab9b1976a1a9a29ed2e44e92ca6d Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 1 May 2017 21:10:30 -0500 Subject: update changelog and add whatsnew-1.9 --- CHANGES.txt | 27 ++++++++++++++++++--------- docs/index.rst | 1 + 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index e30f185f0..861dfa684 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -49,8 +49,8 @@ Major Features See https://github.com/Pylons/pyramid/pull/2854 and https://github.com/Pylons/pyramid/pull/3019 -Features --------- +Minor Features +-------------- - Support an ``open_url`` config setting in the ``pserve`` section of the config file. This url is used to open a web browser when ``pserve --browser`` @@ -94,12 +94,21 @@ Bug Fixes Deprecations ------------ -Backward Incompatibilities --------------------------- +- Pyramid currently depends on ``plaster_pastedeploy`` to simplify the + transition to ``plaster`` by maintaining integrated support for INI files. + This dependency on ``plaster_pastedeploy`` should be considered subject to + Pyramid's deprecation policy and is subject to removal in the future. + Applications should depend on the appropriate plaster binding to satisfy + their needs. + +- Retrieving CSRF token from the session has been deprecated in favor of + equivalent methods in the ``pyramid.csrf`` module. The CSRF methods + (``ISession.get_csrf_token`` and ``ISession.new_csrf_token``) are no longer + required on the ``ISession`` interface except when using the default + ``pyramid.csrf.LegacySessionCSRFStoragePolicy``. -Documentation Changes ---------------------- + Also, ``pyramid.session.check_csrf_token`` is now located at + ``pyramid.csrf.check_csrf_token``. -- Retrieving CSRF token from the session has been deprecated, in favor of - equivalent methods in :mod:`pyramid.csrf`. - See https://github.com/Pylons/pyramid/pull/2854 + See https://github.com/Pylons/pyramid/pull/2854 and + https://github.com/Pylons/pyramid/pull/3019 diff --git a/docs/index.rst b/docs/index.rst index ed5b458ea..7d3393548 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -185,6 +185,7 @@ Change History .. toctree:: :maxdepth: 1 + whatsnew-1.9 whatsnew-1.8 whatsnew-1.7 whatsnew-1.6 -- cgit v1.2.3 From 4245b85e8041c87b9eb7ebd60707813d05d7e004 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 1 May 2017 21:30:09 -0500 Subject: really add whatsnew-1.9 --- docs/whatsnew-1.9.rst | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 docs/whatsnew-1.9.rst diff --git a/docs/whatsnew-1.9.rst b/docs/whatsnew-1.9.rst new file mode 100644 index 000000000..7ceefbf49 --- /dev/null +++ b/docs/whatsnew-1.9.rst @@ -0,0 +1,49 @@ +What's New in Pyramid 1.9 +========================= + +This article explains the new features in :app:`Pyramid` version 1.9 as compared to its predecessor, :app:`Pyramid` 1.8. It also documents backwards incompatibilities between the two versions and deprecations added to :app:`Pyramid` 1.9, as well as software dependency changes and notable documentation additions. + +Major Feature Additions +----------------------- + +- The file format used by all ``p*`` command line scripts such as ``pserve`` and ``pshell``, as well as the :func:`pyramid.paster.bootstrap` function is now replaceable thanks to a new dependency on `plaster `_. + + For now, Pyramid is still shipping with integrated support for the PasteDeploy INI format by depending on the ``plaster_pastedeploy`` binding library. This may change in the future so it is recommended for applications to start depending on the appropriate plaster binding for their needs. + + See https://github.com/Pylons/pyramid/pull/2985 + +- Added an :term:`execution policy` hook to the request pipeline. An execution policy has the ability to control creation and execution of the request objects before they enter the rest of the pipeline. This means for a single request environ the policy may create more than one request object. + + The execution policy can be replaced using the new :meth:`pyramid.config.Configurator.set_execution_policy` config directive. + + The first library to use this feature is `pyramid_retry `_. + + See https://github.com/Pylons/pyramid/pull/2964 + +- CSRF support has been refactored out of sessions and into its own independent API in the :mod:`pyramid.csrf` module. It supports a pluggable :class:`pyramid.interfaces.ICSRFStoragePolicy` which can be used to define your own mechanism for generating and validating CSRF tokens. By default, Pyramid continues to use the :class:`pyramid.csrf.LegacySessionCSRFStoragePolicy` that uses the ``request.session.get_csrf_token`` and ``request.session.new_csrf_token`` APIs under the hood to preserve compatibility with older Pyramid applications. Two new policies are shipped as well, :class:`pyramid.csrf.SessionCSRFStoragePolicy` and :class:`pyramid.csrf.CookieCSRFStoragePolicy` which will store the CSRF tokens in the session and in a standalone cookie, respectively. The storage policy can be changed by using the new :meth:`pyramid.config.Configurator.set_csrf_storage_policy` config directive. + + CSRF tokens should be used via the new :func:`pyramid.csrf.get_csrf_token`, :func:`pyramid.csrf.new_csrf_token` and :func:`pyramid.csrf.check_csrf_token`` APIs in order to continue working if the storage policy is changed. Also, the :func:`pyramid.csrf.get_csrf_token` function is now injected into templates to be used conveniently in UI code. + + See https://github.com/Pylons/pyramid/pull/2854 and https://github.com/Pylons/pyramid/pull/3019 + +Minor Feature Additions +----------------------- + +- Support an ``open_url`` config setting in the ``pserve`` section of the config file. This url is used to open a web browser when ``pserve --browser`` is invoked. When this setting is unavailable the ``pserve`` script will attempt to guess the port the server is using from the ``server:`` section of the config file but there is no requirement that the server is being run in this format so it may fail. See https://github.com/Pylons/pyramid/pull/2984 + +- The :class:`pyramid.config.Configurator` can now be used as a context manager which will automatically push/pop threadlocals (similar to :meth:`pyramid.config.Configurator.begin` and `pyramid.config.Configurator.end`). It will also automatically perform a :meth:`pyramid.config.Configurator.commit` at the end and thus it is only recommended to be used at the top-level of your app. See https://github.com/Pylons/pyramid/pull/2874 + +- The threadlocals are now available inside any function invoked via :meth:`pyramid.config.Configurator.include`. This means the only config-time code that cannot rely on threadlocals is code executed from non-actions inside the main. This can be alleviated by invoking :meth:`pyramid.config.Configurator.begin` and :meth:`pyramid.config.Configurator.end` appropriately or using the new context manager feature of the configurator. See https://github.com/Pylons/pyramid/pull/2989 + +Deprecations +------------ + +- Pyramid currently depends on ``plaster_pastedeploy`` to simplify the transition to ``plaster`` by maintaining integrated support for INI files. This dependency on ``plaster_pastedeploy`` should be considered subject to Pyramid's deprecation policy and is subject to removal in the future. Applications should depend on the appropriate plaster binding to satisfy their needs. + +- Retrieving CSRF token from the session has been deprecated in favor of equivalent methods in the :mod:`pyramid.csrf` module. The CSRF methods (``ISession.get_csrf_token`` and ``ISession.new_csrf_token``) are no longer required on the :class:`pyramid.interfaces.ISession` interface except when using the default :class:`pyramid.csrf.LegacySessionCSRFStoragePolicy`. + + Also, ``pyramid.session.check_csrf_token`` is now located at + :func:`pyramid.csrf.check_csrf_token`. + + See https://github.com/Pylons/pyramid/pull/2854 and + https://github.com/Pylons/pyramid/pull/3019 -- cgit v1.2.3 From 33f1c247272e58993003777677c7c6a7a4f5e38c Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 1 May 2017 21:33:36 -0500 Subject: switch readme to 1.9-branch badges --- README.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 302590fe1..5f42115df 100644 --- a/README.rst +++ b/README.rst @@ -1,16 +1,16 @@ Pyramid ======= -.. image:: https://travis-ci.org/Pylons/pyramid.png?branch=master +.. image:: https://travis-ci.org/Pylons/pyramid.png?branch=1.9-branch :target: https://travis-ci.org/Pylons/pyramid :alt: master Travis CI Status -.. image:: https://readthedocs.org/projects/pyramid/badge/?version=master - :target: http://docs.pylonsproject.org/projects/pyramid/en/master/ +.. image:: https://readthedocs.org/projects/pyramid/badge/?version=1.9-branch + :target: http://docs.pylonsproject.org/projects/pyramid/en/1.9-branch/ :alt: Master Documentation Status -.. image:: https://readthedocs.org/projects/pyramid/badge/?version=latest - :target: http://docs.pylonsproject.org/projects/pyramid/en/latest/ +.. image:: https://readthedocs.org/projects/pyramid/badge/?version=1.9-branch + :target: http://docs.pylonsproject.org/projects/pyramid/en/1.9-branch/ :alt: Latest Documentation Status .. image:: https://img.shields.io/badge/irc-freenode-blue.svg -- cgit v1.2.3 From 156c7fa32d6bf6e7786967920ca89403b0eb16fd Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 1 May 2017 21:38:08 -0500 Subject: link to 1.9-branch in contributing --- contributing.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contributing.md b/contributing.md index 9deeee035..82f60e7b8 100644 --- a/contributing.md +++ b/contributing.md @@ -26,6 +26,8 @@ listed below. * [master](https://github.com/Pylons/pyramid/) - The branch on which further development takes place. The default branch on GitHub. +* [1.9-branch](https://github.com/Pylons/pyramid/tree/1.9-branch) - The branch + classified as "alpha". * [1.8-branch](https://github.com/Pylons/pyramid/tree/1.8-branch) - The branch classified as "stable" or "latest". * [1.7-branch](https://github.com/Pylons/pyramid/tree/1.7-branch) - The oldest -- cgit v1.2.3 From fdd77da6231fa9286c3f6fa494ae0731570e0134 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 1 May 2017 21:42:54 -0500 Subject: link to plaster_pastedeploy --- CHANGES.txt | 5 +++-- docs/whatsnew-1.9.rst | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 861dfa684..a6cac805f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,8 +10,9 @@ Major Features `plaster `_. For now, Pyramid is still shipping with integrated support for the - PasteDeploy INI format by depending on the ``plaster_pastedeploy`` binding. - This may change in the future. + PasteDeploy INI format by depending on the + `plaster_pastedeploy `_. - For now, Pyramid is still shipping with integrated support for the PasteDeploy INI format by depending on the ``plaster_pastedeploy`` binding library. This may change in the future so it is recommended for applications to start depending on the appropriate plaster binding for their needs. + For now, Pyramid is still shipping with integrated support for the PasteDeploy INI format by depending on the `plaster_pastedeploy Date: Mon, 1 May 2017 21:49:28 -0500 Subject: fix rst syntax --- docs/whatsnew-1.9.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/whatsnew-1.9.rst b/docs/whatsnew-1.9.rst index 291f731ed..dd5ab894d 100644 --- a/docs/whatsnew-1.9.rst +++ b/docs/whatsnew-1.9.rst @@ -31,7 +31,7 @@ Minor Feature Additions - Support an ``open_url`` config setting in the ``pserve`` section of the config file. This url is used to open a web browser when ``pserve --browser`` is invoked. When this setting is unavailable the ``pserve`` script will attempt to guess the port the server is using from the ``server:`` section of the config file but there is no requirement that the server is being run in this format so it may fail. See https://github.com/Pylons/pyramid/pull/2984 -- The :class:`pyramid.config.Configurator` can now be used as a context manager which will automatically push/pop threadlocals (similar to :meth:`pyramid.config.Configurator.begin` and `pyramid.config.Configurator.end`). It will also automatically perform a :meth:`pyramid.config.Configurator.commit` at the end and thus it is only recommended to be used at the top-level of your app. See https://github.com/Pylons/pyramid/pull/2874 +- The :class:`pyramid.config.Configurator` can now be used as a context manager which will automatically push/pop threadlocals (similar to :meth:`pyramid.config.Configurator.begin` and :meth:`pyramid.config.Configurator.end`). It will also automatically perform a :meth:`pyramid.config.Configurator.commit` at the end and thus it is only recommended to be used at the top-level of your app. See https://github.com/Pylons/pyramid/pull/2874 - The threadlocals are now available inside any function invoked via :meth:`pyramid.config.Configurator.include`. This means the only config-time code that cannot rely on threadlocals is code executed from non-actions inside the main. This can be alleviated by invoking :meth:`pyramid.config.Configurator.begin` and :meth:`pyramid.config.Configurator.end` appropriately or using the new context manager feature of the configurator. See https://github.com/Pylons/pyramid/pull/2989 -- cgit v1.2.3 From 7850884719c94c0721748b5458504cb8a9d242c8 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 1 May 2017 21:54:55 -0500 Subject: add changelog for #2993 --- CHANGES.txt | 6 ++++++ docs/whatsnew-1.9.rst | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index a6cac805f..70a2ff922 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -113,3 +113,9 @@ Deprecations See https://github.com/Pylons/pyramid/pull/2854 and https://github.com/Pylons/pyramid/pull/3019 + +Documentation Changes +--------------------- + +- Added the execution policy to the routing diagram in the Request Processing + chatper. See https://github.com/Pylons/pyramid/pull/2993 diff --git a/docs/whatsnew-1.9.rst b/docs/whatsnew-1.9.rst index dd5ab894d..e57ed254d 100644 --- a/docs/whatsnew-1.9.rst +++ b/docs/whatsnew-1.9.rst @@ -47,3 +47,9 @@ Deprecations See https://github.com/Pylons/pyramid/pull/2854 and https://github.com/Pylons/pyramid/pull/3019 + +Documentation Enhancements +-------------------------- + +- Added the :term:`execution policy` to the routing diagram in + :ref:`router_chapter`. See https://github.com/Pylons/pyramid/pull/2993 -- cgit v1.2.3 From 2aebc688c6a81b1baef01791e1cf3c9907c7c3ee Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 1 May 2017 22:07:55 -0500 Subject: line length fixes in whatsnew-1.9 --- CHANGES.txt | 2 +- docs/whatsnew-1.9.rst | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 70a2ff922..85931d7f1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -98,7 +98,7 @@ Deprecations - Pyramid currently depends on ``plaster_pastedeploy`` to simplify the transition to ``plaster`` by maintaining integrated support for INI files. This dependency on ``plaster_pastedeploy`` should be considered subject to - Pyramid's deprecation policy and is subject to removal in the future. + Pyramid's deprecation policy and may be removed in the future. Applications should depend on the appropriate plaster binding to satisfy their needs. diff --git a/docs/whatsnew-1.9.rst b/docs/whatsnew-1.9.rst index e57ed254d..5f9e0e011 100644 --- a/docs/whatsnew-1.9.rst +++ b/docs/whatsnew-1.9.rst @@ -38,18 +38,15 @@ Minor Feature Additions Deprecations ------------ -- Pyramid currently depends on ``plaster_pastedeploy`` to simplify the transition to ``plaster`` by maintaining integrated support for INI files. This dependency on ``plaster_pastedeploy`` should be considered subject to Pyramid's deprecation policy and is subject to removal in the future. Applications should depend on the appropriate plaster binding to satisfy their needs. +- Pyramid currently depends on ``plaster_pastedeploy`` to simplify the transition to ``plaster`` by maintaining integrated support for INI files. This dependency on ``plaster_pastedeploy`` should be considered subject to Pyramid's deprecation policy and may be removed in the future. Applications should depend on the appropriate plaster binding to satisfy their needs. - Retrieving CSRF token from the session has been deprecated in favor of equivalent methods in the :mod:`pyramid.csrf` module. The CSRF methods (``ISession.get_csrf_token`` and ``ISession.new_csrf_token``) are no longer required on the :class:`pyramid.interfaces.ISession` interface except when using the default :class:`pyramid.csrf.LegacySessionCSRFStoragePolicy`. - Also, ``pyramid.session.check_csrf_token`` is now located at - :func:`pyramid.csrf.check_csrf_token`. + Also, ``pyramid.session.check_csrf_token`` is now located at :func:`pyramid.csrf.check_csrf_token`. - See https://github.com/Pylons/pyramid/pull/2854 and - https://github.com/Pylons/pyramid/pull/3019 + See https://github.com/Pylons/pyramid/pull/2854 and https://github.com/Pylons/pyramid/pull/3019 Documentation Enhancements -------------------------- -- Added the :term:`execution policy` to the routing diagram in - :ref:`router_chapter`. See https://github.com/Pylons/pyramid/pull/2993 +- Added the :term:`execution policy` to the routing diagram in :ref:`router_chapter`. See https://github.com/Pylons/pyramid/pull/2993 -- cgit v1.2.3 From 840508d2a104d1e729bbb1e91f50947da6988133 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 1 May 2017 22:51:18 -0500 Subject: typo --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 85931d7f1..d77a5e49b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -118,4 +118,4 @@ Documentation Changes --------------------- - Added the execution policy to the routing diagram in the Request Processing - chatper. See https://github.com/Pylons/pyramid/pull/2993 + chapter. See https://github.com/Pylons/pyramid/pull/2993 -- cgit v1.2.3 From 2ea4b00b1055864a1f10dd9c4c8a0b903b25080c Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 1 May 2017 22:51:44 -0500 Subject: add the license file to the wheel's dist-info --- setup.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.cfg b/setup.cfg index 9a241ddf5..6f1f33760 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,6 +13,9 @@ docs = develop easy_install pyramid[docs] [bdist_wheel] universal = 1 +[metadata] +license_file = LICENSE.txt + [flake8] ignore = # E121: continuation line under-indented for hanging indent -- cgit v1.2.3 From c84904381f664511060b39d0937fbe76efa22f25 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 1 May 2017 22:51:58 -0500 Subject: prep 1.9a1 --- CHANGES.txt | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index d77a5e49b..0513fd3c9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -unreleased -========== +1.9a1 (2017-05-01) +================== Major Features -------------- diff --git a/setup.py b/setup.py index 3048428aa..6aac12ff8 100644 --- a/setup.py +++ b/setup.py @@ -61,7 +61,7 @@ testing_extras = tests_require + [ ] setup(name='pyramid', - version='1.9.dev0', + version='1.9a1', description='The Pyramid Web Framework, a Pylons project', long_description=README + '\n\n' + CHANGES, classifiers=[ -- cgit v1.2.3 From c273cd0471afe365d9bd8a793a81897a9e713aab Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 1 May 2017 22:57:19 -0500 Subject: fix url syntax --- docs/whatsnew-1.9.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/whatsnew-1.9.rst b/docs/whatsnew-1.9.rst index 5f9e0e011..b1a406a74 100644 --- a/docs/whatsnew-1.9.rst +++ b/docs/whatsnew-1.9.rst @@ -8,7 +8,7 @@ Major Feature Additions - The file format used by all ``p*`` command line scripts such as ``pserve`` and ``pshell``, as well as the :func:`pyramid.paster.bootstrap` function is now replaceable thanks to a new dependency on `plaster `_. - For now, Pyramid is still shipping with integrated support for the PasteDeploy INI format by depending on the `plaster_pastedeploy `_ binding library. This may change in the future so it is recommended for applications to start depending on the appropriate plaster binding for their needs. See https://github.com/Pylons/pyramid/pull/2985 -- cgit v1.2.3 From fbfd8191cee8536078cc01cd2256378ba0711f22 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 1 May 2017 23:05:53 -0500 Subject: fix url syntax yet again --- CHANGES.txt | 2 +- docs/conf.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0513fd3c9..2378ec883 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,7 +11,7 @@ Major Features For now, Pyramid is still shipping with integrated support for the PasteDeploy INI format by depending on the - `plaster_pastedeploy `_ binding library. This may change in the future. See https://github.com/Pylons/pyramid/pull/2985 diff --git a/docs/conf.py b/docs/conf.py index df58064e5..f09ae325b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -67,6 +67,7 @@ intersphinx_mapping = { 'cookiecutter': ('https://cookiecutter.readthedocs.io/en/latest/', None), 'deform': ('http://docs.pylonsproject.org/projects/deform/en/latest', None), 'jinja2': ('http://docs.pylonsproject.org/projects/pyramid-jinja2/en/latest/', None), + 'plaster': ('http://docs.pylonsproject.org/projects/plaster/en/latest/', None), 'pylonswebframework': ('http://docs.pylonsproject.org/projects/pylons-webframework/en/latest/', None), 'python': ('https://docs.python.org/3', None), 'pytest': ('http://pytest.org/latest/', None), -- cgit v1.2.3