Skip to content
Myr

fix some warnings while building docs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parent be2abd2 · Browse files · 3 files+21 added−18 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+21 added−18 removed

  • other:+21 added−18 removed

3 files+21 added−18 removed

modified:docs/conf.py+15 added-14 removed
8 unmodified lines
9# autogenerated file.10#11# All configuration values have a default; values that are commented out12# serve to show the default.1313from __future__ import print_function14import sys, os1516# If extensions (or modules to document with autodoc) are in another directory,17# add these directories to sys.path here. If the directory is relative to the
7 unmodified lines
25#needs_sphinx = '1.0'2627# Add any Sphinx extension module names here, as strings. They can be extensions28# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.29extensions = [30 'sphinx.ext.autodoc',29extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx',30 'flaskdocext']31 'sphinx.ext.intersphinx',32 'flaskdocext'33]3435# Add any paths that contain templates here, relative to this directory.36templates_path = ['_templates']37
16 unmodified lines
54import pkg_resources55try:56 release = pkg_resources.get_distribution('Flask').version57except pkg_resources.DistributionNotFound:55 print 'To build the documentation, The distribution information of Flask'56 print 'Has to be available. Either install the package into your'57 print 'development environment or run "setup.py develop" to setup the'58 print 'metadata. A virtualenv is recommended!'58 print('Flask must be installed to build the documentation.')59 print('Install from source using `pip install -e .` in a virtualenv.')60 sys.exit(1)61del pkg_resources6263if 'dev' in release:
194 unmodified lines
258259# fall back if theme is not there260try:261 __import__('flask_theme_support')261except ImportError, e:262 print '-' * 74263 print 'Warning: Flask themes unavailable. Building with default theme'264 print 'If you want the Flask themes, run this command and build again:'265 print266 print ' git submodule update --init'267 print '-' * 74262except ImportError as e:263 print('-' * 74)264 print('Warning: Flask themes unavailable. Building with default theme')265 print('If you want the Flask themes, run this command and build again:')266 print()267 print(' git submodule update --init')268 print('-' * 74)269270 pygments_style = 'tango'271 html_theme = 'default'272 html_theme_options = {}
21 unmodified lines
modified:docs/extensions.rst+2 added
1.. _extensions:23Flask Extensions4================56Flask extensions extend the functionality of Flask in various different
45 unmodified lines
modified:docs/upgrading.rst+4 added-4 removed
23 unmodified lines
24Version 1.025-----------2627Debugging28+++++++++28`````````2930Flask 1.0 removed the ``debug_log_format`` attribute from Flask31applications. Instead the new ``LOGGER_HANDLER_POLICY`` configuration can32be used to disable the default log handlers and custom log handlers can be33set up.3435Error handling36++++++++++++++36``````````````3738The behavior of error handlers was changed.39The precedence of handlers used to be based on the decoration/call order of40:meth:`~flask.Flask.errorhandler` and
11 unmodified lines
52 and therefore was replaced with the intended behavior of registering53 handlers only using exception classes and HTTP error codes.5455Templating56++++++++++56``````````5758The :func:`~flask.templating.render_template_string` function has changed to59autoescape template variables by default. This better matches the behavior60of :func:`~flask.templating.render_template`.61 62Extension imports63+++++++++++++++++63`````````````````6465Extension imports of the form ``flask.ext.foo`` are deprecated, you should use66``flask_foo``.67
357 unmodified lines