From 35b86d50c3d32360ec69800078928dff95f9ff46 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 17 Aug 2019 02:44:45 -0700 Subject: [PATCH 1/2] run linkcheck, fix redirects, change busted links to inline literals --- BFG_HISTORY.rst | 58 +++++++++++++------------- HISTORY.rst | 48 ++++++++++----------- docs/conf.py | 1 + docs/copyright.rst | 4 +- docs/designdefense.rst | 8 ++-- docs/glossary.rst | 20 ++++----- docs/index.rst | 4 +- docs/narr/introduction.rst | 6 +-- docs/narr/renderers.rst | 4 +- docs/narr/templates.rst | 2 +- docs/narr/testing.rst | 2 +- docs/quick_tour.rst | 2 +- docs/quick_tutorial/jinja2.rst | 2 +- docs/quick_tutorial/routing.rst | 2 +- docs/tutorials/wiki2/definingviews.rst | 2 +- src/pyramid/csrf.py | 6 +-- 16 files changed, 86 insertions(+), 85 deletions(-) diff --git a/BFG_HISTORY.rst b/BFG_HISTORY.rst index 923996bdea..a62c39f420 100644 --- a/BFG_HISTORY.rst +++ b/BFG_HISTORY.rst @@ -1004,8 +1004,8 @@ Documentation via a group rather than via a direct username. - Redirect requests for tutorial sources to - http://docs.repoze.org/bfgwiki-1.3 and - http://docs.repoze.org/bfgwiki2-1.3/ respectively. + https://docs.pylonsproject.org/projects/pyramid/en/latest/tutorials/wiki/index.html and + https://docs.pylonsproject.org/projects/pyramid/en/latest/tutorials/wiki2/index.html respectively. - A section named ``Custom Route Predicates`` was added to the URL Dispatch narrative chapter. @@ -1140,8 +1140,8 @@ Features This feature was kindly contributed by Andrey Popp. -- Use "Venusian" (`http://docs.repoze.org/venusian - `_) to perform ``bfg_view`` +- Use "Venusian" (`https://docs.pylonsproject.org/projects/venusian/en/latest/ + `_) to perform ``bfg_view`` decorator scanning rather than relying on a BFG-internal decorator scanner. (Truth be told, Venusian is really just a generalization of the BFG-internal decorator scanner). @@ -1525,10 +1525,10 @@ Documentation Licensing - Loosen the documentation licensing to allow derivative works: it is now offered under the `Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License - `_. This is + `_. This is only a documentation licensing change; the ``repoze.bfg`` software continues to be offered under the Repoze Public License at - http://repoze.org/license.html (BSD-like). + https://web.archive.org/web/20190401024809/http://repoze.org/license.html (BSD-like). 1.2a9 (2009-12-27) ================== @@ -1540,10 +1540,10 @@ Documentation Licensing within the ``docs`` directory) in this release is now offered under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License as described by - http://creativecommons.org/licenses/by-nc-nd/3.0/us/ . This is only + https://creativecommons.org/licenses/by-nc-nd/3.0/us/ . This is only a licensing change for the documentation; the ``repoze.bfg`` software continues to be offered under the Repoze Public License - at http://repoze.org/license.html (BSD-like). + at https://web.archive.org/web/20190401024809/http://repoze.org/license.html (BSD-like). Documentation ------------- @@ -1893,8 +1893,8 @@ Features to create a simple ``repoze.bfg`` application any longer. Imperative configuration makes ``repoze.bfg`` competitive with - "microframeworks" such as `Bottle `_ and - `Tornado `_. ``repoze.bfg`` has a good + "microframeworks" such as `Bottle `_ and + `Tornado `_. ``repoze.bfg`` has a good deal of functionality that most microframeworks lack, so this is hopefully a "best of both worlds" feature. @@ -2976,7 +2976,7 @@ Documentation ``repoze.bfg`` application. - Added a tutorial which explains how to run a ``repoze.bfg`` - application under `mod_wsgi `_. + application under `mod_wsgi `_. See "Running a repoze.bfg Application under mod_wsgi" in the tutorials section of the documentation. @@ -3406,7 +3406,7 @@ Backwards Incompatibilities - Added a workaround for a bug in Python 2.6, 2.6.1, and 2.6.2 having to do with a recursion error in the mimetypes module when trying to serve static files from Paste's FileApp: - http://bugs.python.org/issue5853. Symptom: File + https://bugs.python.org/issue5853. Symptom: File "/usr/lib/python2.6/mimetypes.py", line 244, in guess_type return guess_type(url, strict) RuntimeError: maximum recursion depth exceeded. Thanks to Armin Ronacher for identifying the symptom and @@ -4610,8 +4610,7 @@ Bug Fixes To resolve this issue, the urldispatch module was fixed, and a fork of the Routes trunk was put into the "dev" index named ``Routes-1.11dev-chrism-home``. The source for the fork exists at - `http://bitbucket.org/chrism/routes-home/ - `_ (broken link); + ``http://bitbucket.org/chrism/routes-home/`` (broken link); its contents have been merged into the Routes trunk (what will be Routes 1.11). @@ -4752,8 +4751,7 @@ Incompatibilities related to making ``repoze.bfg`` "C-free": opposed to pure Python) and the ``repoze.bfg`` core is "C-free" as of this release. You may get Genshi-style Chameleon support back by installing the ``repoze.bfg.chameleon_genshi`` package availalable - from http://svn.repoze.org/repoze.bfg.chameleon_genshi (also - available in the index at http://dist.repoze.org/bfg/0.8/simple). + from https://pypi.org/project/repoze.bfg.chameleon_genshi/. All existing code that depended on the ``chameleon_genshi`` module prior to this release of ``repoze.bfg`` should work without change after this addon is installed. @@ -4763,8 +4761,10 @@ Incompatibilities related to making ``repoze.bfg`` "C-free": which is implemented in C, and the ``repoze.bfg`` core is "C-free" as of this release. You bay get XSL templating back by installing the ``repoze.bfg.xslt`` package available from - http://svn.repoze.org/repoze.bfg.xslt/ (also available in the index - at http://dist.repoze.org/bfg/0.8/simple). All existing code that + ``http://svn.repoze.org/repoze.bfg.xslt/`` (broken link) + (also available in the index + at ``http://dist.repoze.org/bfg/0.8/simple)`` (broken link). + All existing code that depended upon the ``xslt`` module prior to this release of ``repoze.bfg`` should work without modification after this addon is installed. @@ -4796,10 +4796,10 @@ Index-Related ------------- - The canonical package index location for ``repoze.bfg`` has changed. - The "old" index (http://dist.repoze.org/lemonade/dev/simple) has - been superseded by a new index location - (`http://dist.repoze.org/bfg/current/simple - `_). The installation + The "old" index (``http://dist.repoze.org/lemonade/dev/simple``) (broken link) + has been superseded by a new index location + ``http://dist.repoze.org/bfg/current/simple`` (broken link). + The installation documentation has been updated as well as the ``setup.cfg`` file in this package. The "lemonade" index still exists, but it is not guaranteed to have the latest BFG software in it, nor will it be @@ -4927,7 +4927,7 @@ Backwards Incompatibilities default ``ModelGraphTraverser``. To use this feature, you will need to install the ``repoze.bfg.traversalwrapper`` package (an add-on package, available at - http://svn.repoze.org/repoze.bfg.traversalwrapper) Then change your + https://pypi.org/project/repoze.bfg.traversalwrapper/) Then change your application's ``configure.zcml`` to include the following stanza: `_). A new ``route`` directive has been + `_). A new ``route`` directive has been added to the available list of ZCML directives. Each ``route`` directive inserted into your application's ``configure.zcml`` establishes a Routes mapper connection. If any ``route`` @@ -5498,7 +5498,7 @@ Features requests (and this is indeed the default). All requests implement ``IRequest``. The HTTP-verb-matching idea was pioneered by `repoze.bfg.restrequest - `_ . That + `_ . That package is no longer required, but still functions fine. Bug Fixes @@ -5606,8 +5606,8 @@ Features keyword argument named ``query``. The value of this argument will be used to compose a query string, which will be attached to the generated URL before it is returned. See the API docs (in - the docs directory or `on the web - `_) for more information. + the docs directory or on the web + ``http://static.repoze.org/bfgdocs``) (broken URL) for more information. 0.6 (2008-12-26) ================ @@ -5618,7 +5618,7 @@ Backwards Incompatibilities - Rather than prepare the "stock" implementations of the ZCML directives from the ``zope.configuration`` package for use under ``repoze.bfg``, ``repoze.bfg`` now makes available the implementations of directives - from the ``repoze.zcml`` package (see http://static.repoze.org/zcmldocs). + from the ``repoze.zcml`` package (see https://pypi.org/project/repoze.zcml/). As a result, the ``repoze.bfg`` package now depends on the ``repoze.zcml`` package, and no longer depends directly on the ``zope.component``, ``zope.configuration``, ``zope.interface``, or @@ -5642,7 +5642,7 @@ Backwards Incompatibilities package="zope.component" file="meta.zcml">``) and include the ``zope.security`` package as an ``install_requires`` dependency or 2) change the ZCML in their applications to use the declarations from - `repoze.zcml `_ instead of the stock + `repoze.zcml `_ instead of the stock declarations. ``repoze.zcml`` only makes available the ``adapter``, ``subscriber`` and ``utility`` directives. diff --git a/HISTORY.rst b/HISTORY.rst index 3ca751dfe4..4fd13119dd 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -550,10 +550,10 @@ Features other settings. See https://github.com/Pylons/pyramid/pull/2823 - ``pserve --reload`` now uses the - `hupper ` + `hupper `_ library to monitor file changes. This comes with many improvements: - - If the `watchdog `_ package is + - If the `watchdog `_ package is installed then monitoring will be done using inotify instead of cpu and disk-intensive polling. @@ -686,7 +686,7 @@ Documentation Changes https://github.com/Pylons/pyramid/pull/2838 - Add `pyramid_nacl_session - `_ + `_ to session factories. See https://github.com/Pylons/pyramid/issues/2791 - Update ``HACKING.txt`` from stale branch that was never merged to master. @@ -1000,7 +1000,7 @@ Bug Fixes - Ensure that ``IAssetDescriptor.abspath`` always returns an absolute path. There were cases depending on the process CWD that a relative path would - be returned. See https://github.com/Pylons/pyramid/issues/2188 + be returned. See https://github.com/Pylons/pyramid/pull/2188 1.6b2 (2015-10-15) ================== @@ -1204,7 +1204,7 @@ Features override_with='/abs/path/')``. The ``myapp:static`` asset spec is completely made up and does not need to exist - it is used for generating urls via ``request.static_url('myapp:static/foo.png')``. - See https://github.com/Pylons/pyramid/issues/1252 + See https://github.com/Pylons/pyramid/pull/1252 - Added ``pyramid.config.Configurator.set_response_factory`` and the ``response_factory`` keyword argument to the ``Configurator`` for defining @@ -1523,7 +1523,7 @@ Bug Fixes - Remove unused ``renderer`` argument from ``Configurator.add_route``. -- Allow the ``BasicAuthenticationPolicy`` to work with non-ascii usernames +- Allow the ``BasicAuthenticationPolicy`` to work with non-ASCII usernames and passwords. The charset is not passed as part of the header and different browsers alternate between UTF-8 and Latin-1, so the policy now attempts to decode with UTF-8 first, and will fallback to Latin-1. @@ -2489,7 +2489,7 @@ Bug Fixes it back to an asset spec. Normally occurs with inherited templates or included components. https://github.com/Pylons/pyramid/issues/606 - https://github.com/Pylons/pyramid/issues/607 + https://github.com/Pylons/pyramid/pull/607 - In Mako Templates lookup, check for absolute uri (using mako directories) when mixing up inheritance with asset specs. @@ -2980,7 +2980,7 @@ Features argument, which can be a string, a callable, or a list consisting of strings and/or callables. This feature allows submodules, subpackages, and global objects from being scanned. See - http://readthedocs.org/docs/venusian/en/latest/#ignore-scan-argument for + https://venusian.readthedocs.io/en/latest/#ignore-scan-argument for more information about how to use the ``ignore`` argument to ``scan``. - Better error messages when a view callable returns a value that cannot be @@ -3138,7 +3138,7 @@ Features - Responses generated by Pyramid's ``static_view`` now use a ``wsgi.file_wrapper`` (see - http://www.python.org/dev/peps/pep-0333/#optional-platform-specific-file-handling) + https://www.python.org/dev/peps/pep-0333/#optional-platform-specific-file-handling) when one is provided by the web server. Bug Fixes @@ -3292,7 +3292,7 @@ Documentation - Removed the "Running Pyramid on Google App Engine" tutorial from the main docs. It survives on in the Cookbook - (http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/deployment/gae.html). + (https://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/deployment/gae.html). Rationale: it provides the correct info for the Python 2.5 version of GAE only, and this version of Pyramid does not support Python 2.5. @@ -3944,7 +3944,7 @@ Scaffolds package at all; configuration in the ``production.ini`` file which used to require its ``error_catcher`` middleware has been removed. Configuring error catching / email sending is now the domain of the ``pyramid_exclog`` - package (see http://docs.pylonsproject.org/projects/pyramid_exclog/en/latest/). + package (see https://docs.pylonsproject.org/projects/pyramid_exclog/en/latest/). Bug Fixes --------- @@ -4561,7 +4561,7 @@ Bug Fixes ``/{foo:\d{1,2}}`` would fail to match ``/1`` or ``/11``. One level of inner squiggly brackets is now recognized so that the prior two patterns given as examples now work. See also - https://github.com/Pylons/pyramid/issues/#issue/123. + https://github.com/Pylons/pyramid/issues/123. - Don't send port numbers along with domain information in cookies set by AuthTktCookieHelper (see https://github.com/Pylons/pyramid/issues/131). @@ -4576,11 +4576,11 @@ Bug Fixes - Don't quote ``:@&+$,`` symbols in ``*elements`` passed to ``pyramid.url.route_url`` or ``pyramid.url.resource_url`` (see - https://github.com/Pylons/pyramid/issues#issue/141). + https://github.com/Pylons/pyramid/pull/141). - Include SCRIPT_NAME in redirects issued by ``pyramid.view.append_slash_notfound_view`` (see - https://github.com/Pylons/pyramid/issues#issue/149). + https://github.com/Pylons/pyramid/issues/149). - Static views registered with ``config.add_static_view`` which also included a ``permission`` keyword argument would not work as expected, because @@ -4802,7 +4802,7 @@ Documentation - Moved "Using ZODB With ZEO" and "Using repoze.catalog Within Pyramid" tutorials out of core documentation and into the Pyramid Tutorials site - (http://docs.pylonsproject.org/projects/pyramid_tutorials/en/latest/). + (https://docs.pylonsproject.org/projects/pyramid_tutorials/en/latest/). - Changed "Cleaning up After a Request" section in the URL Dispatch chapter to use ``request.add_finished_callback`` instead of jamming an object with @@ -4878,19 +4878,19 @@ Bug Fixes ``{{project}}`` variable, causing applications created with uppercase letters e.g. ``paster create -t pyramid_routesalchemy Dibbus`` to fail to start when ``paster serve development.ini`` was used against the result. - See https://github.com/Pylons/pyramid/issues/#issue/107 + See https://github.com/Pylons/pyramid/issues/107 - The ``render_view`` method of ``pyramid.renderers.RendererHelper`` passed an incorrect value into the renderer for ``renderer_info``. It now passes an instance of ``RendererHelper`` instead of a dictionary, which is consistent with other usages. See - https://github.com/Pylons/pyramid/issues#issue/106 + https://github.com/Pylons/pyramid/issues/106 - A bug existed in the ``pyramid.authentication.AuthTktCookieHelper`` which would break any usage of an AuthTktAuthenticationPolicy when one was configured to reissue its tokens (``reissue_time`` < ``timeout`` / ``max_age``). Symptom: ``ValueError: ('Invalid token %r', '')``. See - https://github.com/Pylons/pyramid/issues#issue/108. + https://github.com/Pylons/pyramid/issues/108. 1.0b1 (2011-01-21) ================== @@ -4908,7 +4908,7 @@ Features sets a cookie with a wildcard domain will be turned off. - Add a ``MANIFEST.in`` file to each paster template. See - https://github.com/Pylons/pyramid/issues#issue/95 + https://github.com/Pylons/pyramid/issues/95 Bug Fixes --------- @@ -4986,7 +4986,7 @@ Paster Templates ``repoze.tm2`` transaction manager in ``development.ini``. This prevents a transaction from being committed when the response status code is within the 400 or 500 ranges. See also - http://docs.repoze.org/tm2/#using-a-commit-veto. + https://repozetm2.readthedocs.io/en/latest/index.html#using-a-commit-veto. 1.0a10 (2011-01-18) =================== @@ -5004,7 +5004,7 @@ Backwards Incompatibilities Pyramid core. Handlers are now a feature of the ``pyramid_handlers`` package, which can be downloaded from PyPI. Documentation for the package should be available via - http://docs.pylonsproject.org/projects/pyramid_handlers/en/latest/, + https://docs.pylonsproject.org/projects/pyramid_handlers/en/latest/, which describes how to add a configuration statement to your ``main`` block to reobtain this method. You will also need to add an ``install_requires`` dependency upon @@ -5014,7 +5014,7 @@ Backwards Incompatibilities Pyramid core. Loading ZCML is now a feature of the ``pyramid_zcml`` package, which can be downloaded from PyPI. Documentation for the package should be available via - http://docs.pylonsproject.org/projects/pyramid_zcml/en/latest/, + https://docs.pylonsproject.org/projects/pyramid_zcml/en/latest/, which describes how to add a configuration statement to your ``main`` block to reobtain this method. You will also need to add an ``install_requires`` dependency upon @@ -5212,7 +5212,7 @@ Documentation - The "Resource Location and View Lookup" chapter has been replaced with a variant of Rob Miller's "Much Ado About Traversal" (originally published at - http://blog.nonsequitarian.org/2010/much-ado-about-traversal/). + https://web.archive.org/web/20150321110754/http://blog.nonsequitarian.org/2010/much-ado-about-traversal/). - Many minor wording tweaks and refactorings (merged Casey Duncan's docs fork, in which he is working on general editing). @@ -5554,7 +5554,7 @@ Features - New boolean Mako settings variable ``mako.strict_undefined``. See `Mako Context Variables - `_ for + `_ for its meaning. Dependencies diff --git a/docs/conf.py b/docs/conf.py index 8fdebf53d6..9f2b56225d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -448,4 +448,5 @@ def resig(app, what, name, obj, options, signature, return_annotation): linkcheck_ignore = [ r'http://localhost:\d+', r'http://localhost', + r'https://webchat.freenode.net/#pyramid', # JavaScript "anchor" ] diff --git a/docs/copyright.rst b/docs/copyright.rst index 3631fe5a33..c021d5db50 100644 --- a/docs/copyright.rst +++ b/docs/copyright.rst @@ -30,7 +30,7 @@ similar license to this one. Creative Commons Attribution-Nonconmmercial-Share Alike 3.0 United States License, the :app:`Pyramid` *software* is offered under a `less restrictive (BSD-like) license - `_ . + `_ . All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. However, use of a @@ -80,7 +80,7 @@ Print Production ---------------- The print version of this book was produced using the `Sphinx -`_ documentation generation system and +`_ documentation generation system and the `LaTeX `_ typesetting system. Contacting The Publisher diff --git a/docs/designdefense.rst b/docs/designdefense.rst index e02949ce5f..967a1aaed1 100644 --- a/docs/designdefense.rst +++ b/docs/designdefense.rst @@ -1006,12 +1006,12 @@ Microframeworks have smaller Hello World programs ------------------------------------------------- Self-described "microframeworks" exist. `Bottle -`_ and `Flask -`_ are two that are becoming popular. `Bobo +`_ and `Flask +`_ are two that are becoming popular. `Bobo `_ doesn't describe itself as a microframework, but its intended user base is much the same. Many others exist. We've even (only as a teaching tool, not as any sort of official project) -`created one using Pyramid `_. +`created one using Pyramid `_. The videos use BFG, a precursor to Pyramid, but the resulting code is `available for Pyramid too `_). Microframeworks are small frameworks with one common feature: each allows its @@ -1657,7 +1657,7 @@ Pyramid has over 1200 pages of documentation (printed), covering topics from the very basic to the most advanced. *Nothing* is left undocumented, quite literally. It also has an *awesome*, very helpful community. Visit the `#pyramid IRC channel on freenode.net -`_ and see. +`_ and see. Hate Zope +++++++++ diff --git a/docs/glossary.rst b/docs/glossary.rst index cd472a660f..8df70f4755 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -38,9 +38,9 @@ Glossary "Repoze" is essentially a "brand" of software developed by `Agendaless Consulting `_ and a set of contributors. The term has no special intrinsic meaning. The project's `website - `_ has more information. The software developed + `_ has more information. The software developed "under the brand" is available in a `Subversion repository - `_. Pyramid was originally known as + `_. Pyramid was originally known as :mod:`repoze.bfg`. Setuptools @@ -337,7 +337,7 @@ Glossary server, a WSGI application, with a set of :term:`middleware` in-between. Zope - `The Z Object Publishing Framework `_, a + `The Z Object Publishing Framework `_, a full-featured Python web framework. Grok @@ -382,12 +382,12 @@ Glossary the box in ZPT and text flavors. ZPT - The `Zope Page Template `_ + The `Zope Page Template `_ templating language. METAL `Macro Expansion for TAL - `_, a + `_, a part of :term:`ZPT` which makes it possible to share common look and feel between templates. @@ -396,7 +396,7 @@ Glossary by Christopher Lenz. Jinja2 - A `text templating language `_ by Armin Ronacher. + A `text templating language `_ by Armin Ronacher. Routes A `system by Ben Bangert `_ @@ -488,13 +488,13 @@ Glossary repoze.lemonade Zope2 CMF-like `data structures and helper facilities - `_ for CA-and-ZODB-based + `_ for CA-and-ZODB-based applications useful within :app:`Pyramid` applications. repoze.catalog An indexing and search facility (fielded and full-text) based on `zope.index `_. See `the - documentation `_ for more + documentation `_ for more information. repoze.who @@ -504,7 +504,7 @@ Glossary repoze.workflow `Barebones workflow for Python apps - `_ . It can be used by + `_ . It can be used by :app:`Pyramid` to form a workflow system. virtual root @@ -717,7 +717,7 @@ Glossary See also `Agendaless Consulting `_. Jython - A `Python implementation `_ written for + A `Python implementation `_ written for the Java Virtual Machine. Python diff --git a/docs/index.rst b/docs/index.rst index 4b413c16da..09a3b56b04 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,7 +6,7 @@ The Pyramid Web Framework :app:`Pyramid` is a small, fast, down-to-earth Python web framework. It is developed as part of the `Pylons Project `_. -It is licensed under a `BSD-like license `_. +It is licensed under a `BSD-like license `_. Here is one of the simplest :app:`Pyramid` applications you can make: @@ -77,7 +77,7 @@ If you've got questions that aren't answered by this documentation, contact the `Pylons-discuss maillist `_ or join the `#pyramid IRC channel -`_. +`_. Browse and check out tagged and trunk versions of :app:`Pyramid` via the `Pyramid GitHub repository `_. To check out diff --git a/docs/narr/introduction.rst b/docs/narr/introduction.rst index b32013931f..f62e289058 100644 --- a/docs/narr/introduction.rst +++ b/docs/narr/introduction.rst @@ -35,7 +35,7 @@ Reliability :app:`Pyramid` is developed conservatively and tested exhaustively. Our motto is: "If it ain't tested, it's broke". Openness - As with Python, the :app:`Pyramid` software is distributed under a `permissive open source license `_. + As with Python, the :app:`Pyramid` software is distributed under a `permissive open source license `_. .. _why_pyramid: @@ -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 `_) and 95% decision/condition coverage. (as measured by `instrumental `_) It is automatically tested using `Travis `_ and `Jenkins `_ on supported versions of Python after each commit to its GitHub repository. `Official Pyramid add-ons `_ 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 `_) and 95% decision/condition coverage. (as measured by `instrumental `_) It is automatically tested using `Travis `_ and Jenkins on supported versions of Python after each commit to its GitHub repository. `Official Pyramid add-ons `_ 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. @@ -70,7 +70,7 @@ You can get help quickly with :app:`Pyramid`. It's our goal that no :app:`Pyrami .. seealso:: - See also our `#pyramid IRC channel `_, our `pylons-discuss mailing list `_, and :ref:`support-and-development`. + See also our `#pyramid IRC channel `_, our `pylons-discuss mailing list `_, and :ref:`support-and-development`. .. _what_makes_pyramid_unique: diff --git a/docs/narr/renderers.rst b/docs/narr/renderers.rst index 6b4982e4b4..21cfa0497e 100644 --- a/docs/narr/renderers.rst +++ b/docs/narr/renderers.rst @@ -357,9 +357,9 @@ When a view is called that uses a JSONP renderer: Javscript library AJAX functionality will help you make JSONP requests. For example, JQuery has a `getJSON function -`_, and has equivalent (but more +`_, and has equivalent (but more complicated) functionality in its `ajax function -`_. +`_. For example (JavaScript): diff --git a/docs/narr/templates.rst b/docs/narr/templates.rst index e5244e1add..34d9a115cb 100644 --- a/docs/narr/templates.rst +++ b/docs/narr/templates.rst @@ -452,7 +452,7 @@ templating languages including the following: .. _pyramid_chameleon: https://docs.pylonsproject.org/projects/pyramid-chameleon/en/latest/ -.. _Jinja2: http://jinja.pocoo.org/docs/dev/ +.. _Jinja2: https://jinja.palletsprojects.com/en/2.10.x/ .. _pyramid_jinja2: https://docs.pylonsproject.org/projects/pyramid-jinja2/en/latest/ diff --git a/docs/narr/testing.rst b/docs/narr/testing.rst index 01cea969e7..883bb7c7bd 100644 --- a/docs/narr/testing.rst +++ b/docs/narr/testing.rst @@ -50,7 +50,7 @@ The suggested mechanism for unit and integration testing of a :app:`Pyramid` application is the Python :mod:`unittest` module. Although this module is named :mod:`unittest`, it is actually capable of driving both unit and integration tests. A good :mod:`unittest` tutorial is available within `Dive -Into Python 3 `_ by Mark +Into Python 3 `_ by Mark Pilgrim. :app:`Pyramid` provides a number of facilities that make unit, integration, and diff --git a/docs/quick_tour.rst b/docs/quick_tour.rst index 1726b85a19..4be77e3455 100644 --- a/docs/quick_tour.rst +++ b/docs/quick_tour.rst @@ -337,7 +337,7 @@ passed the view response through the ``pyramid_jinja2`` renderer. .. seealso:: See also: :ref:`Quick Tutorial Jinja2 `, `Jinja2 homepage - `_, and :ref:`pyramid_jinja2 Overview + `_, and :ref:`pyramid_jinja2 Overview `. diff --git a/docs/quick_tutorial/jinja2.rst b/docs/quick_tutorial/jinja2.rst index ed9acd9550..a8b562fe77 100644 --- a/docs/quick_tutorial/jinja2.rst +++ b/docs/quick_tutorial/jinja2.rst @@ -97,5 +97,5 @@ Extra credit :term:`Configurator` to load ``pyramid_jinja2``'s configuration. What is another way we could include it into the config? -.. seealso:: `Jinja2 homepage `_, and +.. seealso:: `Jinja2 homepage `_, and :ref:`pyramid_jinja2 Overview ` diff --git a/docs/quick_tutorial/routing.rst b/docs/quick_tutorial/routing.rst index a6538a75fe..71fb2a4d7f 100644 --- a/docs/quick_tutorial/routing.rst +++ b/docs/quick_tutorial/routing.rst @@ -31,7 +31,7 @@ Previously we saw the basics of routing URLs to views in Pyramid. explicit in ordering. Pyramid also gives facilities to avoid the problem. It's relatively easy to build a system that uses implicit route ordering with Pyramid too. See `The Groundhog series of screencasts - `_ if you're interested in + `_ if you're interested in doing so. diff --git a/docs/tutorials/wiki2/definingviews.rst b/docs/tutorials/wiki2/definingviews.rst index 8600a0cea6..a434039caa 100644 --- a/docs/tutorials/wiki2/definingviews.rst +++ b/docs/tutorials/wiki2/definingviews.rst @@ -350,7 +350,7 @@ template inheritance via blocks. - We have defined two placeholders in the layout template where a child template can override the content. These blocks are named ``subtitle`` (line 11) and ``content`` (line 36). -- Please refer to the `Jinja2 documentation `_ for more information about template +- Please refer to the `Jinja2 documentation `_ for more information about template inheritance. diff --git a/src/pyramid/csrf.py b/src/pyramid/csrf.py index 26c628acc5..9cd3933762 100644 --- a/src/pyramid/csrf.py +++ b/src/pyramid/csrf.py @@ -97,9 +97,9 @@ def check_csrf_token(self, request, supplied_token): class CookieCSRFStoragePolicy(object): """ An alternative CSRF implementation that stores its information in unauthenticated cookies, known as the 'Double Submit Cookie' method in the - `OWASP CSRF guidelines `_. This gives some additional flexibility with + `OWASP CSRF guidelines + `_. + This gives some additional flexibility with regards to scaling as the tokens can be generated and verified by a front-end server. From d98b838c88a9ea630f422f84d7e08eb83f3934f9 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 17 Aug 2019 02:57:03 -0700 Subject: [PATCH 2/2] Fix indentation for running doctests --- src/pyramid/csrf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyramid/csrf.py b/src/pyramid/csrf.py index 9cd3933762..deb35fedbe 100644 --- a/src/pyramid/csrf.py +++ b/src/pyramid/csrf.py @@ -98,7 +98,7 @@ class CookieCSRFStoragePolicy(object): """ An alternative CSRF implementation that stores its information in unauthenticated cookies, known as the 'Double Submit Cookie' method in the `OWASP CSRF guidelines - `_. + `_. This gives some additional flexibility with regards to scaling as the tokens can be generated and verified by a front-end server.