This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch db/8500
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 94c8f537621bdc14bc54d901ea3127df3072309b
Author: Dave Brondsema <[email protected]>
AuthorDate: Thu Feb 16 15:45:12 2023 -0500

    [#8500] upgrade webob
---
 Allura/allura/lib/utils.py                   | 2 +-
 Allura/allura/tests/model/test_filesystem.py | 9 +++------
 requirements.txt                             | 2 +-
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/Allura/allura/lib/utils.py b/Allura/allura/lib/utils.py
index 6dca2dc8b..33f4b9e83 100644
--- a/Allura/allura/lib/utils.py
+++ b/Allura/allura/lib/utils.py
@@ -519,7 +519,7 @@ def serve_file(fp, filename, content_type, 
last_modified=None,
                cache_expires=None, size=None, embed=True, etag=None):
     '''Sets the response headers and serves as a wsgi iter'''
     if not etag and filename and last_modified:
-        etag = f'{filename}?{last_modified}'.encode()
+        etag = f'{filename}?{last_modified}'
     if etag:
         etag_cache(etag)
     tg.response.headers['Content-Type'] = ''
diff --git a/Allura/allura/tests/model/test_filesystem.py 
b/Allura/allura/tests/model/test_filesystem.py
index 58365a65d..5d2c11580 100644
--- a/Allura/allura/tests/model/test_filesystem.py
+++ b/Allura/allura/tests/model/test_filesystem.py
@@ -130,8 +130,7 @@ class TestFile(TestCase):
                 patch('allura.lib.utils.tg.response', Response()) as response, 
\
                 patch('allura.lib.utils.etag_cache') as etag_cache:
             response_body = list(f.serve())
-            etag_cache.assert_called_once_with('{}?{}'.format(f.filename,
-                                                               
f._id.generation_time).encode('utf-8'))
+            etag_cache.assert_called_once_with('{}?{}'.format(f.filename, 
f._id.generation_time))
             assert [b'test1'] == response_body
             assert response.content_type == f.content_type
             assert 'Content-Disposition' not in response.headers
@@ -143,12 +142,10 @@ class TestFile(TestCase):
                 patch('allura.lib.utils.tg.response', Response()) as response, 
\
                 patch('allura.lib.utils.etag_cache') as etag_cache:
             response_body = list(f.serve(embed=False))
-            etag_cache.assert_called_once_with('{}?{}'.format(f.filename,
-                                                               
f._id.generation_time).encode('utf-8'))
+            etag_cache.assert_called_once_with('{}?{}'.format(f.filename, 
f._id.generation_time))
             assert [b'test1'] == response_body
             assert response.content_type == f.content_type
-            assert (response.headers['Content-Disposition'] ==
-                         'attachment;filename="te%20s%E0%AD%AE1.txt"')
+            assert response.headers['Content-Disposition'] == 
'attachment;filename="te%20s%E0%AD%AE1.txt"'
 
     def test_image(self):
         path = os.path.join(
diff --git a/requirements.txt b/requirements.txt
index 21b2be39b..67d409b0d 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -232,7 +232,7 @@ webencodings==0.5.1
     #   tinycss2
 webhelpers2==2.0
     # via -r requirements.in
-webob==1.7.4
+webob==1.8.7
     # via
     #   -r requirements.in
     #   easywidgets

Reply via email to