Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-Flask-Compress for openSUSE:Factory checked in at 2022-11-06 12:42:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Flask-Compress (Old) and /work/SRC/openSUSE:Factory/.python-Flask-Compress.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Flask-Compress" Sun Nov 6 12:42:23 2022 rev:10 rq:1033747 version:1.13 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Flask-Compress/python-Flask-Compress.changes 2022-06-05 21:28:32.733047589 +0200 +++ /work/SRC/openSUSE:Factory/.python-Flask-Compress.new.2275/python-Flask-Compress.changes 2022-11-06 12:42:39.617545877 +0100 @@ -1,0 +2,11 @@ +Sat Nov 5 19:31:38 UTC 2022 - Arun Persaud <a...@gmx.de> + +- specfile: + * update copyright year + * use pytest + +- update to version 1.13: + * Re-enable compression for streaming, but hide it behind a new + option COMPRESS_STREAMS that defaults to True. See #36 + +------------------------------------------------------------------- Old: ---- Flask-Compress-1.12.tar.gz New: ---- Flask-Compress-1.13.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Flask-Compress.spec ++++++ --- /var/tmp/diff_new_pack.EqQwy8/_old 2022-11-06 12:42:41.969559923 +0100 +++ /var/tmp/diff_new_pack.EqQwy8/_new 2022-11-06 12:42:41.977559971 +0100 @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-Flask-Compress -Version: 1.12 +Version: 1.13 Release: 0 Summary: Compress responses in Flask apps with gzip License: MIT @@ -28,6 +28,7 @@ Source: https://files.pythonhosted.org/packages/source/F/Flask-Compress/Flask-Compress-%{version}.tar.gz BuildRequires: %{python_module Brotli} BuildRequires: %{python_module importlib-metadata} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -59,7 +60,7 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%pyunittest discover -v tests +%pytest %files %{python_files} %doc README.md ++++++ Flask-Compress-1.12.tar.gz -> Flask-Compress-1.13.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Compress-1.12/.gitignore new/Flask-Compress-1.13/.gitignore --- old/Flask-Compress-1.12/.gitignore 2022-04-28 14:26:34.000000000 +0200 +++ new/Flask-Compress-1.13/.gitignore 2022-09-21 15:04:36.000000000 +0200 @@ -3,6 +3,7 @@ *.sw[klmnop] # python *.py[co~] +.python-version # Ignoring build dir /build /dist diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Compress-1.12/Flask_Compress.egg-info/PKG-INFO new/Flask-Compress-1.13/Flask_Compress.egg-info/PKG-INFO --- old/Flask-Compress-1.12/Flask_Compress.egg-info/PKG-INFO 2022-04-28 14:26:47.000000000 +0200 +++ new/Flask-Compress-1.13/Flask_Compress.egg-info/PKG-INFO 2022-09-21 15:04:51.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: Flask-Compress -Version: 1.12 +Version: 1.13 Summary: Compress responses in your Flask app with gzip, deflate or brotli. Home-page: https://github.com/colour-science/flask-compress Author: Thomas Mansencal @@ -140,5 +140,4 @@ | `COMPRESS_CACHE_BACKEND` | Specified the backend for storing the cached response data. | `None` | | `COMPRESS_REGISTER` | Specifies if compression should be automatically registered. | `True` | | `COMPRESS_ALGORITHM` | Supported compression algorithms. | `['br', 'gzip', 'deflate']` | - - +| `COMPRESS_STREAMS` | Compress content streams. | `True` | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Compress-1.12/PKG-INFO new/Flask-Compress-1.13/PKG-INFO --- old/Flask-Compress-1.12/PKG-INFO 2022-04-28 14:26:47.721182600 +0200 +++ new/Flask-Compress-1.13/PKG-INFO 2022-09-21 15:04:51.867770700 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: Flask-Compress -Version: 1.12 +Version: 1.13 Summary: Compress responses in your Flask app with gzip, deflate or brotli. Home-page: https://github.com/colour-science/flask-compress Author: Thomas Mansencal @@ -140,5 +140,4 @@ | `COMPRESS_CACHE_BACKEND` | Specified the backend for storing the cached response data. | `None` | | `COMPRESS_REGISTER` | Specifies if compression should be automatically registered. | `True` | | `COMPRESS_ALGORITHM` | Supported compression algorithms. | `['br', 'gzip', 'deflate']` | - - +| `COMPRESS_STREAMS` | Compress content streams. | `True` | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Compress-1.12/README.md new/Flask-Compress-1.13/README.md --- old/Flask-Compress-1.12/README.md 2022-04-28 14:26:34.000000000 +0200 +++ new/Flask-Compress-1.13/README.md 2022-09-21 15:04:36.000000000 +0200 @@ -114,3 +114,4 @@ | `COMPRESS_CACHE_BACKEND` | Specified the backend for storing the cached response data. | `None` | | `COMPRESS_REGISTER` | Specifies if compression should be automatically registered. | `True` | | `COMPRESS_ALGORITHM` | Supported compression algorithms. | `['br', 'gzip', 'deflate']` | +| `COMPRESS_STREAMS` | Compress content streams. | `True` | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Compress-1.12/flask_compress/_version.py new/Flask-Compress-1.13/flask_compress/_version.py --- old/Flask-Compress-1.12/flask_compress/_version.py 2022-04-28 14:26:46.000000000 +0200 +++ new/Flask-Compress-1.13/flask_compress/_version.py 2022-09-21 15:04:51.000000000 +0200 @@ -1 +1 @@ -__version__ = "1.12" +__version__ = "1.13" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Compress-1.12/flask_compress/flask_compress.py new/Flask-Compress-1.13/flask_compress/flask_compress.py --- old/Flask-Compress-1.12/flask_compress/flask_compress.py 2022-04-28 14:26:34.000000000 +0200 +++ new/Flask-Compress-1.13/flask_compress/flask_compress.py 2022-09-21 15:04:36.000000000 +0200 @@ -77,6 +77,7 @@ ('COMPRESS_CACHE_KEY', None), ('COMPRESS_CACHE_BACKEND', None), ('COMPRESS_REGISTER', True), + ('COMPRESS_STREAMS', True), ('COMPRESS_ALGORITHM', ['br', 'gzip', 'deflate']), ] @@ -178,7 +179,7 @@ response.mimetype not in app.config["COMPRESS_MIMETYPES"] or response.status_code < 200 or response.status_code >= 300 or - response.is_streamed or + (response.is_streamed and app.config["COMPRESS_STREAMS"] is False)or "Content-Encoding" in response.headers or (response.content_length is not None and response.content_length < app.config["COMPRESS_MIN_SIZE"])): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Compress-1.12/tests/test_flask_compress.py new/Flask-Compress-1.13/tests/test_flask_compress.py --- old/Flask-Compress-1.12/tests/test_flask_compress.py 2022-04-28 14:26:34.000000000 +0200 +++ new/Flask-Compress-1.13/tests/test_flask_compress.py 2022-09-21 15:04:36.000000000 +0200 @@ -51,6 +51,10 @@ """ Tests COMPRESS_BR_BLOCK default value is correctly set. """ self.assertEqual(self.app.config['COMPRESS_BR_BLOCK'], 0) + def test_stream(self): + """ Tests COMPRESS_STREAMS default value is correctly set. """ + self.assertEqual(self.app.config['COMPRESS_STREAMS'], True) + class InitTests(unittest.TestCase): def setUp(self): self.app = Flask(__name__) @@ -353,13 +357,12 @@ def setUp(self): self.app = Flask(__name__) self.app.testing = True + self.app.config["COMPRESS_STREAMS"] = False self.file_path = os.path.join(os.getcwd(), 'tests', 'templates', 'large.html') self.file_size = os.path.getsize(self.file_path) - Compress(self.app) - @self.app.route('/stream/large') def stream(): def _stream(): @@ -370,6 +373,7 @@ def test_no_compression_stream(self): """ Tests compression is skipped when response is streamed""" + Compress(self.app) client = self.app.test_client() for algorithm in ('gzip', 'deflate', 'br', ''): headers = [('Accept-Encoding', algorithm)] @@ -378,6 +382,17 @@ self.assertEqual(response.is_streamed, True) self.assertEqual(self.file_size, len(response.data)) + def test_disabled_stream(self): + """Test that stream compression can be disabled.""" + Compress(self.app) + self.app.config["COMPRESS_STREAMS"] = True + client = self.app.test_client() + for algorithm in ('gzip', 'deflate', 'br'): + headers = [('Accept-Encoding', algorithm)] + response = client.get('/stream/large', headers=headers) + self.assertIn('Content-Encoding', response.headers) + self.assertGreater(self.file_size, len(response.data)) + if __name__ == '__main__': unittest.main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Compress-1.12/tox.ini new/Flask-Compress-1.13/tox.ini --- old/Flask-Compress-1.12/tox.ini 2022-04-28 14:26:34.000000000 +0200 +++ new/Flask-Compress-1.13/tox.ini 2022-09-21 15:04:36.000000000 +0200 @@ -1,7 +1,7 @@ [tox] isolated_build = True skip_missing_interpreters = true -envlist = py27,py35,py36,py37,py38,py39,pypy2,pypy3 +envlist = py27,py35,py36,py37,py38,py39,py310,py311,pypy2,pypy3 [testenv] deps =