#2 Change 'cache_timeout' to 'max_age' and increment version number.
Opened a month ago by underscore. Modified a month ago
underscore/flask-multistatic master  into  master

file modified
+2 -2
@@ -81,7 +81,7 @@ 

  

          # 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 @@ 

          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()

file modified
+1 -1
@@ -8,7 +8,7 @@ 

  setup(

      name='flask-multistatic',

      description='Simple flask plugin to allow overriding static files',

-     version='1.0',

+     version='2.0',

      author='Pierre-Yves Chibon',

      author_email='pingou@pingoured.fr',

      license='GPLv3+',

Flask 2.2.0 changed the name of several arguments of send_file,
which send_form_directory sends its kwargs to.

The version should likely be bumped higher as this isn't backward compatible

but +1 for me

1 new commit added

  • Increment version according to Semantic Versioning
a month ago

Changed it to 2.0 according to Semantic Versioning since it is not backward compatible. Does that work?

Metadata