summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2017-05-02 00:34:35 -0700
committerSteve Piercy <web@stevepiercy.com>2017-05-02 00:34:35 -0700
commit61083014ec4a2759a41a0008da3a2bd6c5bbb906 (patch)
treefed8b63205320dde19c700ea5ad2099bcd624230
parent7d1e0646d701b35d61ca8800341c07afac31bb86 (diff)
parentfbfd8191cee8536078cc01cd2256378ba0711f22 (diff)
downloadpyramid-61083014ec4a2759a41a0008da3a2bd6c5bbb906.tar.gz
pyramid-61083014ec4a2759a41a0008da3a2bd6c5bbb906.tar.bz2
pyramid-61083014ec4a2759a41a0008da3a2bd6c5bbb906.zip
Merge remote-tracking branch 'upstream/master'
-rw-r--r--CHANGES.txt38
-rw-r--r--README.rst10
-rw-r--r--contributing.md2
-rw-r--r--docs/conf.py1
-rw-r--r--docs/index.rst1
-rw-r--r--docs/whatsnew-1.9.rst52
-rw-r--r--setup.cfg3
-rw-r--r--setup.py2
8 files changed, 92 insertions, 17 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index e30f185f0..2378ec883 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,5 @@
-unreleased
-==========
+1.9a1 (2017-05-01)
+==================
Major Features
--------------
@@ -10,8 +10,9 @@ Major Features
`plaster <http://docs.pylonsproject.org/projects/plaster/en/latest/>`_.
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 <https://github.com/Pylons/plaster_pastedeploy>`_
+ binding library. This may change in the future.
See https://github.com/Pylons/pyramid/pull/2985
@@ -49,8 +50,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 +95,27 @@ 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 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 ``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``.
+
+ Also, ``pyramid.session.check_csrf_token`` is now located at
+ ``pyramid.csrf.check_csrf_token``.
+
+ See https://github.com/Pylons/pyramid/pull/2854 and
+ https://github.com/Pylons/pyramid/pull/3019
Documentation Changes
---------------------
-- 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
+- Added the execution policy to the routing diagram in the Request Processing
+ chapter. See https://github.com/Pylons/pyramid/pull/2993
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
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
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),
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
diff --git a/docs/whatsnew-1.9.rst b/docs/whatsnew-1.9.rst
new file mode 100644
index 000000000..b1a406a74
--- /dev/null
+++ b/docs/whatsnew-1.9.rst
@@ -0,0 +1,52 @@
+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 <http://docs.pylonsproject.org/projects/plaster/en/latest/>`_.
+
+ For now, Pyramid is still shipping with integrated support for the PasteDeploy INI format by depending on the `plaster_pastedeploy <https://github.com/Pylons/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 <http://docs.pylonsproject.org/projects/pyramid-retry/en/latest/>`_.
+
+ 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:<server_name>`` 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 :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
+
+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 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`.
+
+ 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
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
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=[