Merge branch '1.1.x'
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 · parents 3d61fc4, 93dd170 · Browse files · 6 files·+34 added−31 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+34 added−31 removed
- other:+34 added−31 removed
Provenance
- Commit
96b4dca- Tree
bd0f07f- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent 1
3d61fc4- Parent 2
93dd170
6 files changed+34 added−31 removed
modified:docs/cli.rst+10 added-9 removed
489 unmodified lines490 491 PyCharm Integration492 -------------------493 494-Prior to PyCharm 2018.1, the Flask CLI features weren't yet fully495-integrated into PyCharm. We have to do a few tweaks to get them working496-smoothly. These instructions should be similar for any other IDE you497-might want to use.494+PyCharm Professional provides a special Flask run configuration. For495+the Community Edition, we need to configure it to call the ``flask run``496+CLI command with the correct environment variables. These instructions497+should be similar for any other IDE you might want to use.498 499 In PyCharm, with your project open, click on *Run* from the menu bar and500 go to *Edit Configurations*. You'll be greeted by a screen similar to501 this:502 503 .. image:: _static/pycharm-runconfig.png504 :align: center505 :class: screenshot506- :alt: screenshot of pycharm's run configuration settings506+ :alt: Screenshot of PyCharms's run configuration settings.507 508 There's quite a few options to change, but once we've done it for one509 command, we can easily copy the entire configuration and make a single510 tweak to give us access to other commands, including any custom ones you511 may implement yourself.512 513 Click the + (*Add New Configuration*) button and select *Python*. Give514-the configuration a good descriptive name such as "Run Flask Server".515-For the ``flask run`` command, check "Single instance only" since you516-can't run the server more than once at the same time.514+the configuration a name such as "flask run". For the ``flask run``515+command, check "Single instance only" since you can't run the server516+more than once at the same time.517 518 Select *Module name* from the dropdown (**A**) then input ``flask``.519 520 The *Parameters* field (**B**) is set to the CLI command to execute2 unmodified lines523 524 You can skip this next step if you're using :ref:`dotenv`. We need to525 add an environment variable (**C**) to identify our application. Click526 on the browse button and add an entry with ``FLASK_APP`` on the left and527-the Python import or file on the right (``hello`` for example).527+the Python import or file on the right (``hello`` for example). Add an528+entry with ``FLASK_ENV`` and set it to ``development``.529 530 Next we need to set the working directory (**D**) to be the folder where531 our application resides.532 11 unmodified linesmodified:src/flask/__init__.py+1 added-1 removed
55 unmodified lines56 from .signals import template_rendered57 from .templating import render_template58 from .templating import render_template_string59 60-__version__ = "1.2.0.dev0"60+__version__ = "1.2.0.dev"modified:src/flask/app.py+16 added-15 removed
167 unmodified lines168 :param import_name: the name of the application package169 :param static_url_path: can be used to specify a different path for the170 static files on the web. Defaults to the name171 of the `static_folder` folder.172- :param static_folder: the folder with static files that should be served173- at `static_url_path`. Defaults to the ``'static'``174- folder in the root path of the application.172+ :param static_folder: The folder with static files that is served at173+ ``static_url_path``. Relative to the application ``root_path``174+ or an absolute path. Defaults to ``'static'``.175 :param static_host: the host to use when adding the static route.176 Defaults to None. Required when using ``host_matching=True``177 with a ``static_folder`` configured.178 :param host_matching: set ``url_map.host_matching`` attribute.895 unmodified lines1074 :attr:`secret_key` is set. Instead of overriding this method1075 we recommend replacing the :class:`session_interface`.1076 1077 .. deprecated: 1.01078- Will be removed in 1.1. Use ``session_interface.open_session``1079- instead.1078+ Will be removed in 2.0. Use1079+ ``session_interface.open_session`` instead.1080 1081 :param request: an instance of :attr:`request_class`.1082 """1083 1084 warnings.warn(1085 DeprecationWarning(1086- '"open_session" is deprecated and will be removed in 1.1. Use'1087- ' "session_interface.open_session" instead.'1086+ '"open_session" is deprecated and will be removed in'1087+ ' 2.0. Use "session_interface.open_session" instead.'1088 )1089 )1090 return self.session_interface.open_session(self, request)1091 2 unmodified lines1094 implementation, check :meth:`open_session`. Instead of overriding this1095 method we recommend replacing the :class:`session_interface`.1096 1097 .. deprecated: 1.01098- Will be removed in 1.1. Use ``session_interface.save_session``1099- instead.1098+ Will be removed in 2.0. Use1099+ ``session_interface.save_session`` instead.1100 1101 :param session: the session to be saved (a1102 :class:`~werkzeug.contrib.securecookie.SecureCookie`1103 object)1 unmodified line1105 """1106 1107 warnings.warn(1108 DeprecationWarning(1109- '"save_session" is deprecated and will be removed in 1.1. Use'1110- ' "session_interface.save_session" instead.'1109+ '"save_session" is deprecated and will be removed in'1110+ ' 2.0. Use "session_interface.save_session" instead.'1111 )1112 )1113 return self.session_interface.save_session(self, session, response)1114 1 unmodified line1116 """Creates a new instance of a missing session. Instead of overriding1117 this method we recommend replacing the :class:`session_interface`.1118 1119 .. deprecated: 1.01120- Will be removed in 1.1. Use ``session_interface.make_null_session``1121- instead.1120+ Will be removed in 2.0. Use1121+ ``session_interface.make_null_session`` instead.1122 1123 .. versionadded:: 0.71124 """1125 1126 warnings.warn(1127 DeprecationWarning(1128- '"make_null_session" is deprecated and will be removed in 1.1. Use'1129- ' "session_interface.make_null_session" instead.'1128+ '"make_null_session" is deprecated and will be removed'1129+ ' in 2.0. Use "session_interface.make_null_session"'1130+ " instead."1131 )1132 )1133 return self.session_interface.make_null_session(self)1134 1324 unmodified linesmodified:src/flask/testing.py+5 added-5 removed
97 unmodified lines98 def make_test_environ_builder(*args, **kwargs):99 """Create a :class:`flask.testing.EnvironBuilder`.100 101 .. deprecated: 1.1102- Will be removed in 1.2. Construct ``flask.testing.EnvironBuilder``103- directly instead.102+ Will be removed in 2.0. Construct103+ ``flask.testing.EnvironBuilder`` directly instead.104 """105 warnings.warn(106 DeprecationWarning(107- '"make_test_environ_builder()" is deprecated and will be removed '108- 'in 1.2. Construct "flask.testing.EnvironBuilder" directly '109- "instead."107+ '"make_test_environ_builder()" is deprecated and will be'108+ ' removed in 2.0. Construct "flask.testing.EnvironBuilder"'109+ " directly instead."110 )111 )112 return EnvironBuilder(*args, **kwargs)113 170 unmodified linesmodified:CHANGES.rst+1 added-1 removed
21 unmodified lines22 23 Version 1.1.224 -------------25 26-Unreleased26+Released 2020-04-0327 28 - Work around an issue when running the ``flask`` command with an29 external debugger on Windows. :issue:`3297`30 - The static route will not catch all URLs if the ``Flask``1008 unmodified linesmodified:MANIFEST.in+1 added
4 unmodified lines5 graft docs6 prune docs/_build7 graft examples8 graft tests9+global-exclude *.pyc