diff --git a/CHANGES.rst b/CHANGES.rst index d7bc1bcc..9c5735a3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,12 @@ .. currentmodule:: flask +Version 1.1.4 +------------- + +Unreleased + +- Update ``static_folder`` to use ``_compat.fspath`` instead of + ``os.fspath`` to continue supporting Python <3.6 :issue:`4050` Version 1.1.3 diff --git a/src/flask/__init__.py b/src/flask/__init__.py index f6da4f9b..72bf6abf 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.1.3" +__version__ = "1.1.4.dev0" diff --git a/src/flask/helpers.py b/src/flask/helpers.py index 3e64e3fa..c396b8b1 100644 --- a/src/flask/helpers.py +++ b/src/flask/helpers.py @@ -1001,7 +1001,7 @@ class _PackageBoundObject(object): @static_folder.setter def static_folder(self, value): if value is not None: - value = os.fspath(value).rstrip(r"\/") + value = fspath(value).rstrip(r"\/") self._static_folder = value @property diff --git a/tests/test_basic.py b/tests/test_basic.py index 58cbe3b7..8cc69182 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -1425,7 +1425,6 @@ def test_static_url_empty_path_default(app): rv.close() -@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires Python >= 3.6") def test_static_folder_with_pathlib_path(app): from pathlib import Path