diff --git a/CHANGES.rst b/CHANGES.rst index 382653c6..ddc82062 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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` diff --git a/MANIFEST.in b/MANIFEST.in index 555022cb..b2c37b97 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,3 +6,4 @@ graft docs prune docs/_build graft examples graft tests +global-exclude *.pyc diff --git a/docs/cli.rst b/docs/cli.rst index 96c5396f..c50872a7 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -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. diff --git a/src/flask/__init__.py b/src/flask/__init__.py index 6b5b91cc..8fe9b409 100644 --- a/src/flask/__init__.py +++ b/src/flask/__init__.py @@ -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" diff --git a/src/flask/app.py b/src/flask/app.py index 125ee920..baaed5c9 100644 --- a/src/flask/app.py +++ b/src/flask/app.py @@ -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) diff --git a/src/flask/testing.py b/src/flask/testing.py index b27dfcca..62766a50 100644 --- a/src/flask/testing.py +++ b/src/flask/testing.py @@ -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)