Merge branch '1.1.x'

This commit is contained in:
David Lord 2020-04-03 10:25:51 -07:00
commit 96b4dcafc3
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
6 changed files with 34 additions and 31 deletions

View file

@ -23,7 +23,7 @@ Unreleased
Version 1.1.2 Version 1.1.2
------------- -------------
Unreleased Released 2020-04-03
- Work around an issue when running the ``flask`` command with an - Work around an issue when running the ``flask`` command with an
external debugger on Windows. :issue:`3297` external debugger on Windows. :issue:`3297`

View file

@ -6,3 +6,4 @@ graft docs
prune docs/_build prune docs/_build
graft examples graft examples
graft tests graft tests
global-exclude *.pyc

View file

@ -491,10 +491,10 @@ script is available. Note that you don't need to set ``FLASK_APP``. ::
PyCharm Integration PyCharm Integration
------------------- -------------------
Prior to PyCharm 2018.1, the Flask CLI features weren't yet fully PyCharm Professional provides a special Flask run configuration. For
integrated into PyCharm. We have to do a few tweaks to get them working the Community Edition, we need to configure it to call the ``flask run``
smoothly. These instructions should be similar for any other IDE you CLI command with the correct environment variables. These instructions
might want to use. should be similar for any other IDE you might want to use.
In PyCharm, with your project open, click on *Run* from the menu bar and In PyCharm, with your project open, click on *Run* from the menu bar and
go to *Edit Configurations*. You'll be greeted by a screen similar to go to *Edit Configurations*. You'll be greeted by a screen similar to
@ -503,7 +503,7 @@ this:
.. image:: _static/pycharm-runconfig.png .. image:: _static/pycharm-runconfig.png
:align: center :align: center
:class: screenshot :class: screenshot
:alt: screenshot of pycharm's run configuration settings :alt: Screenshot of PyCharms's run configuration settings.
There's quite a few options to change, but once we've done it for one There's quite a few options to change, but once we've done it for one
command, we can easily copy the entire configuration and make a single command, we can easily copy the entire configuration and make a single
@ -511,9 +511,9 @@ tweak to give us access to other commands, including any custom ones you
may implement yourself. may implement yourself.
Click the + (*Add New Configuration*) button and select *Python*. Give Click the + (*Add New Configuration*) button and select *Python*. Give
the configuration a good descriptive name such as "Run Flask Server". the configuration a name such as "flask run". For the ``flask run``
For the ``flask run`` command, check "Single instance only" since you command, check "Single instance only" since you can't run the server
can't run the server more than once at the same time. more than once at the same time.
Select *Module name* from the dropdown (**A**) then input ``flask``. Select *Module name* from the dropdown (**A**) then input ``flask``.
@ -524,7 +524,8 @@ the development server.
You can skip this next step if you're using :ref:`dotenv`. We need to You can skip this next step if you're using :ref:`dotenv`. We need to
add an environment variable (**C**) to identify our application. Click add an environment variable (**C**) to identify our application. Click
on the browse button and add an entry with ``FLASK_APP`` on the left and on the browse button and add an entry with ``FLASK_APP`` on the left and
the Python import or file on the right (``hello`` for example). the Python import or file on the right (``hello`` for example). Add an
entry with ``FLASK_ENV`` and set it to ``development``.
Next we need to set the working directory (**D**) to be the folder where Next we need to set the working directory (**D**) to be the folder where
our application resides. our application resides.

View file

@ -57,4 +57,4 @@ from .signals import template_rendered
from .templating import render_template from .templating import render_template
from .templating import render_template_string from .templating import render_template_string
__version__ = "1.2.0.dev0" __version__ = "1.2.0.dev"

View file

@ -169,9 +169,9 @@ class Flask(_PackageBoundObject):
:param static_url_path: can be used to specify a different path for the :param static_url_path: can be used to specify a different path for the
static files on the web. Defaults to the name static files on the web. Defaults to the name
of the `static_folder` folder. of the `static_folder` folder.
:param static_folder: the folder with static files that should be served :param static_folder: The folder with static files that is served at
at `static_url_path`. Defaults to the ``'static'`` ``static_url_path``. Relative to the application ``root_path``
folder in the root path of the application. or an absolute path. Defaults to ``'static'``.
:param static_host: the host to use when adding the static route. :param static_host: the host to use when adding the static route.
Defaults to None. Required when using ``host_matching=True`` Defaults to None. Required when using ``host_matching=True``
with a ``static_folder`` configured. with a ``static_folder`` configured.
@ -1075,16 +1075,16 @@ class Flask(_PackageBoundObject):
we recommend replacing the :class:`session_interface`. we recommend replacing the :class:`session_interface`.
.. deprecated: 1.0 .. deprecated: 1.0
Will be removed in 1.1. Use ``session_interface.open_session`` Will be removed in 2.0. Use
instead. ``session_interface.open_session`` instead.
:param request: an instance of :attr:`request_class`. :param request: an instance of :attr:`request_class`.
""" """
warnings.warn( warnings.warn(
DeprecationWarning( DeprecationWarning(
'"open_session" is deprecated and will be removed in 1.1. Use' '"open_session" is deprecated and will be removed in'
' "session_interface.open_session" instead.' ' 2.0. Use "session_interface.open_session" instead.'
) )
) )
return self.session_interface.open_session(self, request) return self.session_interface.open_session(self, request)
@ -1095,8 +1095,8 @@ class Flask(_PackageBoundObject):
method we recommend replacing the :class:`session_interface`. method we recommend replacing the :class:`session_interface`.
.. deprecated: 1.0 .. deprecated: 1.0
Will be removed in 1.1. Use ``session_interface.save_session`` Will be removed in 2.0. Use
instead. ``session_interface.save_session`` instead.
:param session: the session to be saved (a :param session: the session to be saved (a
:class:`~werkzeug.contrib.securecookie.SecureCookie` :class:`~werkzeug.contrib.securecookie.SecureCookie`
@ -1106,8 +1106,8 @@ class Flask(_PackageBoundObject):
warnings.warn( warnings.warn(
DeprecationWarning( DeprecationWarning(
'"save_session" is deprecated and will be removed in 1.1. Use' '"save_session" is deprecated and will be removed in'
' "session_interface.save_session" instead.' ' 2.0. Use "session_interface.save_session" instead.'
) )
) )
return self.session_interface.save_session(self, session, response) return self.session_interface.save_session(self, session, response)
@ -1117,16 +1117,17 @@ class Flask(_PackageBoundObject):
this method we recommend replacing the :class:`session_interface`. this method we recommend replacing the :class:`session_interface`.
.. deprecated: 1.0 .. deprecated: 1.0
Will be removed in 1.1. Use ``session_interface.make_null_session`` Will be removed in 2.0. Use
instead. ``session_interface.make_null_session`` instead.
.. versionadded:: 0.7 .. versionadded:: 0.7
""" """
warnings.warn( warnings.warn(
DeprecationWarning( DeprecationWarning(
'"make_null_session" is deprecated and will be removed in 1.1. Use' '"make_null_session" is deprecated and will be removed'
' "session_interface.make_null_session" instead.' ' in 2.0. Use "session_interface.make_null_session"'
" instead."
) )
) )
return self.session_interface.make_null_session(self) return self.session_interface.make_null_session(self)

View file

@ -99,14 +99,14 @@ def make_test_environ_builder(*args, **kwargs):
"""Create a :class:`flask.testing.EnvironBuilder`. """Create a :class:`flask.testing.EnvironBuilder`.
.. deprecated: 1.1 .. deprecated: 1.1
Will be removed in 1.2. Construct ``flask.testing.EnvironBuilder`` Will be removed in 2.0. Construct
directly instead. ``flask.testing.EnvironBuilder`` directly instead.
""" """
warnings.warn( warnings.warn(
DeprecationWarning( DeprecationWarning(
'"make_test_environ_builder()" is deprecated and will be removed ' '"make_test_environ_builder()" is deprecated and will be'
'in 1.2. Construct "flask.testing.EnvironBuilder" directly ' ' removed in 2.0. Construct "flask.testing.EnvironBuilder"'
"instead." " directly instead."
) )
) )
return EnvironBuilder(*args, **kwargs) return EnvironBuilder(*args, **kwargs)