diff --git a/CHANGES b/CHANGES index 26050bcc..1904b0a3 100644 --- a/CHANGES +++ b/CHANGES @@ -401,7 +401,7 @@ Released on July 27th 2010, codename Whisky prefix. This makes it possible to bind a whole module to a configurable subdomain. -.. _blinker: http://pypi.python.org/pypi/blinker +.. _blinker: https://pypi.python.org/pypi/blinker Version 0.5.2 ------------- diff --git a/docs/api.rst b/docs/api.rst index c87055d1..6c9f7414 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -597,7 +597,7 @@ Signals do nothing but will fail with a :exc:`RuntimeError` for all other operations, including connecting. -.. _blinker: http://pypi.python.org/pypi/blinker +.. _blinker: https://pypi.python.org/pypi/blinker Class-Based Views ----------------- diff --git a/docs/conf.py b/docs/conf.py index 16c841f4..524ee555 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -244,7 +244,7 @@ latex_additional_files = ['flaskstyle.sty', 'logo.pdf'] #epub_tocdepth = 3 intersphinx_mapping = { - 'http://docs.python.org/dev': None, + 'https://docs.python.org/dev': None, 'http://werkzeug.pocoo.org/docs/': None, 'http://www.sqlalchemy.org/docs/': None, 'http://wtforms.simplecodes.com/docs/0.5/': None, diff --git a/docs/deploying/mod_wsgi.rst b/docs/deploying/mod_wsgi.rst index 8fd2c0bb..baac5a1b 100644 --- a/docs/deploying/mod_wsgi.rst +++ b/docs/deploying/mod_wsgi.rst @@ -109,7 +109,7 @@ For more information consult the `mod_wsgi wiki`_. .. _mod_wsgi: http://code.google.com/p/modwsgi/ .. _installation instructions: http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide -.. _virtual python: http://pypi.python.org/pypi/virtualenv +.. _virtual python: https://pypi.python.org/pypi/virtualenv .. _mod_wsgi wiki: http://code.google.com/p/modwsgi/wiki/ Troubleshooting diff --git a/docs/deploying/wsgi-standalone.rst b/docs/deploying/wsgi-standalone.rst index c8d4f20e..11d07831 100644 --- a/docs/deploying/wsgi-standalone.rst +++ b/docs/deploying/wsgi-standalone.rst @@ -64,7 +64,7 @@ event loop:: .. _Gevent: http://www.gevent.org/ .. _greenlet: http://greenlet.readthedocs.org/en/latest/ -.. _libevent: http://monkey.org/~provos/libevent/ +.. _libevent: http://libevent.org/ Twisted Web ----------- diff --git a/docs/extensiondev.rst b/docs/extensiondev.rst index 09bf2d2c..4e0e45d8 100644 --- a/docs/extensiondev.rst +++ b/docs/extensiondev.rst @@ -415,6 +415,6 @@ instead of ``flask_foo`` or ``flaskext_foo`` so that extensions can transition to the new package name without affecting users. -.. _OAuth extension: http://packages.python.org/Flask-OAuth/ +.. _OAuth extension: http://pythonhosted.org/Flask-OAuth/ .. _mailinglist: http://flask.pocoo.org/mailinglist/ .. _IRC channel: http://flask.pocoo.org/community/irc/ diff --git a/docs/htmlfaq.rst b/docs/htmlfaq.rst index b16f4cd5..434bb656 100644 --- a/docs/htmlfaq.rst +++ b/docs/htmlfaq.rst @@ -186,7 +186,7 @@ Many other features have been added, as well. A good guide to new features in HTML5 is Mark Pilgrim's soon-to-be-published book, `Dive Into HTML5`_. Not all of them are supported in browsers yet, however, so use caution. -.. _Dive Into HTML5: http://www.diveintohtml5.org/ +.. _Dive Into HTML5: http://www.diveintohtml5.info/ What should be used? -------------------- diff --git a/docs/index.rst b/docs/index.rst index 43702409..617104ee 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -21,11 +21,11 @@ engine and the `Werkzeug`_ WSGI toolkit. These libraries are not documented here. If you want to dive into their documentation, check out the following links: -- `Jinja2 Documentation `_ -- `Werkzeug Documentation `_ +- `Jinja2 Documentation `_ +- `Werkzeug Documentation `_ -.. _Jinja2: http://jinja.pocoo.org/2/ +.. _Jinja2: http://jinja.pocoo.org/ .. _Werkzeug: http://werkzeug.pocoo.org/ .. include:: contents.rst.inc diff --git a/docs/installation.rst b/docs/installation.rst index 78f192fd..163782f2 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -4,7 +4,7 @@ Installation ============ Flask depends on some external libraries, like `Werkzeug -`_ and `Jinja2 `_. +`_ and `Jinja2 `_. Werkzeug is a toolkit for WSGI, the standard Python interface between web applications and a variety of servers for both development and deployment. Jinja2 renders templates. diff --git a/docs/patterns/caching.rst b/docs/patterns/caching.rst index 5817aa29..a0633cf9 100644 --- a/docs/patterns/caching.rst +++ b/docs/patterns/caching.rst @@ -27,7 +27,7 @@ cache that keeps the item stored in the memory of the Python interpreter:: cache = SimpleCache() If you want to use memcached, make sure to have one of the memcache modules -supported (you get them from `PyPI `_) and a +supported (you get them from `PyPI `_) and a memcached server running somewhere. This is how you connect to such an memcached server then:: diff --git a/docs/patterns/distribute.rst b/docs/patterns/distribute.rst index b6f6a5ef..aa53e685 100644 --- a/docs/patterns/distribute.rst +++ b/docs/patterns/distribute.rst @@ -161,6 +161,6 @@ folder instead of copying the data over. You can then continue to work on the code without having to run `install` again after each change. -.. _distribute: http://pypi.python.org/pypi/distribute -.. _pip: http://pypi.python.org/pypi/pip +.. _distribute: https://pypi.python.org/pypi/distribute +.. _pip: https://pypi.python.org/pypi/pip .. _distribute_setup.py: http://python-distribute.org/distribute_setup.py diff --git a/docs/patterns/fileuploads.rst b/docs/patterns/fileuploads.rst index eef50a9a..74cdd98b 100644 --- a/docs/patterns/fileuploads.rst +++ b/docs/patterns/fileuploads.rst @@ -178,4 +178,4 @@ applications dealing with uploads, there is a Flask extension called `Flask-Uploads`_ that implements a full fledged upload mechanism with white and blacklisting of extensions and more. -.. _Flask-Uploads: http://packages.python.org/Flask-Uploads/ +.. _Flask-Uploads: http://pythonhosted.org/Flask-Uploads/ diff --git a/docs/patterns/sqlalchemy.rst b/docs/patterns/sqlalchemy.rst index 3c4d9ce9..3b517a6d 100644 --- a/docs/patterns/sqlalchemy.rst +++ b/docs/patterns/sqlalchemy.rst @@ -20,9 +20,9 @@ there is a Flask extension that handles that for you. This is recommended if you want to get started quickly. You can download `Flask-SQLAlchemy`_ from `PyPI -`_. +`_. -.. _Flask-SQLAlchemy: http://packages.python.org/Flask-SQLAlchemy/ +.. _Flask-SQLAlchemy: http://pythonhosted.org/Flask-SQLAlchemy/ Declarative diff --git a/docs/patterns/wtforms.rst b/docs/patterns/wtforms.rst index 1bf46637..8017aea5 100644 --- a/docs/patterns/wtforms.rst +++ b/docs/patterns/wtforms.rst @@ -8,7 +8,7 @@ will handle here. If you find yourself in the situation of having many forms, you might want to give it a try. When you are working with WTForms you have to define your forms as classes -first. I recommend breaking up the application into multiple modules +first. I recommend breaking up the application into multiple modules (:ref:`larger-applications`) for that and adding a separate module for the forms. @@ -17,9 +17,9 @@ forms. The `Flask-WTF`_ extension expands on this pattern and adds a few handful little helpers that make working with forms and Flask more fun. You can get it from `PyPI - `_. + `_. -.. _Flask-WTF: http://packages.python.org/Flask-WTF/ +.. _Flask-WTF: http://pythonhosted.org/Flask-WTF/ The Forms --------- diff --git a/docs/quickstart.rst b/docs/quickstart.rst index bce798f8..b39b2a3c 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -384,7 +384,7 @@ Rendering Templates Generating HTML from within Python is not fun, and actually pretty cumbersome because you have to do the HTML escaping on your own to keep the application secure. Because of that Flask configures the `Jinja2 -`_ template engine for you automatically. +`_ template engine for you automatically. To render a template you can use the :func:`~flask.render_template` method. All you have to do is provide the name of the template and the @@ -417,7 +417,7 @@ package it's actually inside your package: For templates you can use the full power of Jinja2 templates. Head over to the official `Jinja2 Template Documentation -`_ for more information. +`_ for more information. Here is an example template: @@ -855,7 +855,7 @@ Here are some example log calls:: The attached :attr:`~flask.Flask.logger` is a standard logging :class:`~logging.Logger`, so head over to the official `logging -documentation `_ for more +documentation `_ for more information. Hooking in WSGI Middlewares @@ -878,7 +878,7 @@ Ready to deploy your new Flask app? To wrap up the quickstart, you can immediately deploy to a hosted platform, all of which offer a free plan for small projects: -- `Deploying Flask on Heroku `_ +- `Deploying Flask on Heroku `_ - `Deploying WSGI on dotCloud `_ with `Flask-specific notes `_ diff --git a/docs/signals.rst b/docs/signals.rst index c9df1edf..46342033 100644 --- a/docs/signals.rst +++ b/docs/signals.rst @@ -349,4 +349,4 @@ The following signals exist in Flask: .. versionadded:: 0.10 -.. _blinker: http://pypi.python.org/pypi/blinker +.. _blinker: https://pypi.python.org/pypi/blinker diff --git a/docs/templating.rst b/docs/templating.rst index 4e432333..bf672672 100644 --- a/docs/templating.rst +++ b/docs/templating.rst @@ -9,7 +9,7 @@ An extension can depend on Jinja2 being present. This section only gives a very quick introduction into how Jinja2 is integrated into Flask. If you want information on the template engine's syntax itself, head over to the official `Jinja2 Template -Documentation `_ for +Documentation `_ for more information. Jinja Setup diff --git a/docs/tutorial/dbcon.rst b/docs/tutorial/dbcon.rst index fb5a0c4a..0e3f7de5 100644 --- a/docs/tutorial/dbcon.rst +++ b/docs/tutorial/dbcon.rst @@ -53,7 +53,7 @@ every time the app context tears down. So what does this mean? Essentially the app context is created before the request comes in and is destroyed (teared down) whenever the request finishes. A teardown can happen because of two reasons: either everything went well (the error -parameter will be `None`) or an exception happend in which case the error +parameter will be `None`) or an exception happened in which case the error is passed to the teardown function. Curious about what these contexts mean? Have a look at the diff --git a/docs/tutorial/folders.rst b/docs/tutorial/folders.rst index 4bf47cd7..e1ff229d 100644 --- a/docs/tutorial/folders.rst +++ b/docs/tutorial/folders.rst @@ -20,4 +20,4 @@ templates you create later in the tutorial will go in this directory. Continue with :ref:`tutorial-schema`. -.. _Jinja2: http://jinja.pocoo.org/2/ +.. _Jinja2: http://jinja.pocoo.org/ diff --git a/docs/tutorial/templates.rst b/docs/tutorial/templates.rst index 5ec5584d..fd3abe68 100644 --- a/docs/tutorial/templates.rst +++ b/docs/tutorial/templates.rst @@ -16,7 +16,7 @@ the layout of the website in all pages. Put the following templates into the `templates` folder: -.. _Jinja2: http://jinja.pocoo.org/2/documentation/templates +.. _Jinja2: http://jinja.pocoo.org/docs/templates layout.html ----------- diff --git a/docs/upgrading.rst b/docs/upgrading.rst index ebea0101..ccfa82ad 100644 --- a/docs/upgrading.rst +++ b/docs/upgrading.rst @@ -43,7 +43,7 @@ when there is no request context yet but an application context. The old ``flask.Flask.request_globals_class`` attribute was renamed to :attr:`flask.Flask.app_ctx_globals_class`. -.. _Flask-OldSessions: http://packages.python.org/Flask-OldSessions/ +.. _Flask-OldSessions: http://pythonhosted.org/Flask-OldSessions/ Version 0.9 ----------- diff --git a/flask/_compat.py b/flask/_compat.py index 86a87832..d4ec9839 100644 --- a/flask/_compat.py +++ b/flask/_compat.py @@ -77,7 +77,7 @@ def with_metaclass(meta, *bases): # breaks the __exit__ function in a very peculiar way. This is currently # true for pypy 2.2.1 for instance. The second level of exception blocks # is necessary because pypy seems to forget to check if an exception -# happend until the next bytecode instruction? +# happened until the next bytecode instruction? BROKEN_PYPY_CTXMGR_EXIT = False if hasattr(sys, 'pypy_version_info'): class _Mgr(object): diff --git a/flask/helpers.py b/flask/helpers.py index 920c4c87..77148708 100644 --- a/flask/helpers.py +++ b/flask/helpers.py @@ -662,7 +662,7 @@ def get_root_path(import_name): 'module came from an import hook that does ' 'not provide file name information or because ' 'it\'s a namespace package. In this case ' - 'the root path needs to be explictly ' + 'the root path needs to be explicitly ' 'provided.' % import_name) # filepath is import_name.py for a module, or __init__.py for a package. diff --git a/tox.ini b/tox.ini index b09458d9..24155a9a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,11 @@ [tox] -envlist = py26, py27, pypy, py33 +envlist = docs, py26, py27, pypy, py33, py34 [testenv] deps = blinker commands = python run-tests.py [] + + +[testenv:docs] +deps = sphinx +commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/linkcheck