Skip to content
Myr

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 008d338, ffc6884 · Browse files · 6 files+57 added−4 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+57 added−4 removed

  • tests:+12 added−0 removed
  • other:+45 added−4 removed

6 files+57 added−4 removed

modified:src/flask/__init__.py+2 added-1 removed
15 unmodified lines
16from werkzeug.exceptions import abort17from werkzeug.utils import redirect1819from . import json20from ._compat import json_available21from .app import Flask22from .app import Request23from .app import Response24from .blueprints import Blueprint
31 unmodified lines
56from .signals import template_rendered57from .templating import render_template58from .templating import render_template_string5959__version__ = "1.1.0"60__version__ = "1.1.1"
modified:src/flask/_compat.py+30 added
111 unmodified lines
112 # Backwards compatibility as proposed in PEP 0519:113 # https://www.python.org/dev/peps/pep-0519/#backwards-compatibility114 def fspath(path):115 return path.__fspath__() if hasattr(path, "__fspath__") else path116117118class _DeprecatedBool(object):119 def __init__(self, name, version, value):120 self.message = "'{}' is deprecated and will be removed in version {}.".format(121 name, version122 )123 self.value = value124125 def _warn(self):126 import warnings127128 warnings.warn(self.message, DeprecationWarning, stacklevel=2)129130 def __eq__(self, other):131 self._warn()132 return other == self.value133134 def __ne__(self, other):135 self._warn()136 return other != self.value137138 def __bool__(self):139 self._warn()140 return self.value141142 __nonzero__ = __bool__143144145json_available = _DeprecatedBool("flask.json_available", "2.0.0", True)
added:tests/test_deprecations.py+12 added
1import pytest23from flask import json_available456def test_json_available():7 with pytest.deprecated_call() as rec:8 assert json_available9 assert json_available == True # noqa E71210 assert json_available != False # noqa E7121112 assert len(rec.list) == 3
modified:CHANGES.rst+10 added
1.. currentmodule:: flask23Version 1.1.14-------------56Released 2019-07-0878- The ``flask.json_available`` flag was added back for compatibility9 with some extensions. It will raise a deprecation warning when used,10 and will be removed in version 2.0.0. :issue:`3288`111213Version 1.1.014-------------1516Released 2019-07-04
983 unmodified lines
modified:README.rst+2 added-2 removed
64 unmodified lines
6566Links67-----6869* Website: https://www.palletsprojects.com/p/flask/70* Documentation: http://flask.pocoo.org/docs/69* Website: https://palletsprojects.com/p/flask/70* Documentation: https://flask.palletsprojects.com/71* Releases: https://pypi.org/project/Flask/72* Code: https://github.com/pallets/flask73* Issue tracker: https://github.com/pallets/flask/issues74* Test status: https://dev.azure.com/pallets/flask/_build
6 unmodified lines
modified:setup.py+1 added-1 removed
13 unmodified lines
14 name="Flask",15 version=version,16 url="https://palletsprojects.com/p/flask/",17 project_urls={18 "Documentation": "http://flask.palletsprojects.com/",18 "Documentation": "https://flask.palletsprojects.com/",19 "Code": "https://github.com/pallets/flask",20 "Issue tracker": "https://github.com/pallets/flask/issues",21 },22 license="BSD-3-Clause",
55 unmodified lines