Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-whitenoise for 
openSUSE:Factory checked in at 2024-11-21 15:13:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-whitenoise (Old)
 and      /work/SRC/openSUSE:Factory/.python-whitenoise.new.28523 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-whitenoise"

Thu Nov 21 15:13:59 2024 rev:12 rq:1225343 version:6.8.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-whitenoise/python-whitenoise.changes      
2024-10-31 16:09:59.512638127 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-whitenoise.new.28523/python-whitenoise.changes
   2024-11-21 15:14:47.647892602 +0100
@@ -1,0 +2,10 @@
+Wed Nov 20 16:42:25 UTC 2024 - Dirk Müller <dmuel...@suse.com>
+
+- update to 6.8.2:
+  * Fix compression speed gains for the thread pool when running
+    Django’s collectstatic. The thread pool had no effect due to
+    use of a generator for the results, a refactoring introduced
+    when reviewing the initial PR. Thanks to Petr Přikryl for the
+    investigation and fix in PR #616.
+
+-------------------------------------------------------------------

Old:
----
  whitenoise-6.8.1.tar.gz

New:
----
  whitenoise-6.8.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-whitenoise.spec ++++++
--- /var/tmp/diff_new_pack.094kvY/_old  2024-11-21 15:14:48.543929847 +0100
+++ /var/tmp/diff_new_pack.094kvY/_new  2024-11-21 15:14:48.547930013 +0100
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-whitenoise
-Version:        6.8.1
+Version:        6.8.2
 Release:        0
 Summary:        Static file serving for WSGI applications
 License:        MIT

++++++ whitenoise-6.8.1.tar.gz -> whitenoise-6.8.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/whitenoise-6.8.1/docs/changelog.rst 
new/whitenoise-6.8.2/docs/changelog.rst
--- old/whitenoise-6.8.1/docs/changelog.rst     2024-10-28 15:59:51.000000000 
+0100
+++ new/whitenoise-6.8.2/docs/changelog.rst     2024-10-30 00:04:34.000000000 
+0100
@@ -2,6 +2,14 @@
 Changelog
 =========
 
+6.8.2 (2024-10-29)
+------------------
+
+* Fix compression speed gains for the thread pool when running Django’s 
``collectstatic``.
+  The thread pool had no effect due to use of a generator for the results, a 
refactoring introduced when reviewing the initial PR.
+
+  Thanks to Petr Přikryl for the investigation and fix in `PR #616 
<https://github.com/evansd/whitenoise/pull/616>`__.
+
 6.8.1 (2024-10-28)
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/whitenoise-6.8.1/pyproject.toml 
new/whitenoise-6.8.2/pyproject.toml
--- old/whitenoise-6.8.1/pyproject.toml 2024-10-28 15:59:51.000000000 +0100
+++ new/whitenoise-6.8.2/pyproject.toml 2024-10-30 00:04:34.000000000 +0100
@@ -6,7 +6,7 @@
 
 [project]
 name = "whitenoise"
-version = "6.8.1"
+version = "6.8.2"
 description = "Radically simplified static file serving for WSGI applications"
 readme = "README.rst"
 keywords = [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/whitenoise-6.8.1/src/whitenoise/compress.py 
new/whitenoise-6.8.2/src/whitenoise/compress.py
--- old/whitenoise-6.8.1/src/whitenoise/compress.py     2024-10-28 
15:59:51.000000000 +0100
+++ new/whitenoise-6.8.2/src/whitenoise/compress.py     2024-10-30 
00:04:34.000000000 +0100
@@ -79,7 +79,8 @@
     def log(self, message):
         pass
 
-    def _lazy_compress(self, path):
+    def compress(self, path):
+        filenames = []
         with open(path, "rb") as f:
             stat_result = os.fstat(f.fileno())
             data = f.read()
@@ -87,17 +88,15 @@
         if self.use_brotli:
             compressed = self.compress_brotli(data)
             if self.is_compressed_effectively("Brotli", path, size, 
compressed):
-                yield self.write_data(path, compressed, ".br", stat_result)
+                filenames.append(self.write_data(path, compressed, ".br", 
stat_result))
             else:
                 # If Brotli compression wasn't effective gzip won't be either
-                return
+                return filenames
         if self.use_gzip:
             compressed = self.compress_gzip(data)
             if self.is_compressed_effectively("Gzip", path, size, compressed):
-                yield self.write_data(path, compressed, ".gz", stat_result)
-
-    def compress(self, path):
-        return list(self._lazy_compress(path))
+                filenames.append(self.write_data(path, compressed, ".gz", 
stat_result))
+        return filenames
 
     @staticmethod
     def compress_gzip(data):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/whitenoise-6.8.1/src/whitenoise/storage.py 
new/whitenoise-6.8.2/src/whitenoise/storage.py
--- old/whitenoise-6.8.1/src/whitenoise/storage.py      2024-10-28 
15:59:51.000000000 +0100
+++ new/whitenoise-6.8.2/src/whitenoise/storage.py      2024-10-30 
00:04:34.000000000 +0100
@@ -35,11 +35,13 @@
         self.compressor = self.create_compressor(extensions=extensions, 
quiet=True)
 
         def _compress_path(path: str) -> Generator[tuple[str, str, bool]]:
+            compressed: list[tuple[str, str, bool]] = []
             full_path = self.path(path)
             prefix_len = len(full_path) - len(path)
             for compressed_path in self.compressor.compress(full_path):
                 compressed_name = compressed_path[prefix_len:]
-                yield (path, compressed_name, True)
+                compressed.append((path, compressed_name, True))
+            return compressed
 
         with ThreadPoolExecutor() as executor:
             futures = (
@@ -142,12 +144,14 @@
         extensions = getattr(settings, "WHITENOISE_SKIP_COMPRESS_EXTENSIONS", 
None)
         self.compressor = self.create_compressor(extensions=extensions, 
quiet=True)
 
-        def _compress_path(path: str) -> Generator[tuple[str, str]]:
+        def _compress_path(path: str) -> list[tuple[str, str]]:
+            compressed: list[tuple[str, str]] = []
             full_path = self.path(path)
             prefix_len = len(full_path) - len(path)
             for compressed_path in self.compressor.compress(full_path):
                 compressed_name = compressed_path[prefix_len:]
-                yield (path, compressed_name)
+                compressed.append((path, compressed_name))
+            return compressed
 
         with ThreadPoolExecutor() as executor:
             futures = (

Reply via email to