"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/flask/app.py" between
flask-1.1.1.tar.gz and flask-1.1.2.tar.gz

About: Flask is a lightweight Python WSGI web application framework.

app.py  (flask-1.1.1):app.py  (flask-1.1.2)
skipping to change at line 170 skipping to change at line 170
.. versionadded:: 1.0 .. versionadded:: 1.0
The ``subdomain_matching`` parameter was added. Subdomain The ``subdomain_matching`` parameter was added. Subdomain
matching needs to be enabled manually now. Setting matching needs to be enabled manually now. Setting
:data:`SERVER_NAME` does not implicitly enable it. :data:`SERVER_NAME` does not implicitly enable it.
:param import_name: the name of the application package :param import_name: the name of the application package
: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.
:param host_matching: set ``url_map.host_matching`` attribute. :param host_matching: set ``url_map.host_matching`` attribute.
Defaults to False. Defaults to False.
:param subdomain_matching: consider the subdomain relative to :param subdomain_matching: consider the subdomain relative to
:data:`SERVER_NAME` when matching routes. Defaults to False. :data:`SERVER_NAME` when matching routes. Defaults to False.
:param template_folder: the folder that contains the templates that should :param template_folder: the folder that contains the templates that should
be used by the application. Defaults to be used by the application. Defaults to
``'templates'`` folder in the root path of the ``'templates'`` folder in the root path of the
skipping to change at line 1074 skipping to change at line 1074
return cls(self, **kwargs) return cls(self, **kwargs)
def open_session(self, request): def open_session(self, request):
"""Creates or opens a new session. Default implementation stores all """Creates or opens a new session. Default implementation stores all
session data in a signed cookie. This requires that the session data in a signed cookie. This requires that the
:attr:`secret_key` is set. Instead of overriding this method :attr:`secret_key` is set. Instead of overriding this method
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)
def save_session(self, session, response): def save_session(self, session, response):
"""Saves the session if it needs updates. For the default """Saves the session if it needs updates. For the default
implementation, check :meth:`open_session`. Instead of overriding this implementation, check :meth:`open_session`. Instead of overriding this
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`
object) object)
:param response: an instance of :attr:`response_class` :param response: an instance of :attr:`response_class`
""" """
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)
def make_null_session(self): def make_null_session(self):
"""Creates a new instance of a missing session. Instead of overriding """Creates a new instance of a missing session. Instead of overriding
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. U '"make_null_session" is deprecated and will be removed'
se' ' in 2.0. Use "session_interface.make_null_session"'
' "session_interface.make_null_session" instead.' " instead."
) )
) )
return self.session_interface.make_null_session(self) return self.session_interface.make_null_session(self)
@setupmethod @setupmethod
def register_blueprint(self, blueprint, **options): def register_blueprint(self, blueprint, **options):
"""Register a :class:`~flask.Blueprint` on the application. Keyword """Register a :class:`~flask.Blueprint` on the application. Keyword
arguments passed to this method will override the defaults set on the arguments passed to this method will override the defaults set on the
blueprint. blueprint.
 End of changes. 7 change blocks. 
16 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)