diff --git a/WebTest-3.0.0.tar.gz b/WebTest-3.0.0.tar.gz deleted file mode 100644 index 976a1ef..0000000 --- a/WebTest-3.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:54bd969725838d9861a9fa27f8d971f79d275d94ae255f5c501f53bb6d9929eb -size 75871 diff --git a/py312.patch b/py312.patch deleted file mode 100644 index f794cbd..0000000 --- a/py312.patch +++ /dev/null @@ -1,127 +0,0 @@ -From d82ec5bd2cf3c7109a1d49ad9fa802ae1eae1763 Mon Sep 17 00:00:00 2001 -From: Sam James -Date: Mon, 29 May 2023 15:54:28 +0100 -Subject: [PATCH] Replace deprecated unittest aliases for Python 3.12 - -See https://docs.python.org/3.12/whatsnew/3.12.html#removed. ---- - tests/test_app.py | 4 ++-- - tests/test_authorisation.py | 6 +++--- - tests/test_forms.py | 2 +- - tests/test_lint.py | 12 ++++++------ - 4 files changed, 12 insertions(+), 12 deletions(-) - -diff --git a/tests/test_app.py b/tests/test_app.py -index 4bc8298..9636b75 100644 ---- a/tests/test_app.py -+++ b/tests/test_app.py -@@ -221,7 +221,7 @@ def cookie_app(environ, start_response): - ('Set-Cookie', 'foo=bar;baz'), - ]) - else: -- self.assertEquals(dict(req.cookies), -+ self.assertEqual(dict(req.cookies), - {'spam': 'eggs', 'foo': 'bar'}) - self.assertIn('foo=bar', environ['HTTP_COOKIE']) - self.assertIn('spam=eggs', environ['HTTP_COOKIE']) -@@ -258,7 +258,7 @@ def cookie_app(environ, start_response): - ('Set-Cookie', 'foo=bar;baz; secure'), - ]) - else: -- self.assertEquals(dict(req.cookies), -+ self.assertEqual(dict(req.cookies), - {'spam': 'eggs', 'foo': 'bar'}) - self.assertIn('foo=bar', environ['HTTP_COOKIE']) - self.assertIn('spam=eggs', environ['HTTP_COOKIE']) -diff --git a/tests/test_authorisation.py b/tests/test_authorisation.py -index 861b6e6..94213d0 100644 ---- a/tests/test_authorisation.py -+++ b/tests/test_authorisation.py -@@ -17,7 +17,7 @@ def test_basic_authorization(self): - app.authorization = authorization - - self.assertIn('HTTP_AUTHORIZATION', app.extra_environ) -- self.assertEquals(app.authorization, authorization) -+ self.assertEqual(app.authorization, authorization) - - resp = app.get('/') - resp.mustcontain('HTTP_AUTHORIZATION: Basic Z2F3ZWw6cGFzc3dk') -@@ -26,7 +26,7 @@ def test_basic_authorization(self): - authtype, value = header.split(' ') - auth = (authtype, - b64decode(to_bytes(value)).decode('latin1').split(':')) -- self.assertEquals(authorization, auth) -+ self.assertEqual(authorization, auth) - - app.authorization = None - self.assertNotIn('HTTP_AUTHORIZATION', app.extra_environ) -@@ -37,7 +37,7 @@ def test_bearer_authorization(self): - app.authorization = authorization - - self.assertIn('HTTP_AUTHORIZATION', app.extra_environ) -- self.assertEquals(app.authorization, authorization) -+ self.assertEqual(app.authorization, authorization) - - resp = app.get('/') - resp.mustcontain('HTTP_AUTHORIZATION: Bearer 2588409761fcfa3e378bff4fb766e2e2') -diff --git a/tests/test_forms.py b/tests/test_forms.py -index f8bd39d..0348d0e 100644 ---- a/tests/test_forms.py -+++ b/tests/test_forms.py -@@ -1031,7 +1031,7 @@ def test_upload_invalid_content(self): - single_form.submit("button") - except ValueError: - e = sys.exc_info()[1] -- self.assertEquals( -+ self.assertEqual( - str(e), - u('File content must be %s not %s' % (bytes, int)) - ) -diff --git a/tests/test_lint.py b/tests/test_lint.py -index ae6b8ae..0a2153d 100644 ---- a/tests/test_lint.py -+++ b/tests/test_lint.py -@@ -62,15 +62,15 @@ class TestMiddleware(unittest.TestCase): - @unittest.skipIf(sys.flags.optimize > 0, "skip assert tests if optimize is enabled") - def test_lint_too_few_args(self): - linter = middleware(application) -- with self.assertRaisesRegexp(AssertionError, "Two arguments required"): -+ with self.assertRaisesRegex(AssertionError, "Two arguments required"): - linter() -- with self.assertRaisesRegexp(AssertionError, "Two arguments required"): -+ with self.assertRaisesRegex(AssertionError, "Two arguments required"): - linter({}) - - @unittest.skipIf(sys.flags.optimize > 0, "skip assert tests if optimize is enabled") - def test_lint_no_keyword_args(self): - linter = middleware(application) -- with self.assertRaisesRegexp(AssertionError, "No keyword arguments " -+ with self.assertRaisesRegex(AssertionError, "No keyword arguments " - "allowed"): - linter({}, 'foo', baz='baz') - -@@ -82,7 +82,7 @@ def test_lint_no_keyword_args(self): - def test_lint_iterator_returned(self): - linter = middleware(lambda x, y: None) # None is not an iterator - msg = "The application must return an iterator, if only an empty list" -- with self.assertRaisesRegexp(AssertionError, msg): -+ with self.assertRaisesRegex(AssertionError, msg): - linter({'wsgi.input': 'foo', 'wsgi.errors': 'foo'}, 'foo') - - -@@ -109,13 +109,13 @@ def test_close(self): - def test_iter(self): - data = to_bytes("A line\nAnother line\nA final line\n") - input_wrapper = InputWrapper(BytesIO(data)) -- self.assertEquals(to_bytes("").join(input_wrapper), data, '') -+ self.assertEqual(to_bytes("").join(input_wrapper), data, '') - - def test_seek(self): - data = to_bytes("A line\nAnother line\nA final line\n") - input_wrapper = InputWrapper(BytesIO(data)) - input_wrapper.seek(0) -- self.assertEquals(to_bytes("").join(input_wrapper), data, '') -+ self.assertEqual(to_bytes("").join(input_wrapper), data, '') - - - class TestMiddleware2(unittest.TestCase): diff --git a/python-WebTest.changes b/python-WebTest.changes index fb51f33..951a4ae 100644 --- a/python-WebTest.changes +++ b/python-WebTest.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu Nov 7 12:40:50 UTC 2024 - John Paul Adrian Glaubitz + +- Update to 3.0.1 + * Multiple file input support. + * Drop support for Python 3.8 and bellow + * Allows the TestResponse to follow customised onclick buttons + * Response.pyquery object now use the html parser. + * You can use the Response.PyQuery method to customize pyquery init. + * Various docs / testing improvments + * Rename "master" git branch to "main". +- Refresh sphinx-7-fix.patch + ------------------------------------------------------------------- Thu Feb 1 17:24:01 UTC 2024 - Dirk Müller diff --git a/python-WebTest.spec b/python-WebTest.spec index 494ed67..d3d82a2 100644 --- a/python-WebTest.spec +++ b/python-WebTest.spec @@ -18,16 +18,14 @@ %{?sle15_python_module_pythons} Name: python-WebTest -Version: 3.0.0 +Version: 3.0.1 Release: 0 Summary: Helper to test WSGI applications License: MIT Group: Development/Languages/Python URL: https://docs.pylonsproject.org/projects/webtest/ -Source: https://files.pythonhosted.org/packages/source/W/WebTest/WebTest-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/source/w/webtest/webtest-%{version}.tar.gz Patch0: sphinx-7-fix.patch -# PATCH-FIX-UPSTREAM https://github.com/Pylons/webtest/commit/d82ec5bd2cf3c7109a1d49ad9fa802ae1eae1763 Replace deprecated unittest aliases for Python 3.12 -Patch1: py312.patch BuildRequires: %{python_module PasteDeploy} BuildRequires: %{python_module WSGIProxy2} BuildRequires: %{python_module WebOb >= 1.2} @@ -69,7 +67,7 @@ Provides: %{python_module WebTest-doc = %{version}} This package contains documentation files for %{name}. %prep -%autosetup -p1 -n WebTest-%{version} +%autosetup -p1 -n webtest-%{version} %build %python_build diff --git a/sphinx-7-fix.patch b/sphinx-7-fix.patch index cb1d9af..88696c3 100644 --- a/sphinx-7-fix.patch +++ b/sphinx-7-fix.patch @@ -1,13 +1,12 @@ -diff --git a/docs/conf.py b/docs/conf.py -index 96746bf..fed362e 100644 ---- a/docs/conf.py -+++ b/docs/conf.py -@@ -59,9 +59,11 @@ copyright = '2012-%s, Ian Bicking' % thisyear +diff -Nru webtest-3.0.1.orig/docs/conf.py webtest-3.0.1/docs/conf.py +--- webtest-3.0.1.orig/docs/conf.py 2024-08-30 08:15:19.000000000 +0000 ++++ webtest-3.0.1/docs/conf.py 2024-11-07 12:39:25.092026893 +0000 +@@ -59,9 +59,11 @@ # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. --import pkg_resources --version = pkg_resources.get_distribution(project).version +-import importlib.metadata +-version = importlib.metadata.version(project) -release = version +import pathlib +lines = (pathlib.Path(__file__).parent.parent / 'PKG-INFO').open().readlines() diff --git a/webtest-3.0.1.tar.gz b/webtest-3.0.1.tar.gz new file mode 100644 index 0000000..f1d2055 --- /dev/null +++ b/webtest-3.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:493b5c802f8948a65b5e3a1ad5b2524ee5e1ab60cd713d9a3da3b8da082c06fe +size 79278