From 08b449c5da198fc0bb90734c3887bebc59e77ad0 Mon Sep 17 00:00:00 2001 From: understreck Date: Apr 11 2024 14:51:37 +0000 Subject: [PATCH 1/2] Change 'cache_timeout' to 'max_age' and increment version number. Flask 2.2.0 changed the name of several arguments of send_file, which send_form_directory sends its kwargs to. --- diff --git a/flask_multistatic.py b/flask_multistatic.py index 525e425..a3b058f 100644 --- a/flask_multistatic.py +++ b/flask_multistatic.py @@ -81,7 +81,7 @@ class MultiStaticFlask(Flask): # Ensure get_send_file_max_age is called in all cases. # Here, we ensure get_send_file_max_age is called for Blueprints. - cache_timeout = self.get_send_file_max_age(filename) + max_age = self.get_send_file_max_age(filename) folders = self.static_folder if isinstance(self.static_folder, string_types): @@ -90,7 +90,7 @@ class MultiStaticFlask(Flask): for directory in folders: try: return send_from_directory( - directory, filename, cache_timeout=cache_timeout) + directory, filename, max_age=max_age) except NotFound: pass raise NotFound() diff --git a/setup.py b/setup.py index c8fed66..f036a1d 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ from setuptools import setup setup( name='flask-multistatic', description='Simple flask plugin to allow overriding static files', - version='1.0', + version='1.0.1', author='Pierre-Yves Chibon', author_email='pingou@pingoured.fr', license='GPLv3+', From eec6690556f0eb7907e0615a1e7c1a962e10f74c Mon Sep 17 00:00:00 2001 From: Anja Hoeglind Date: Apr 11 2024 18:34:24 +0000 Subject: [PATCH 2/2] Increment version according to Semantic Versioning --- diff --git a/setup.py b/setup.py index f036a1d..8c0e0d1 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ from setuptools import setup setup( name='flask-multistatic', description='Simple flask plugin to allow overriding static files', - version='1.0.1', + version='2.0', author='Pierre-Yves Chibon', author_email='pingou@pingoured.fr', license='GPLv3+',