fix docks linkcheck

This commit is contained in:
David Lord 2019-06-23 15:37:51 -07:00
parent 28b35c55a1
commit cb6272ccc8
No known key found for this signature in database
GPG Key ID: 7A1C87E3F5BC42A8
22 changed files with 63 additions and 81 deletions

View File

@ -9,7 +9,7 @@ Support questions
Please, don't use the issue tracker for this. Use one of the following Please, don't use the issue tracker for this. Use one of the following
resources for questions about your own code: resources for questions about your own code:
* The ``#get-help`` channel on our Discord chat: https://discord.gg/t6rrQZH * The ``#get-help`` channel on our Discord chat: https://discordapp.com/invite/t6rrQZH
* The IRC channel ``#pocoo`` on FreeNode is linked to Discord, but * The IRC channel ``#pocoo`` on FreeNode is linked to Discord, but
Discord is preferred. Discord is preferred.
@ -24,15 +24,15 @@ Reporting issues
---------------- ----------------
- Describe what you expected to happen. - Describe what you expected to happen.
- If possible, include a `minimal, complete, and verifiable example`_ to help - If possible, include a `minimal reproducible example`_ to help us
us identify the issue. This also helps check that the issue is not with your identify the issue. This also helps check that the issue is not with
own code. your own code.
- Describe what actually happened. Include the full traceback if there was an - Describe what actually happened. Include the full traceback if there was an
exception. exception.
- List your Python, Flask, and Werkzeug versions. If possible, check if this - List your Python, Flask, and Werkzeug versions. If possible, check if this
issue is already fixed in the repository. issue is already fixed in the repository.
.. _minimal, complete, and verifiable example: https://stackoverflow.com/help/mcve .. _minimal reproducible example: https://stackoverflow.com/help/minimal-reproducible-example
Submitting patches Submitting patches
------------------ ------------------
@ -76,10 +76,10 @@ First time setup
.. _GitHub account: https://github.com/join .. _GitHub account: https://github.com/join
.. _latest version of git: https://git-scm.com/downloads .. _latest version of git: https://git-scm.com/downloads
.. _username: https://help.github.com/articles/setting-your-username-in-git/ .. _username: https://help.github.com/en/articles/setting-your-username-in-git
.. _email: https://help.github.com/articles/setting-your-email-in-git/ .. _email: https://help.github.com/en/articles/setting-your-commit-email-address-in-git
.. _Fork: https://github.com/pallets/flask/fork .. _Fork: https://github.com/pallets/flask/fork
.. _Clone: https://help.github.com/articles/fork-a-repo/#step-2-create-a-local-clone-of-your-fork .. _Clone: https://help.github.com/en/articles/fork-a-repo#step-2-create-a-local-clone-of-your-fork
Start coding Start coding
~~~~~~~~~~~~ ~~~~~~~~~~~~
@ -96,8 +96,8 @@ Start coding
git checkout -b your-branch-name origin/master git checkout -b your-branch-name origin/master
- Using your favorite editor, make your changes, `committing as you go`_. - Using your favorite editor, make your changes, `committing as you go`_.
- Try to follow `PEP8`_, but you may ignore the line length limit if following - Try to follow `PEP8`_. We have a pre-commit config and tests that will
it would make the code uglier. ensure the code follows our style guide.
- Include tests that cover any code changes you make. Make sure the test fails - Include tests that cover any code changes you make. Make sure the test fails
without your patch. `Run the tests. <contributing-testsuite_>`_. without your patch. `Run the tests. <contributing-testsuite_>`_.
- Push your commits to GitHub and `create a pull request`_ by using:: - Push your commits to GitHub and `create a pull request`_ by using::
@ -106,9 +106,9 @@ Start coding
- Celebrate 🎉 - Celebrate 🎉
.. _committing as you go: http://dont-be-afraid-to-commit.readthedocs.io/en/latest/git/commandlinegit.html#commit-your-changes .. _committing as you go: https://dont-be-afraid-to-commit.readthedocs.io/en/latest/git/commandlinegit.html#commit-your-changes
.. _PEP8: https://pep8.org/ .. _PEP8: https://pep8.org/
.. _create a pull request: https://help.github.com/articles/creating-a-pull-request/ .. _create a pull request: https://help.github.com/en/articles/creating-a-pull-request
.. _contributing-testsuite: .. _contributing-testsuite:
@ -157,20 +157,9 @@ Build the docs in the ``docs`` directory using Sphinx::
Open ``_build/html/index.html`` in your browser to view the docs. Open ``_build/html/index.html`` in your browser to view the docs.
Read more about `Sphinx <http://www.sphinx-doc.org>`_. Read more about `Sphinx <https://www.sphinx-doc.org/en/master/>`_.
make targets
~~~~~~~~~~~~
Flask provides a ``Makefile`` with various shortcuts. They will ensure that
all dependencies are installed.
- ``make test`` runs the basic test suite with ``pytest``
- ``make cov`` runs the basic test suite with ``coverage``
- ``make test-all`` runs the full test suite with ``tox``
- ``make docs`` builds the HTML documentation
Caution: zero-padded file modes Caution: zero-padded file modes
------------------------------- -------------------------------

View File

@ -43,9 +43,9 @@ Incoming Request Data
.. attribute:: base_url .. attribute:: base_url
.. attribute:: url_root .. attribute:: url_root
Provides different ways to look at the current `IRI Provides different ways to look at the current :rfc:`3987`.
<http://tools.ietf.org/html/rfc3987>`_. Imagine your application is Imagine your application is listening on the following application
listening on the following application root:: root::
http://www.example.com/myapplication http://www.example.com/myapplication

View File

@ -44,7 +44,7 @@ The :ref:`app-dispatch` chapter shows in detail how to apply middleware. You
can introduce WSGI middleware to wrap your Flask instances and introduce fixes can introduce WSGI middleware to wrap your Flask instances and introduce fixes
and changes at the layer between your Flask application and your HTTP and changes at the layer between your Flask application and your HTTP
server. Werkzeug includes several `middlewares server. Werkzeug includes several `middlewares
<http://werkzeug.pocoo.org/docs/middlewares/>`_. <https://werkzeug.palletsprojects.com/middleware/>`_.
Fork. Fork.
----- -----

View File

@ -10,7 +10,7 @@ interface, in your virtualenv. Executed from the terminal, this script gives
access to built-in, extension, and application-defined commands. The ``--help`` access to built-in, extension, and application-defined commands. The ``--help``
option will give more information about any commands and options. option will give more information about any commands and options.
.. _Click: http://click.pocoo.org/ .. _Click: https://click.palletsprojects.com/
Application Discovery Application Discovery
@ -340,7 +340,7 @@ they are installed. Entry points are specified in :file:`setup.py` ::
) )
.. _entry point: https://packaging.python.org/tutorials/distributing-packages/#entry-points .. _entry point: https://packaging.python.org/tutorials/packaging-projects/#entry-points
Inside :file:`flask_my_extension/commands.py` you can then export a Click Inside :file:`flask_my_extension/commands.py` you can then export a Click
object:: object::
@ -409,7 +409,7 @@ script is available. Note that you don't need to set ``FLASK_APP``. ::
The ``flask`` command, being separate from your code, does not have The ``flask`` command, being separate from your code, does not have
this issue and is recommended in most cases. this issue and is recommended in most cases.
.. _console script: https://packaging.python.org/tutorials/distributing-packages/#console-scripts .. _console script: https://packaging.python.org/tutorials/packaging-projects/#console-scripts
PyCharm Integration PyCharm Integration

View File

@ -58,4 +58,4 @@ work in that case:
For more information consult the documentation of your webserver. For more information consult the documentation of your webserver.
.. _App Engine: https://developers.google.com/appengine/ .. _App Engine: https://cloud.google.com/appengine/docs/

View File

@ -17,12 +17,9 @@ Hosted options
-------------- --------------
- `Deploying Flask on Heroku <https://devcenter.heroku.com/articles/getting-started-with-python>`_ - `Deploying Flask on Heroku <https://devcenter.heroku.com/articles/getting-started-with-python>`_
- `Deploying Flask on OpenShift <https://developers.openshift.com/en/python-flask.html>`_
- `Deploying Flask on Webfaction <http://flask.pocoo.org/snippets/65/>`_
- `Deploying Flask on Google App Engine <https://cloud.google.com/appengine/docs/standard/python/getting-started/python-standard-env>`_ - `Deploying Flask on Google App Engine <https://cloud.google.com/appengine/docs/standard/python/getting-started/python-standard-env>`_
- `Deploying Flask on AWS Elastic Beanstalk <https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-flask.html>`_ - `Deploying Flask on AWS Elastic Beanstalk <https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-flask.html>`_
- `Sharing your Localhost Server with Localtunnel <http://flask.pocoo.org/snippets/89/>`_ - `Deploying on Azure (IIS) <https://docs.microsoft.com/en-us/azure/app-service/containers/how-to-configure-python>`_
- `Deploying on Azure (IIS) <https://azure.microsoft.com/documentation/articles/web-sites-python-configure/>`_
- `Deploying on PythonAnywhere <https://help.pythonanywhere.com/pages/Flask/>`_ - `Deploying on PythonAnywhere <https://help.pythonanywhere.com/pages/Flask/>`_
Self-hosted options Self-hosted options

View File

@ -69,4 +69,4 @@ to have it in the URL root its a bit simpler::
.. _nginx: https://nginx.org/ .. _nginx: https://nginx.org/
.. _lighttpd: https://www.lighttpd.net/ .. _lighttpd: https://www.lighttpd.net/
.. _cherokee: http://cherokee-project.com/ .. _cherokee: http://cherokee-project.com/
.. _uwsgi: http://projects.unbit.it/uwsgi/ .. _uwsgi: https://uwsgi-docs.readthedocs.io/en/latest/

View File

@ -43,11 +43,10 @@ Running `uWSGI HTTP Router`_::
uwsgi --http 127.0.0.1:5000 --module myproject:app uwsgi --http 127.0.0.1:5000 --module myproject:app
For a more optimized setup, see `configuring uWSGI and NGINX`_. For a more optimized setup, see :doc:`/deploying/uwsgi`.
.. _uWSGI: http://uwsgi-docs.readthedocs.io/en/latest/ .. _uWSGI: https://uwsgi-docs.readthedocs.io/en/latest/
.. _uWSGI HTTP Router: http://uwsgi-docs.readthedocs.io/en/latest/HTTP.html#the-uwsgi-http-https-router .. _uWSGI HTTP Router: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html#the-uwsgi-http-https-router
.. _configuring uWSGI and NGINX: uwsgi.html#starting-your-app-with-uwsgi
Gevent Gevent
------- -------
@ -86,7 +85,7 @@ application from ``myproject``::
twistd -n web --port tcp:8080 --wsgi myproject.app twistd -n web --port tcp:8080 --wsgi myproject.app
.. _Twisted: https://twistedmatrix.com/ .. _Twisted: https://twistedmatrix.com/trac/
.. _Twisted Web: https://twistedmatrix.com/trac/wiki/TwistedWeb .. _Twisted Web: https://twistedmatrix.com/trac/wiki/TwistedWeb
.. _deploying-proxy-setups: .. _deploying-proxy-setups:

View File

@ -34,10 +34,10 @@ Error Logging Tools
Sending error mails, even if just for critical ones, can become Sending error mails, even if just for critical ones, can become
overwhelming if enough users are hitting the error and log files are overwhelming if enough users are hitting the error and log files are
typically never looked at. This is why we recommend using `Sentry typically never looked at. This is why we recommend using `Sentry
<https://www.getsentry.com/>`_ for dealing with application errors. It's <https://sentry.io/welcome/>`_ for dealing with application errors. It's
available as an Open Source project `on GitHub available as an Open Source project `on GitHub
<https://github.com/getsentry/sentry>`__ and is also available as a `hosted version <https://github.com/getsentry/sentry>`__ and is also available as a `hosted version
<https://getsentry.com/signup/>`_ which you can try for free. Sentry <https://sentry.io/signup/>`_ which you can try for free. Sentry
aggregates duplicate errors, captures the full stack trace and local aggregates duplicate errors, captures the full stack trace and local
variables for debugging, and sends you mails based on new errors or variables for debugging, and sends you mails based on new errors or
frequency thresholds. frequency thresholds.

View File

@ -4,9 +4,8 @@ Flask Extension Development
=========================== ===========================
Flask, being a microframework, often requires some repetitive steps to get Flask, being a microframework, often requires some repetitive steps to get
a third party library working. Because very often these steps could be a third party library working. Many such extensions are already available
abstracted to support multiple projects the `Flask Extension Registry`_ on `PyPI <https://pypi.org/search/?c=Framework+%3A%3A+Flask>`_.
was created.
If you want to create your own Flask extension for something that does not If you want to create your own Flask extension for something that does not
exist yet, this guide to extension development will help you get your exist yet, this guide to extension development will help you get your
@ -328,8 +327,8 @@ extension to be approved you have to follow these guidelines:
6. Approved extensions must define all their dependencies in the 6. Approved extensions must define all their dependencies in the
:file:`setup.py` file unless a dependency cannot be met because it is not :file:`setup.py` file unless a dependency cannot be met because it is not
available on PyPI. available on PyPI.
7. The documentation must use the ``flask`` theme from the `Official 7. The documentation must use the ``flask`` theme from the
Pallets Themes`_. `Official Pallets Themes`_.
8. The setup.py description (and thus the PyPI description) has to 8. The setup.py description (and thus the PyPI description) has to
link to the documentation, website (if there is one) and there link to the documentation, website (if there is one) and there
must be a link to automatically install the development version must be a link to automatically install the development version
@ -342,4 +341,4 @@ extension to be approved you have to follow these guidelines:
.. _OAuth extension: https://pythonhosted.org/Flask-OAuth/ .. _OAuth extension: https://pythonhosted.org/Flask-OAuth/
.. _mailinglist: http://flask.pocoo.org/mailinglist/ .. _mailinglist: http://flask.pocoo.org/mailinglist/
.. _IRC channel: http://flask.pocoo.org/community/irc/ .. _IRC channel: http://flask.pocoo.org/community/irc/
.. _Official Pallets Themes: https://pypi.org/project/pallets-sphinx-themes/ .. _Official Pallets Themes: https://pypi.org/project/Pallets-Sphinx-Themes/

View File

@ -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`_. 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. Not all of them are supported in browsers yet, however, so use caution.
.. _Dive Into HTML5: http://diveintohtml5.info/ .. _Dive Into HTML5: https://diveintohtml5.info/
What should be used? What should be used?
-------------------- --------------------

View File

@ -19,7 +19,7 @@ Flask depends on the `Jinja`_ template engine and the `Werkzeug`_ WSGI
toolkit. The documentation for these libraries can be found at: toolkit. The documentation for these libraries can be found at:
- `Jinja documentation <http://jinja.pocoo.org/docs>`_ - `Jinja documentation <http://jinja.pocoo.org/docs>`_
- `Werkzeug documentation <http://werkzeug.pocoo.org/docs>`_ - `Werkzeug documentation <https://werkzeug.palletsprojects.com/>`_
.. _Jinja: https://www.palletsprojects.com/p/jinja/ .. _Jinja: https://www.palletsprojects.com/p/jinja/
.. _Werkzeug: https://www.palletsprojects.com/p/werkzeug/ .. _Werkzeug: https://www.palletsprojects.com/p/werkzeug/

View File

@ -25,11 +25,11 @@ These distributions will be installed automatically when installing Flask.
* `Click`_ is a framework for writing command line applications. It provides * `Click`_ is a framework for writing command line applications. It provides
the ``flask`` command and allows adding custom management commands. the ``flask`` command and allows adding custom management commands.
.. _Werkzeug: http://werkzeug.pocoo.org/ .. _Werkzeug: https://palletsprojects.com/p/werkzeug/
.. _Jinja: http://jinja.pocoo.org/ .. _Jinja: https://palletsprojects.com/p/jinja/
.. _MarkupSafe: https://pypi.org/project/MarkupSafe/ .. _MarkupSafe: https://palletsprojects.com/p/markupsafe/
.. _ItsDangerous: https://pythonhosted.org/itsdangerous/ .. _ItsDangerous: https://palletsprojects.com/p/itsdangerous/
.. _Click: http://click.pocoo.org/ .. _Click: https://palletsprojects.com/p/click/
Optional dependencies Optional dependencies
~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~

View File

@ -60,7 +60,7 @@ Factories & Extensions
It's preferable to create your extensions and app factories so that the It's preferable to create your extensions and app factories so that the
extension object does not initially get bound to the application. extension object does not initially get bound to the application.
Using `Flask-SQLAlchemy <http://flask-sqlalchemy.pocoo.org/>`_, Using `Flask-SQLAlchemy <https://flask-sqlalchemy.palletsprojects.com/>`_,
as an example, you should not do something along those lines:: as an example, you should not do something along those lines::
def create_app(config_filename): def create_app(config_filename):

View File

@ -11,7 +11,7 @@ Python primitives (numbers, strings, dicts and lists) look like which is
widely supported and very easy to parse. It became popular a few years widely supported and very easy to parse. It became popular a few years
ago and quickly replaced XML as transport format in web applications. ago and quickly replaced XML as transport format in web applications.
.. _jQuery: http://jquery.com/ .. _jQuery: https://jquery.com/
Loading jQuery Loading jQuery
-------------- --------------
@ -27,7 +27,7 @@ to add a script statement to the bottom of your ``<body>`` to load jQuery:
url_for('static', filename='jquery.js') }}"></script> url_for('static', filename='jquery.js') }}"></script>
Another method is using Google's `AJAX Libraries API Another method is using Google's `AJAX Libraries API
<https://developers.google.com/speed/libraries/devguide>`_ to load jQuery: <https://developers.google.com/speed/libraries/>`_ to load jQuery:
.. sourcecode:: html .. sourcecode:: html

View File

@ -22,7 +22,7 @@ if you want to get started quickly.
You can download `Flask-SQLAlchemy`_ from `PyPI You can download `Flask-SQLAlchemy`_ from `PyPI
<https://pypi.org/project/Flask-SQLAlchemy/>`_. <https://pypi.org/project/Flask-SQLAlchemy/>`_.
.. _Flask-SQLAlchemy: http://flask-sqlalchemy.pocoo.org/ .. _Flask-SQLAlchemy: https://flask-sqlalchemy.palletsprojects.com/
Declarative Declarative

View File

@ -69,8 +69,8 @@ This launches a very simple builtin server, which is good enough for testing
but probably not what you want to use in production. For deployment options see but probably not what you want to use in production. For deployment options see
:ref:`deployment`. :ref:`deployment`.
Now head over to `http://127.0.0.1:5000/ <http://127.0.0.1:5000/>`_, and you Now head over to http://127.0.0.1:5000/, and you should see your hello
should see your hello world greeting. world greeting.
.. _public-server: .. _public-server:
@ -167,7 +167,7 @@ Screenshot of the debugger in action:
More information on using the debugger can be found in the `Werkzeug More information on using the debugger can be found in the `Werkzeug
documentation`_. documentation`_.
.. _Werkzeug documentation: http://werkzeug.pocoo.org/docs/debug/#using-the-debugger .. _Werkzeug documentation: https://werkzeug.palletsprojects.com/debug/#using-the-debugger
Have another debugger in mind? See :ref:`working-with-debuggers`. Have another debugger in mind? See :ref:`working-with-debuggers`.
@ -384,7 +384,7 @@ package it's actually inside your package:
For templates you can use the full power of Jinja2 templates. Head over For templates you can use the full power of Jinja2 templates. Head over
to the official `Jinja2 Template Documentation to the official `Jinja2 Template Documentation
<http://jinja.pocoo.org/docs/templates>`_ for more information. <http://jinja.pocoo.org/docs/templates/>`_ for more information.
Here is an example template: Here is an example template:
@ -819,9 +819,8 @@ Here are some example log calls::
app.logger.error('An error occurred') app.logger.error('An error occurred')
The attached :attr:`~flask.Flask.logger` is a standard logging The attached :attr:`~flask.Flask.logger` is a standard logging
:class:`~logging.Logger`, so head over to the official `logging :class:`~logging.Logger`, so head over to the official :mod:`logging`
documentation <https://docs.python.org/library/logging.html>`_ for more docs for more information.
information.
Read more on :ref:`application-errors`. Read more on :ref:`application-errors`.

View File

@ -11,7 +11,7 @@ An extension can depend on Jinja2 being present.
This section only gives a very quick introduction into how Jinja2 This section only gives a very quick introduction into how Jinja2
is integrated into Flask. If you want information on the template is integrated into Flask. If you want information on the template
engine's syntax itself, head over to the official `Jinja2 Template engine's syntax itself, head over to the official `Jinja2 Template
Documentation <http://jinja.pocoo.org/docs/templates>`_ for Documentation <http://jinja.pocoo.org/docs/templates/>`_ for
more information. more information.
Jinja Setup Jinja Setup

View File

@ -20,8 +20,7 @@ framework for our tests. You can install it with ``pip``, like so::
pip install pytest pip install pytest
.. _pytest: .. _pytest: https://docs.pytest.org/
https://pytest.org
The Application The Application
--------------- ---------------
@ -453,5 +452,5 @@ This is useful for testing complex validation rules and custom types. ::
context = hello_command.make_context('hello', ['--name', 'flask']) context = hello_command.make_context('hello', ['--name', 'flask'])
assert context.params['name'] == 'FLASK' assert context.params['name'] == 'FLASK'
.. _click: http://click.pocoo.org/ .. _click: https://click.palletsprojects.com/
.. _utilities for testing: http://click.pocoo.org/testing .. _utilities for testing: https://click.palletsprojects.com/testing/

View File

@ -116,6 +116,6 @@ your application. Waitress is just an example, chosen for the tutorial
because it supports both Windows and Linux. There are many more WSGI because it supports both Windows and Linux. There are many more WSGI
servers and deployment options that you may choose for your project. servers and deployment options that you may choose for your project.
.. _Waitress: https://docs.pylonsproject.org/projects/waitress/ .. _Waitress: https://docs.pylonsproject.org/projects/waitress/en/stable/
Continue to :doc:`next`. Continue to :doc:`next`.

View File

@ -70,7 +70,7 @@ files.
See the `official packaging guide`_ for another explanation of the files See the `official packaging guide`_ for another explanation of the files
and options used. and options used.
.. _official packaging guide: https://packaging.python.org/tutorials/distributing-packages/ .. _official packaging guide: https://packaging.python.org/tutorials/packaging-projects/
Install the Project Install the Project

View File

@ -6,9 +6,9 @@ text. Not only these libraries, also the majority of web related Python
libraries that deal with text. If you don't know Unicode so far, you libraries that deal with text. If you don't know Unicode so far, you
should probably read `The Absolute Minimum Every Software Developer should probably read `The Absolute Minimum Every Software Developer
Absolutely, Positively Must Know About Unicode and Character Sets Absolutely, Positively Must Know About Unicode and Character Sets
<http://www.joelonsoftware.com/articles/Unicode.html>`_. This part of the <https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/>`_.
documentation just tries to cover the very basics so that you have a This part of the documentation just tries to cover the very basics so
pleasant experience with Unicode related things. that you have a pleasant experience with Unicode related things.
Automatic Conversion Automatic Conversion
-------------------- --------------------