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
-------------
Unreleased
Released 2020-04-03
- Work around an issue when running the ``flask`` command with an
external debugger on Windows. :issue:`3297`

View file

@ -6,3 +6,4 @@ graft docs
prune docs/_build
graft examples
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
-------------------
Prior to PyCharm 2018.1, the Flask CLI features weren't yet fully
integrated into PyCharm. We have to do a few tweaks to get them working
smoothly. These instructions should be similar for any other IDE you
might want to use.
PyCharm Professional provides a special Flask run configuration. For
the Community Edition, we need to configure it to call the ``flask run``
CLI command with the correct environment variables. These instructions
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
go to *Edit Configurations*. You'll be greeted by a screen similar to
@ -503,7 +503,7 @@ this:
.. image:: _static/pycharm-runconfig.png
:align: center
: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
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.
Click the + (*Add New Configuration*) button and select *Python*. Give
the configuration a good descriptive name such as "Run Flask Server".
For the ``flask run`` command, check "Single instance only" since you
can't run the server more than once at the same time.
the configuration a name such as "flask run". For the ``flask run``
command, check "Single instance only" since you can't run the server
more than once at the same time.
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
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
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
our application resides.

View file

@ -57,4 +57,4 @@ from .signals import template_rendered
from .templating import render_template
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
static files on the web. Defaults to the name
of the `static_folder` folder.
:param static_folder: the folder with static files that should be served
at `static_url_path`. Defaults to the ``'static'``
folder in the root path of the application.
:param static_folder: The folder with static files that is served at
``static_url_path``. Relative to the application ``root_path``
or an absolute path. Defaults to ``'static'``.
:param static_host: the host to use when adding the static route.
Defaults to None. Required when using ``host_matching=True``
with a ``static_folder`` configured.
@ -1075,16 +1075,16 @@ class Flask(_PackageBoundObject):
we recommend replacing the :class:`session_interface`.
.. deprecated: 1.0
Will be removed in 1.1. Use ``session_interface.open_session``
instead.
Will be removed in 2.0. Use
``session_interface.open_session`` instead.
:param request: an instance of :attr:`request_class`.
"""
warnings.warn(
DeprecationWarning(
'"open_session" is deprecated and will be removed in 1.1. Use'
' "session_interface.open_session" instead.'
'"open_session" is deprecated and will be removed in'
' 2.0. Use "session_interface.open_session" instead.'
)
)
return self.session_interface.open_session(self, request)
@ -1095,8 +1095,8 @@ class Flask(_PackageBoundObject):
method we recommend replacing the :class:`session_interface`.
.. deprecated: 1.0
Will be removed in 1.1. Use ``session_interface.save_session``
instead.
Will be removed in 2.0. Use
``session_interface.save_session`` instead.
:param session: the session to be saved (a
:class:`~werkzeug.contrib.securecookie.SecureCookie`
@ -1106,8 +1106,8 @@ class Flask(_PackageBoundObject):
warnings.warn(
DeprecationWarning(
'"save_session" is deprecated and will be removed in 1.1. Use'
' "session_interface.save_session" instead.'
'"save_session" is deprecated and will be removed in'
' 2.0. Use "session_interface.save_session" instead.'
)
)
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`.
.. deprecated: 1.0
Will be removed in 1.1. Use ``session_interface.make_null_session``
instead.
Will be removed in 2.0. Use
``session_interface.make_null_session`` instead.
.. versionadded:: 0.7
"""
warnings.warn(
DeprecationWarning(
'"make_null_session" is deprecated and will be removed in 1.1. Use'
' "session_interface.make_null_session" instead.'
'"make_null_session" is deprecated and will be removed'
' in 2.0. Use "session_interface.make_null_session"'
" instead."
)
)
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`.
.. deprecated: 1.1
Will be removed in 1.2. Construct ``flask.testing.EnvironBuilder``
directly instead.
Will be removed in 2.0. Construct
``flask.testing.EnvironBuilder`` directly instead.
"""
warnings.warn(
DeprecationWarning(
'"make_test_environ_builder()" is deprecated and will be removed '
'in 1.2. Construct "flask.testing.EnvironBuilder" directly '
"instead."
'"make_test_environ_builder()" is deprecated and will be'
' removed in 2.0. Construct "flask.testing.EnvironBuilder"'
" directly instead."
)
)
return EnvironBuilder(*args, **kwargs)