summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml6
-rw-r--r--CHANGES.txt185
-rw-r--r--HACKING.txt5
-rw-r--r--HISTORY.txt199
-rw-r--r--MANIFEST.in16
-rw-r--r--README.rst10
-rw-r--r--RELEASING.txt20
-rw-r--r--contributing.md4
-rw-r--r--docs/conf.py1
-rw-r--r--docs/copyright.rst2
-rw-r--r--docs/glossary.rst20
-rw-r--r--docs/narr/firstapp.rst2
-rw-r--r--docs/narr/hooks.rst4
-rw-r--r--docs/narr/i18n.rst2
-rw-r--r--docs/narr/install.rst4
-rw-r--r--docs/narr/introduction.rst4
-rw-r--r--docs/narr/project.rst4
-rw-r--r--docs/narr/scaffolding.rst2
-rw-r--r--docs/narr/sessions.rst4
-rw-r--r--docs/narr/templates.rst2
-rw-r--r--docs/narr/webob.rst4
-rw-r--r--docs/quick_tour.rst4
-rw-r--r--docs/quick_tutorial/cookiecutters.rst2
-rw-r--r--docs/quick_tutorial/debugtoolbar.rst2
-rw-r--r--docs/quick_tutorial/package.rst2
-rw-r--r--docs/tutorials/modwsgi/index.rst2
-rw-r--r--docs/tutorials/wiki/installation.rst6
-rw-r--r--docs/tutorials/wiki2/installation.rst6
-rw-r--r--docs/typographical-conventions.rst2
-rw-r--r--docs/whatsnew-1.9.rst1
-rw-r--r--pyramid/request.py2
-rw-r--r--setup.cfg10
-rw-r--r--setup.py18
-rw-r--r--tox.ini17
34 files changed, 312 insertions, 262 deletions
diff --git a/.travis.yml b/.travis.yml
index ffc6caa72..1d4c4eeac 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,6 +10,8 @@ matrix:
env: TOXENV=py34
- python: 3.5
env: TOXENV=py35
+ - python: 3.6
+ env: TOXENV=py36
- python: pypy
env: TOXENV=pypy
- python: 3.5
@@ -17,9 +19,7 @@ matrix:
- python: 3.5
env: TOXENV=docs
- python: 3.5
- env: TOXENV=pep8
- - python: 3.6
- env: TOXENV=py36
+ env: TOXENV=lint
- python: nightly
env: TOXENV=py37
allow_failures:
diff --git a/CHANGES.txt b/CHANGES.txt
index 2f24262c2..dd1f3ea52 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,191 +1,18 @@
-1.9b1 (2017-06-19)
-==================
+unreleased
+==========
-- Add an informative error message when unknown predicates are supplied. The
- new message suggests alternatives based on the list of known predicates.
- See https://github.com/Pylons/pyramid/pull/3054
-
-- Added integrity attributes for JavaScripts in cookiecutters, scaffolds, and
- resulting source files in tutorials.
- See https://github.com/Pylons/pyramid/issues/2548
-
-- Update RELEASING.txt for updating cookiecutters. Change cookiecutter URLs to
- use shortcut.
- See https://github.com/Pylons/pyramid/issues/3042
-
-- Ensure the correct threadlocals are pushed during view execution when
- invoked from ``request.invoke_exception_view``.
- See https://github.com/Pylons/pyramid/pull/3060
-
-- Fix a bug in which ``pyramid.security.ALL_PERMISSIONS`` failed to return
- a valid iterator in its ``__iter__`` implementation.
- See https://github.com/Pylons/pyramid/pull/3074
-
-- Normalize the permission results to a proper class hierarchy.
- ``pyramid.security.ACLAllowed`` is now a subclass of
- ``pyramid.security.Allowed`` and ``pyramid.security.ACLDenied`` is now a
- subclass of ``pyramid.security.Denied``.
- See https://github.com/Pylons/pyramid/pull/3084
-
-- Add a ``quote_via`` argument to ``pyramid.encode.urlencode`` to follow
- the stdlib's version and enable custom quoting functions.
- See https://github.com/Pylons/pyramid/pull/3088
-
-- Support `_query=None` and `_anchor=None` in ``request.route_url`` as well
- as ``query=None`` and ``anchor=None`` in ``request.resource_url``.
- Previously this would cause an `?` and a `#`, respectively, in the url
- with nothing after it. Now the unnecessary parts are dropped from the
- generated URL. See https://github.com/Pylons/pyramid/pull/3034
-
-- Revamp the ``IRouter`` API used by ``IExecutionPolicy`` to force
- pushing/popping the request threadlocals. The
- ``IRouter.make_request(environ)`` API has been replaced by
- ``IRouter.request_context(environ)`` which should be used as a context
- manager. See https://github.com/Pylons/pyramid/pull/3086
-
-1.9a2 (2017-05-09)
-==================
-
-Backward Incompatibilities
---------------------------
-
-- ``request.exception`` and ``request.exc_info`` will only be set if the
- response was generated by the EXCVIEW tween. This is to avoid any confusion
- where a response was generated elsewhere in the pipeline and not in
- direct relation to the original exception. If anyone upstream wants to
- catch and render responses for exceptions they should set
- ``request.exception`` and ``request.exc_info`` themselves to indicate
- the exception that was squashed when generating the response.
-
- Similar behavior occurs with ``request.invoke_exception_view`` in which
- the exception properties are set to reflect the exception if a response
- is successfully generated by the method.
-
- This is a very minor incompatibility. Most tweens right now would give
- priority to the raised exception and ignore ``request.exception``. This
- change just improves and clarifies that bookkeeping by trying to be
- more clear about the relationship between the response and its squashed
- exception. See https://github.com/Pylons/pyramid/pull/3029 and
- https://github.com/Pylons/pyramid/pull/3031
-
-1.9a1 (2017-05-01)
-==================
-
-Major Features
---------------
-
-- The file format used by all ``p*`` command line scripts such as ``pserve``
- and ``pshell``, as well as the ``pyramid.paster.bootstrap`` function
- is now replaceable thanks to a new dependency on
- `plaster <https://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.
-
- See https://github.com/Pylons/pyramid/pull/2985
-
-- Added an 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 first library to use this feature is
- `pyramid_retry
- <https://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 ``pyramid.csrf`` module. It supports a pluggable
- ``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 ``pyramid.csrf.LegacySessionCSRFStoragePolicy``
- that uses the ``request.session.get_csrf_token`` and
- ``request.session.new_csrf_token`` APIs under the hood to preserve
- compatibility. Two new policies are shipped as well,
- ``pyramid.csrf.SessionCSRFStoragePolicy`` and
- ``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
- ``pyramid.config.Configurator.set_csrf_storage_policy`` config directive.
-
- CSRF tokens should be used via the new ``pyramid.csrf.get_csrf_token``,
- ``pyramid.csrf.new_csrf_token`` and ``pyramid.csrf.check_csrf_token`` APIs
- in order to continue working if the storage policy is changed. Also, the
- ``pyramid.csrf.get_csrf_token`` function is 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 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``
- 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 ``pyramid.config.Configurator`` can now be used as a context manager
- which will automatically push/pop threadlocals (similar to
- ``config.begin()`` and ``config.end()``). It will also automatically perform
- a ``config.commit()`` 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
- ``config.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 ``config.begin()`` and ``config.end()``
- appropriately or using the new context manager feature of the configurator.
- See https://github.com/Pylons/pyramid/pull/2989
+Features
+--------
Bug Fixes
---------
-- HTTPException's accepts a detail kwarg that may be used to pass additional
- details to the exception. You may now pass objects so long as they have a
- valid __str__ method. See https://github.com/Pylons/pyramid/pull/2951
-
-- Fix a reference cycle causing memory leaks in which the registry
- would keep a ``Configurator`` instance alive even after the configurator
- was discarded. Another fix was also added for the ``global_registries``
- object in which the registry was stored in a closure preventing it from
- being deallocated. See https://github.com/Pylons/pyramid/pull/2967
-
-- Fix a bug directly invoking ``pyramid.scripts.pserve.main`` with the
- ``--reload`` option in which ``sys.argv`` is always used in the subprocess
- instead of the supplied ``argv``.
- See https://github.com/Pylons/pyramid/pull/2962
-
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 ``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
+Backward Incompatibilities
+--------------------------
Documentation Changes
---------------------
-- Added the execution policy to the routing diagram in the Request Processing
- chapter. See https://github.com/Pylons/pyramid/pull/2993
diff --git a/HACKING.txt b/HACKING.txt
index 3e7ddd089..ad89fc490 100644
--- a/HACKING.txt
+++ b/HACKING.txt
@@ -51,11 +51,6 @@ repo, from which you can submit a pull request.
To use the instructions in the steps that follow literally, use the
``export VENV=~/hack-on-pyramid/env`` command.
-- Install ``setuptools-git`` into the virtual environment (for good measure, as
- we're using git to do version control):
-
- $ $VENV/bin/pip install setuptools-git
-
- Install Pyramid from the checkout into the virtual environment, where the
current working directory is the ``pyramid`` checkout directory. We will
install Pyramid in editable (development) mode as well as its testing
diff --git a/HISTORY.txt b/HISTORY.txt
index c69d9514e..8a92eadcc 100644
--- a/HISTORY.txt
+++ b/HISTORY.txt
@@ -1,3 +1,202 @@
+1.9 (2017-06-26)
+================
+
+- No major changes from 1.9b1.
+
+- Updated documentation links for ``docs.pylonsproject.org`` to use HTTPS.
+
+1.9b1 (2017-06-19)
+==================
+
+- Add an informative error message when unknown predicates are supplied. The
+ new message suggests alternatives based on the list of known predicates.
+ See https://github.com/Pylons/pyramid/pull/3054
+
+- Added integrity attributes for JavaScripts in cookiecutters, scaffolds, and
+ resulting source files in tutorials.
+ See https://github.com/Pylons/pyramid/issues/2548
+
+- Update RELEASING.txt for updating cookiecutters. Change cookiecutter URLs to
+ use shortcut.
+ See https://github.com/Pylons/pyramid/issues/3042
+
+- Ensure the correct threadlocals are pushed during view execution when
+ invoked from ``request.invoke_exception_view``.
+ See https://github.com/Pylons/pyramid/pull/3060
+
+- Fix a bug in which ``pyramid.security.ALL_PERMISSIONS`` failed to return
+ a valid iterator in its ``__iter__`` implementation.
+ See https://github.com/Pylons/pyramid/pull/3074
+
+- Normalize the permission results to a proper class hierarchy.
+ ``pyramid.security.ACLAllowed`` is now a subclass of
+ ``pyramid.security.Allowed`` and ``pyramid.security.ACLDenied`` is now a
+ subclass of ``pyramid.security.Denied``.
+ See https://github.com/Pylons/pyramid/pull/3084
+
+- Add a ``quote_via`` argument to ``pyramid.encode.urlencode`` to follow
+ the stdlib's version and enable custom quoting functions.
+ See https://github.com/Pylons/pyramid/pull/3088
+
+- Support `_query=None` and `_anchor=None` in ``request.route_url`` as well
+ as ``query=None`` and ``anchor=None`` in ``request.resource_url``.
+ Previously this would cause an `?` and a `#`, respectively, in the url
+ with nothing after it. Now the unnecessary parts are dropped from the
+ generated URL. See https://github.com/Pylons/pyramid/pull/3034
+
+- Revamp the ``IRouter`` API used by ``IExecutionPolicy`` to force
+ pushing/popping the request threadlocals. The
+ ``IRouter.make_request(environ)`` API has been replaced by
+ ``IRouter.request_context(environ)`` which should be used as a context
+ manager. See https://github.com/Pylons/pyramid/pull/3086
+
+1.9a2 (2017-05-09)
+==================
+
+Backward Incompatibilities
+--------------------------
+
+- ``request.exception`` and ``request.exc_info`` will only be set if the
+ response was generated by the EXCVIEW tween. This is to avoid any confusion
+ where a response was generated elsewhere in the pipeline and not in
+ direct relation to the original exception. If anyone upstream wants to
+ catch and render responses for exceptions they should set
+ ``request.exception`` and ``request.exc_info`` themselves to indicate
+ the exception that was squashed when generating the response.
+
+ Similar behavior occurs with ``request.invoke_exception_view`` in which
+ the exception properties are set to reflect the exception if a response
+ is successfully generated by the method.
+
+ This is a very minor incompatibility. Most tweens right now would give
+ priority to the raised exception and ignore ``request.exception``. This
+ change just improves and clarifies that bookkeeping by trying to be
+ more clear about the relationship between the response and its squashed
+ exception. See https://github.com/Pylons/pyramid/pull/3029 and
+ https://github.com/Pylons/pyramid/pull/3031
+
+1.9a1 (2017-05-01)
+==================
+
+Major Features
+--------------
+
+- The file format used by all ``p*`` command line scripts such as ``pserve``
+ and ``pshell``, as well as the ``pyramid.paster.bootstrap`` function
+ is now replaceable thanks to a new dependency on
+ `plaster <https://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.
+
+ See https://github.com/Pylons/pyramid/pull/2985
+
+- Added an 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 first library to use this feature is
+ `pyramid_retry
+ <https://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 ``pyramid.csrf`` module. It supports a pluggable
+ ``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 ``pyramid.csrf.LegacySessionCSRFStoragePolicy``
+ that uses the ``request.session.get_csrf_token`` and
+ ``request.session.new_csrf_token`` APIs under the hood to preserve
+ compatibility. Two new policies are shipped as well,
+ ``pyramid.csrf.SessionCSRFStoragePolicy`` and
+ ``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
+ ``pyramid.config.Configurator.set_csrf_storage_policy`` config directive.
+
+ CSRF tokens should be used via the new ``pyramid.csrf.get_csrf_token``,
+ ``pyramid.csrf.new_csrf_token`` and ``pyramid.csrf.check_csrf_token`` APIs
+ in order to continue working if the storage policy is changed. Also, the
+ ``pyramid.csrf.get_csrf_token`` function is 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 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``
+ 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 ``pyramid.config.Configurator`` can now be used as a context manager
+ which will automatically push/pop threadlocals (similar to
+ ``config.begin()`` and ``config.end()``). It will also automatically perform
+ a ``config.commit()`` 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
+ ``config.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 ``config.begin()`` and ``config.end()``
+ appropriately or using the new context manager feature of the configurator.
+ See https://github.com/Pylons/pyramid/pull/2989
+
+Bug Fixes
+---------
+
+- HTTPException's accepts a detail kwarg that may be used to pass additional
+ details to the exception. You may now pass objects so long as they have a
+ valid __str__ method. See https://github.com/Pylons/pyramid/pull/2951
+
+- Fix a reference cycle causing memory leaks in which the registry
+ would keep a ``Configurator`` instance alive even after the configurator
+ was discarded. Another fix was also added for the ``global_registries``
+ object in which the registry was stored in a closure preventing it from
+ being deallocated. See https://github.com/Pylons/pyramid/pull/2967
+
+- Fix a bug directly invoking ``pyramid.scripts.pserve.main`` with the
+ ``--reload`` option in which ``sys.argv`` is always used in the subprocess
+ instead of the supplied ``argv``.
+ See https://github.com/Pylons/pyramid/pull/2962
+
+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 ``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
+---------------------
+
+- Added the execution policy to the routing diagram in the Request Processing
+ chapter. See https://github.com/Pylons/pyramid/pull/2993
+
1.8 (2017-01-21)
================
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 000000000..8dac939f8
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,16 @@
+graft pyramid
+graft docs
+prune docs/_build
+
+include README.rst
+include CHANGES.txt HISTORY.txt BFG_HISTORY.txt
+include CONTRIBUTORS.txt LICENSE.txt COPYRIGHT.txt
+
+include contributing.md RELEASING.txt
+include tox.ini appveyor.yml .travis.yml rtd.txt
+
+include HACKING.txt hacking-tox.ini
+include builddocs.sh coverage.sh scaffoldtests.sh
+include TODO.txt
+
+global-exclude __pycache__ *.py[cod]
diff --git a/README.rst b/README.rst
index 57829eb19..ecc8eb32f 100644
--- a/README.rst
+++ b/README.rst
@@ -1,13 +1,13 @@
Pyramid
=======
-.. image:: https://travis-ci.org/Pylons/pyramid.png?branch=1.9-branch
+.. image:: https://travis-ci.org/Pylons/pyramid.png?branch=master
:target: https://travis-ci.org/Pylons/pyramid
- :alt: 1.9-branch Travis CI Status
+ :alt: master Travis CI Status
-.. image:: https://readthedocs.org/projects/pyramid/badge/?version=1.9-branch
- :target: https://docs.pylonsproject.org/projects/pyramid/en/1.9-branch/
- :alt: 1.9-branch Documentation Status
+.. image:: https://readthedocs.org/projects/pyramid/badge/?version=master
+ :target: https://docs.pylonsproject.org/projects/pyramid/en/master
+ :alt: master Documentation Status
.. image:: https://img.shields.io/badge/irc-freenode-blue.svg
:target: https://webchat.freenode.net/?channels=pyramid
diff --git a/RELEASING.txt b/RELEASING.txt
index c8ff6578a..4c3bedd3a 100644
--- a/RELEASING.txt
+++ b/RELEASING.txt
@@ -71,15 +71,9 @@ Prepare new release branch
- Change setup.py version to the release version number.
-- Make sure PyPI long description renders (requires ``readme_renderer``
- installed into your Python)::
-
- $ python setup.py check -r -s -m
-
- Create a release tag.
-- Make sure your Python has ``setuptools-git``, ``twine``, and ``wheel``
- installed and release to PyPI::
+- Build and publish to PyPI::
$ python setup.py sdist bdist_wheel
$ twine upload dist/pyramid-X.X-*
@@ -121,6 +115,13 @@ Update previous version (final releases only)
- Configure RTD to point the "latest" alias to the new release version of the
docs.
+
+Cookiecutters
+-------------
+
+- For each cookiecutter, clone the newly released branch to "latest" branch.
+
+
Marketing and communications
----------------------------
@@ -156,9 +157,8 @@ https://github.com/Pylons/pyramid/issues
```
Pyramid 1.X.X has been released.
-Here are the changes:
-
-<<changes>>
+The full changelog is here:
+https://docs.pylonsproject.org/projects/pyramid/en/1.X-branch/changes.html
What's New In Pyramid 1.X:
https://docs.pylonsproject.org/projects/pyramid/en/1.X-branch/whatsnew-1.X.html
diff --git a/contributing.md b/contributing.md
index fec4f4f27..3b960c1e1 100644
--- a/contributing.md
+++ b/contributing.md
@@ -27,10 +27,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
+* [1.8-branch](https://github.com/Pylons/pyramid/tree/1.8-branch) - The oldest
actively maintained and stable branch.
Older branches are not actively maintained. In general, two stable branches and
diff --git a/docs/conf.py b/docs/conf.py
index 68d23a651..3fec0dce2 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -148,6 +148,7 @@ if book:
# 'whatsnew-1.6': 'index',
# 'whatsnew-1.7': 'index',
# 'whatsnew-1.8': 'index',
+# 'whatsnew-1.9': 'index',
# 'tutorials/gae/index': 'index',
# 'api/chameleon_text': 'api',
# 'api/chameleon_zpt': 'api',
diff --git a/docs/copyright.rst b/docs/copyright.rst
index e0833fa57..be47aef33 100644
--- a/docs/copyright.rst
+++ b/docs/copyright.rst
@@ -18,7 +18,7 @@ First print publishing: February, 2011
All rights reserved. This material may be copied or distributed only
subject to the terms and conditions set forth in the `Creative Commons
Attribution-Noncommercial-Share Alike 3.0 United States License
-<http://creativecommons.org/licenses/by-nc-sa/3.0/us/>`_. You must
+<https://creativecommons.org/licenses/by-nc-sa/3.0/us/>`_. You must
give the original author credit. You may not use this work for
commercial purposes. If you alter, transform, or build upon this
work, you may distribute the resulting work only under the same or
diff --git a/docs/glossary.rst b/docs/glossary.rst
index ce8e727e3..fe2d0977c 100644
--- a/docs/glossary.rst
+++ b/docs/glossary.rst
@@ -321,7 +321,7 @@ Glossary
:term:`principal` (or principals) associated with a request.
WSGI
- `Web Server Gateway Interface <http://wsgi.readthedocs.org/en/latest/>`_.
+ `Web Server Gateway Interface <https://wsgi.readthedocs.io/en/latest/>`_.
This is a Python standard for connecting web applications to web servers,
similar to the concept of Java Servlets. :app:`Pyramid` requires that
your application be served as a WSGI application.
@@ -330,8 +330,8 @@ Glossary
*Middleware* is a :term:`WSGI` concept. It is a WSGI component
that acts both as a server and an application. Interesting uses
for middleware exist, such as caching, content-transport
- encoding, and other functions. See `WSGI.org
- <http://wsgi.readthedocs.org/en/latest/>`_ or `PyPI
+ encoding, and other functions. See `WSGI documentation
+ <https://wsgi.readthedocs.io/en/latest/>`_ or `PyPI
<https://pypi.python.org/pypi>`_ to find middleware for your application.
pipeline
@@ -339,7 +339,7 @@ Glossary
server, a WSGI application, with a set of :term:`middleware` in-between.
Zope
- `The Z Object Publishing Framework <http://zope.org>`_, a
+ `The Z Object Publishing Framework <http://www.zope.org/en/latest/>`_, a
full-featured Python web framework.
Grok
@@ -357,7 +357,7 @@ Glossary
Python object store.
WebOb
- `WebOb <http://webob.org>`_ is a WSGI request/response
+ `WebOb <https://webob.org>`_ is a WSGI request/response
library created by Ian Bicking.
PasteDeploy
@@ -375,7 +375,7 @@ Glossary
integrated support for loading a :term:`PasteDeploy` INI file.
Chameleon
- `chameleon <https://chameleon.readthedocs.org/en/latest/>`_ is an
+ `chameleon <https://chameleon.readthedocs.io/en/latest/>`_ is an
attribute language template compiler which supports the :term:`ZPT`
templating specification. It is written and maintained by Malthe Borch. It
has several extensions, such as the ability to use bracketed (Mako-style)
@@ -401,7 +401,7 @@ Glossary
A `text templating language <http://jinja.pocoo.org/>`_ by Armin Ronacher.
Routes
- A `system by Ben Bangert <http://routes.readthedocs.org/en/latest/>`_
+ A `system by Ben Bangert <https://routes.readthedocs.io/en/latest/>`_
which parses URLs and compares them against a number of user defined
mappings. The URL pattern matching syntax in :app:`Pyramid` is inspired by
the Routes syntax (which was inspired by Ruby On Rails pattern syntax).
@@ -500,7 +500,7 @@ Glossary
information.
repoze.who
- `Authentication middleware <http://repozewho.readthedocs.org/en/latest/>`_
+ `Authentication middleware <https://repozewho.readthedocs.io/en/latest/>`_
for :term:`WSGI` applications. It can be used by :app:`Pyramid` to
provide authentication information.
@@ -576,7 +576,7 @@ Glossary
:ref:`adding_and_overriding_renderers` for more information.
mod_wsgi
- `mod_wsgi <https://modwsgi.readthedocs.io>`_ is an Apache
+ `mod_wsgi <https://modwsgi.readthedocs.io/en/develop/>`_ is an Apache
module developed by Graham Dumpleton. It allows :term:`WSGI` applications
(such as applications developed using :app:`Pyramid`) to be served using
the Apache web server.
@@ -1130,7 +1130,7 @@ Glossary
The :term:`Python Packaging Authority` formerly recommended using the
``pyvenv`` command for `creating virtual environments on Python 3.4 and
3.5
- <https://packaging.python.org/en/latest/installing/#creating-virtual-environments>`_,
+ <https://packaging.python.org/tutorials/installing-packages/#creating-virtual-environments>`_,
but it was deprecated in 3.6 in favor of ``python3 -m venv`` on UNIX or
``python -m venv`` on Windows, which is backward compatible on Python
3.3 and greater.
diff --git a/docs/narr/firstapp.rst b/docs/narr/firstapp.rst
index ad05976c0..63142edac 100644
--- a/docs/narr/firstapp.rst
+++ b/docs/narr/firstapp.rst
@@ -197,7 +197,7 @@ method returns a :term:`WSGI` application object that can be used by any WSGI
server to present an application to a requestor. :term:`WSGI` is a protocol
that allows servers to talk to Python applications. We don't discuss
:term:`WSGI` in any depth within this book, but you can learn more about it by
-reading its `documentation <http://wsgi.readthedocs.org/en/latest/>`_.
+reading its `documentation <https://wsgi.readthedocs.io/en/latest/>`_.
The :app:`Pyramid` application object, in particular, is an instance of a class
representing a :app:`Pyramid` :term:`router`. It has a reference to the
diff --git a/docs/narr/hooks.rst b/docs/narr/hooks.rst
index 81c8e81d7..f9bb72986 100644
--- a/docs/narr/hooks.rst
+++ b/docs/narr/hooks.rst
@@ -1059,8 +1059,8 @@ enabling you to set up the utility in advance:
server = make_server('0.0.0.0', 8080, app)
server.serve_forever()
-For full details, please read the `Venusian documentation
-<http://docs.repoze.org/venusian>`_.
+For full details, please read the :ref:`Venusian documentation <venusian:venusian>`.
+
.. _registering_tweens:
diff --git a/docs/narr/i18n.rst b/docs/narr/i18n.rst
index 29d4dd02a..e64584322 100644
--- a/docs/narr/i18n.rst
+++ b/docs/narr/i18n.rst
@@ -647,7 +647,7 @@ before being rendered:
The features represented by attributes of the ``i18n`` namespace of Chameleon
will also consult the :app:`Pyramid` translations. See
-http://chameleon.readthedocs.org/en/latest/reference.html#translation-i18n.
+https://chameleon.readthedocs.io/en/latest/reference.html#translation-i18n.
.. note::
diff --git a/docs/narr/install.rst b/docs/narr/install.rst
index c2bd00bff..61c6e6c25 100644
--- a/docs/narr/install.rst
+++ b/docs/narr/install.rst
@@ -54,7 +54,7 @@ recommended to install the latest 3.x version of Python.
You can install the latest verion of Python for Mac OS X from the binaries on
`python.org <https://www.python.org/downloads/mac-osx/>`_.
-Alternatively, you can use the `homebrew <http://brew.sh/>`_ package manager.
+Alternatively, you can use the `homebrew <https://brew.sh/>`_ package manager.
.. code-block:: text
@@ -157,7 +157,7 @@ application, rather than being installed system wide.
.. seealso:: See the Python Packaging Authority's (PyPA) documention
`Requirements for Installing Packages
- <https://packaging.python.org/en/latest/installing/#requirements-for-installing-packages>`_
+ <https://packaging.python.org/tutorials/installing-packages/#requirements-for-installing-packages>`_
for full details.
diff --git a/docs/narr/introduction.rst b/docs/narr/introduction.rst
index 4efc35d25..efc8825a1 100644
--- a/docs/narr/introduction.rst
+++ b/docs/narr/introduction.rst
@@ -52,7 +52,7 @@ Modern
Tested
~~~~~~
-Untested code is broken by design. The :app:`Pyramid` community has a strong testing culture and our framework reflects that. Every release of :app:`Pyramid` has 100% statement coverage (as measured by `coverage <https://coverage.readthedocs.io>`_) and 95% decision/condition coverage. (as measured by `instrumental <http://instrumental.readthedocs.io/en/latest/intro.html>`_) It is automatically tested using `Travis <https://travis-ci.org/Pylons/pyramid>`_ and `Jenkins <http://jenkins.pylonsproject.org/job/pyramid/>`_ on supported versions of Python after each commit to its GitHub repository. `Official Pyramid add-ons <https://trypyramid.com/resources-extending-pyramid.html>`_ are held to a similar testing standard.
+Untested code is broken by design. The :app:`Pyramid` community has a strong testing culture and our framework reflects that. Every release of :app:`Pyramid` has 100% statement coverage (as measured by `coverage <http://coverage.readthedocs.io/en/latest/>`_) and 95% decision/condition coverage. (as measured by `instrumental <http://instrumental.readthedocs.io/en/latest/intro.html>`_) It is automatically tested using `Travis <https://travis-ci.org/Pylons/pyramid>`_ and `Jenkins <http://jenkins.pylonsproject.org/job/pyramid/>`_ on supported versions of Python after each commit to its GitHub repository. `Official Pyramid add-ons <https://trypyramid.com/resources-extending-pyramid.html>`_ are held to a similar testing standard.
We still find bugs in :app:`Pyramid`, but we've noticed we find a lot fewer of them while working on projects with a solid testing regime.
@@ -324,7 +324,7 @@ Build fast applications
The :app:`Pyramid` core is fast. It has been engineered from the ground up for speed. It only does as much work as absolutely necessary when you ask it to get a job done. If you need speed from your application, :app:`Pyramid` is the right choice for you.
-Example: http://blog.curiasolutions.com/pages/the-great-web-framework-shootout.html
+Example: https://blog.curiasolutions.com/pages/the-great-web-framework-shootout.html
Store session data
~~~~~~~~~~~~~~~~~~
diff --git a/docs/narr/project.rst b/docs/narr/project.rst
index 776a0de44..1de8c301c 100644
--- a/docs/narr/project.rst
+++ b/docs/narr/project.rst
@@ -85,7 +85,7 @@ On all platforms, generate a project using cookiecutter.
.. code-block:: bash
- $ cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout 1.9-branch
+ $ cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master
If prompted for the first item, accept the default ``yes`` by hitting return.
@@ -740,7 +740,7 @@ testing, as well as distributing your application.
``setup.py`` is the de facto standard which Python developers use to
distribute their reusable code. You can read more about ``setup.py`` files
and their usage in the `Python Packaging User Guide
- <https://packaging.python.org/en/latest/>`_ and `Setuptools documentation
+ <https://packaging.python.org/>`_ and `Setuptools documentation
<http://pythonhosted.org/setuptools/>`_.
Our generated ``setup.py`` looks like this:
diff --git a/docs/narr/scaffolding.rst b/docs/narr/scaffolding.rst
index 27239d34e..82ae0f9ac 100644
--- a/docs/narr/scaffolding.rst
+++ b/docs/narr/scaffolding.rst
@@ -27,7 +27,7 @@ found by the ``pcreate`` command.
To create a scaffold template, create a Python :term:`distribution` to house
the scaffold which includes a ``setup.py`` that relies on the ``setuptools``
package. See `Packaging and Distributing Projects
-<https://packaging.python.org/en/latest/distributing/>`_ for more information
+<https://packaging.python.org/tutorials/distributing-packages/>`_ for more information
about how to do this. For example, we'll pretend the distribution you create
is named ``CoolExtension``, and it has a package directory within it named
``coolextension``.
diff --git a/docs/narr/sessions.rst b/docs/narr/sessions.rst
index 7e2469d54..b34d7a4f1 100644
--- a/docs/narr/sessions.rst
+++ b/docs/narr/sessions.rst
@@ -174,10 +174,10 @@ pyramid_beaker_ Beaker_ Session factory for Pyramid
.. _PyNaCl: https://pynacl.readthedocs.io/en/latest/secret/
.. _pyramid_redis_sessions: https://pypi.python.org/pypi/pyramid_redis_sessions
-.. _Redis: http://redis.io/
+.. _Redis: https://redis.io/
.. _pyramid_beaker: https://pypi.python.org/pypi/pyramid_beaker
-.. _Beaker: http://beaker.readthedocs.org/en/latest/
+.. _Beaker: https://beaker.readthedocs.io/en/latest/
.. index::
single: session factory (custom)
diff --git a/docs/narr/templates.rst b/docs/narr/templates.rst
index 6738e9270..156cb863f 100644
--- a/docs/narr/templates.rst
+++ b/docs/narr/templates.rst
@@ -448,7 +448,7 @@ templating languages including the following:
| Mako_ | pyramid_mako_ | .mak, .mako |
+---------------------------+----------------------------+--------------------+
-.. _Chameleon: http://chameleon.readthedocs.org/en/latest/
+.. _Chameleon: https://chameleon.readthedocs.io/en/latest/
.. _pyramid_chameleon:
https://docs.pylonsproject.org/projects/pyramid-chameleon/en/latest/
diff --git a/docs/narr/webob.rst b/docs/narr/webob.rst
index 578fdeb51..406351562 100644
--- a/docs/narr/webob.rst
+++ b/docs/narr/webob.rst
@@ -27,7 +27,7 @@ functionality to the standard WebOb request, which is documented in the
:ref:`request_module` API documentation.
WebOb provides objects for HTTP requests and responses. Specifically it does
-this by wrapping the `WSGI <http://wsgi.readthedocs.org/en/latest/>`_ request
+this by wrapping the `WSGI <https://wsgi.readthedocs.io/en/latest/>`_ request
environment and response status, header list, and app_iter (body) values.
WebOb request and response objects provide many conveniences for parsing WSGI
@@ -88,7 +88,7 @@ below.
``req.urlvars`` and ``req.urlargs``
``req.urlvars`` are the keyword parameters associated with the request URL.
``req.urlargs`` are the positional parameters. These are set by products
- like `Routes <http://routes.readthedocs.org/en/latest/>`_ and `Selector
+ like `Routes <https://routes.readthedocs.io/en/latest/>`_ and `Selector
<https://github.com/lukearno/selector>`_.
Also for standard HTTP request headers, there are usually attributes such as
diff --git a/docs/quick_tour.rst b/docs/quick_tour.rst
index 5679b0dc8..f95bff4df 100644
--- a/docs/quick_tour.rst
+++ b/docs/quick_tour.rst
@@ -510,7 +510,7 @@ Let's use the cookiecutter ``pyramid-cookiecutter-starter`` to create a starter
.. code-block:: bash
- $ $VENV/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout 1.9-branch
+ $ $VENV/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master
If prompted for the first item, accept the default ``yes`` by hitting return.
@@ -858,7 +858,7 @@ Pyramid and SQLAlchemy are great friends. That friendship includes a cookiecutte
.. code-block:: bash
$ cd ~
- $ env/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-alchemy --checkout 1.9-branch
+ $ env/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-alchemy --checkout master
If prompted for the first item, accept the default ``yes`` by hitting return.
diff --git a/docs/quick_tutorial/cookiecutters.rst b/docs/quick_tutorial/cookiecutters.rst
index 0f2a24816..f8568206d 100644
--- a/docs/quick_tutorial/cookiecutters.rst
+++ b/docs/quick_tutorial/cookiecutters.rst
@@ -28,7 +28,7 @@ Steps
.. code-block:: bash
- $ $VENV/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout 1.9-branch
+ $ $VENV/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master
If prompted for the first item, accept the default ``yes`` by hitting return.
diff --git a/docs/quick_tutorial/debugtoolbar.rst b/docs/quick_tutorial/debugtoolbar.rst
index b02363d40..4402fcdbd 100644
--- a/docs/quick_tutorial/debugtoolbar.rst
+++ b/docs/quick_tutorial/debugtoolbar.rst
@@ -75,7 +75,7 @@ configuration for the debugtoolbar.
You'll now see an attractive button on the right side of your browser, which
you may click to provide introspective access to debugging information in a new
-rowser tab. Even better, if your web application generates an error, you will
+browser tab. Even better, if your web application generates an error, you will
see a nice traceback on the screen. When you want to disable this toolbar,
there's no need to change code: you can remove it from ``pyramid.includes`` in
the relevant ``.ini`` configuration file (thus showing why configuration files
diff --git a/docs/quick_tutorial/package.rst b/docs/quick_tutorial/package.rst
index 94cb39fc9..66bafcdb9 100644
--- a/docs/quick_tutorial/package.rst
+++ b/docs/quick_tutorial/package.rst
@@ -108,4 +108,4 @@ idea to run a Python module inside a package directly as a script.
.. seealso:: :ref:`Python Packages <python:tut-packages>` and `Working in
"Development Mode"
- <https://packaging.python.org/en/latest/distributing/#working-in-development-mode>`_.
+ <https://packaging.python.org/tutorials/distributing-packages/#working-in-development-mode>`_.
diff --git a/docs/tutorials/modwsgi/index.rst b/docs/tutorials/modwsgi/index.rst
index 8df432434..a409284cc 100644
--- a/docs/tutorials/modwsgi/index.rst
+++ b/docs/tutorials/modwsgi/index.rst
@@ -39,7 +39,7 @@ specific path information for commands and files.
.. code-block:: bash
$ cd ~
- $ cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout 1.9-branch
+ $ cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master
If prompted for the first item, accept the default ``yes`` by hitting return.
diff --git a/docs/tutorials/wiki/installation.rst b/docs/tutorials/wiki/installation.rst
index fba488aa9..f87d58b90 100644
--- a/docs/tutorials/wiki/installation.rst
+++ b/docs/tutorials/wiki/installation.rst
@@ -31,7 +31,7 @@ On UNIX
.. code-block:: bash
$ cd ~
- $ cookiecutter gh:Pylons/pyramid-cookiecutter-zodb --checkout 1.9-branch
+ $ cookiecutter gh:Pylons/pyramid-cookiecutter-zodb --checkout master
On Windows
^^^^^^^^^^
@@ -39,7 +39,7 @@ On Windows
.. code-block:: doscon
c:\> cd \
- c:\> cookiecutter gh:Pylons/pyramid-cookiecutter-zodb --checkout 1.9-branch
+ c:\> cookiecutter gh:Pylons/pyramid-cookiecutter-zodb --checkout master
On all operating systems
^^^^^^^^^^^^^^^^^^^^^^^^
@@ -388,4 +388,4 @@ assumptions:
https://docs.pylonsproject.org/projects/pyramid-zodbconn/en/latest/
.. _transaction:
- http://zodb.readthedocs.org/en/latest/transactions.html
+ https://zodb.readthedocs.io/en/latest/transactions.html
diff --git a/docs/tutorials/wiki2/installation.rst b/docs/tutorials/wiki2/installation.rst
index d2c33081c..7076d03bf 100644
--- a/docs/tutorials/wiki2/installation.rst
+++ b/docs/tutorials/wiki2/installation.rst
@@ -43,7 +43,7 @@ On UNIX
.. code-block:: bash
$ cd ~
- $ cookiecutter gh:Pylons/pyramid-cookiecutter-alchemy --checkout 1.9-branch
+ $ cookiecutter gh:Pylons/pyramid-cookiecutter-alchemy --checkout master
On Windows
^^^^^^^^^^
@@ -51,7 +51,7 @@ On Windows
.. code-block:: doscon
c:\> cd \
- c:\> cookiecutter gh:Pylons/pyramid-cookiecutter-alchemy --checkout 1.9-branch
+ c:\> cookiecutter gh:Pylons/pyramid-cookiecutter-alchemy --checkout master
On all operating systems
^^^^^^^^^^^^^^^^^^^^^^^^
@@ -471,4 +471,4 @@ assumptions:
https://pypi.python.org/pypi/zope.sqlalchemy
.. _transaction:
- http://zodb.readthedocs.org/en/latest/transactions.html
+ https://zodb.readthedocs.io/en/latest/transactions.html
diff --git a/docs/typographical-conventions.rst b/docs/typographical-conventions.rst
index 5efc49682..f128effea 100644
--- a/docs/typographical-conventions.rst
+++ b/docs/typographical-conventions.rst
@@ -35,7 +35,7 @@ Links
Links are presented as follows, and may be clickable.
-`TryPyramid <https://TryPyramid.com>`_
+`TryPyramid <https://trypyramid.com>`_
.. seealso:: See also :ref:`typographical-conventions-cross-references` for other links within the documentation.
diff --git a/docs/whatsnew-1.9.rst b/docs/whatsnew-1.9.rst
index ea3b4b350..17d6126d6 100644
--- a/docs/whatsnew-1.9.rst
+++ b/docs/whatsnew-1.9.rst
@@ -18,6 +18,7 @@ Major Feature Additions
The first library to use this feature is `pyramid_retry <https://docs.pylonsproject.org/projects/pyramid-retry/en/latest/>`_.
+ Pyramid's default :term:`execution policy` will attempt to handle and render uncaught exceptions. This is a subtle, but fundamental, change indicating that an :term:`exception view` may expect to be called outside of the default ``EXCVIEW`` tween. There are various predicates available to assist in defining valid exception views for various parts of the pipeline. For example, ``pyramid_tm`` defines the ``tm_active=True`` predicate which can be applied to exception views that require access to the default transaction. In general this means that exception views may be expected to cover more possible error conditions, including when exceptions occur from tweens that are placed **OVER** the ``EXCVIEW`` tween. If necessary, when provided a ``response`` object, you may inspect ``request.exception`` or ``request.exc_info`` to determine if the response was generated as the result of an exception.
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.
diff --git a/pyramid/request.py b/pyramid/request.py
index c1c1da514..201f1d648 100644
--- a/pyramid/request.py
+++ b/pyramid/request.py
@@ -175,7 +175,7 @@ class Request(
version number from which this documentation is autogenerated, but
it will be the 'prevailing WebOb version' at the time of the
release of this :app:`Pyramid` version. See
- http://webob.org/ for further information.
+ https://webob.org/ for further information.
"""
exception = None
exc_info = None
diff --git a/setup.cfg b/setup.cfg
index 6f1f33760..3bf28ee15 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -66,3 +66,13 @@ ignore =
W391
exclude = pyramid/tests/,pyramid/compat.py,pyramid/resource.py
show-source = True
+
+[check-manifest]
+ignore =
+ .gitignore
+ PKG-INFO
+ *.egg-info
+ *.egg-info/*
+ignore-default-rules = true
+ignore-bad-ideas =
+ pyramid/tests/pkgs/localeapp/*
diff --git a/setup.py b/setup.py
index 840dcfdb5..2af0535c3 100644
--- a/setup.py
+++ b/setup.py
@@ -12,18 +12,14 @@
#
##############################################################################
-import os
-
from setuptools import setup, find_packages
-here = os.path.abspath(os.path.dirname(__file__))
-try:
- with open(os.path.join(here, 'README.rst')) as f:
- README = f.read()
- with open(os.path.join(here, 'CHANGES.txt')) as f:
- CHANGES = f.read()
-except IOError:
- README = CHANGES = ''
+def readfile(name):
+ with open(name) as f:
+ return f.read()
+
+README = readfile('README.rst')
+CHANGES = readfile('CHANGES.txt')
install_requires = [
'setuptools',
@@ -61,7 +57,7 @@ testing_extras = tests_require + [
]
setup(name='pyramid',
- version='1.9b1',
+ version='1.10.dev0',
description='The Pyramid Web Framework, a Pylons project',
long_description=README + '\n\n' + CHANGES,
classifiers=[
diff --git a/tox.ini b/tox.ini
index 242decfc4..4e1b4f728 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,9 +1,8 @@
[tox]
envlist =
- py27,py34,py35,py36,py37,pypy,
- docs,pep8,
- {py2,py3}-cover,coverage,
-skip_missing_interpreters = True
+ lint,
+ py27,py34,py35,py36,pypy,
+ docs,{py2,py3}-cover,coverage,
[testenv]
# Most of these are defaults but if you specify any you can't fall back
@@ -52,14 +51,20 @@ commands =
python pyramid/scaffolds/tests.py
deps = virtualenv
-[testenv:pep8]
+[testenv:lint]
+skip_install = True
basepython = python3.5
commands =
flake8 pyramid/
+ python setup.py check -r -s -m
+ check-manifest
deps =
flake8
+ readme_renderer
+ check-manifest
[testenv:docs]
+skip_install = True
basepython = python3.5
whitelist_externals = make
commands =
@@ -67,6 +72,7 @@ commands =
make -C docs doctest html epub BUILDDIR={envdir} "SPHINXOPTS=-W -E"
[testenv:pdf]
+skip_install = True
basepython = python3.5
whitelist_externals = make
commands =
@@ -93,6 +99,7 @@ setenv =
COVERAGE_FILE=.coverage.py3
[testenv:coverage]
+skip_install = True
basepython = python3.5
commands =
coverage erase