11 Commits

Author SHA256 Message Date
3148ee1b1d Accepting request 1290717 from devel:languages:python
- update to 3.0.4:
  * Ensure BeautifulSoup 4.13+ compatibility

OBS-URL: https://build.opensuse.org/request/show/1290717
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-WebTest?expand=0&rev=40
2025-07-06 15:04:07 +00:00
bcd6eecb30 - update to 3.0.4:
* Ensure BeautifulSoup 4.13+ compatibility

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-WebTest?expand=0&rev=72
2025-07-04 16:27:04 +00:00
a722ef9a2e Accepting request 1285281 from devel:languages:python
- Switch to pyproject macros.

OBS-URL: https://build.opensuse.org/request/show/1285281
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-WebTest?expand=0&rev=39
2025-06-13 16:43:20 +00:00
d8b15de456 - Switch to pyproject macros.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-WebTest?expand=0&rev=70
2025-06-13 02:56:31 +00:00
c571a8284f Accepting request 1240750 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1240750
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-WebTest?expand=0&rev=38
2025-01-29 15:09:47 +00:00
ffd5fadac8 Accepting request 1240524 from home:glaubitz:branches:devel:languages:python
- Update to 3.0.3
  * Minor release to fix metadata on pypi

OBS-URL: https://build.opensuse.org/request/show/1240524
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-WebTest?expand=0&rev=68
2025-01-28 10:10:44 +00:00
48308f506e Accepting request 1236169 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1236169
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-WebTest?expand=0&rev=37
2025-01-12 10:10:16 +00:00
6cbc950c87 Accepting request 1236130 from home:glaubitz:branches:devel:languages:python
- Update to 3.0.2
  * Bump waitress min version to 3.0.2
- Update BuildRequires from setup.py

OBS-URL: https://build.opensuse.org/request/show/1236130
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-WebTest?expand=0&rev=66
2025-01-09 12:19:19 +00:00
d7b8171d66 Accepting request 1222460 from devel:languages:python
- 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
- drop py312.patch: upstream

OBS-URL: https://build.opensuse.org/request/show/1222460
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-WebTest?expand=0&rev=36
2024-11-08 10:55:52 +00:00
c0cb82f348 - drop py312.patch: upstream
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-WebTest?expand=0&rev=64
2024-11-07 13:20:03 +00:00
38fa3bd32f Accepting request 1222191 from home:glaubitz:branches:devel:languages:python
- 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

OBS-URL: https://build.opensuse.org/request/show/1222191
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-WebTest?expand=0&rev=63
2024-11-07 13:19:34 +00:00
6 changed files with 57 additions and 148 deletions

Binary file not shown.

View File

@@ -1,127 +0,0 @@
From d82ec5bd2cf3c7109a1d49ad9fa802ae1eae1763 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
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):

View File

@@ -1,3 +1,41 @@
-------------------------------------------------------------------
Fri Jul 4 16:26:57 UTC 2025 - Dirk Müller <dmueller@suse.com>
- update to 3.0.4:
* Ensure BeautifulSoup 4.13+ compatibility
-------------------------------------------------------------------
Fri Jun 13 02:42:45 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Switch to pyproject macros.
-------------------------------------------------------------------
Mon Jan 27 12:27:49 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 3.0.3
* Minor release to fix metadata on pypi
-------------------------------------------------------------------
Thu Jan 9 09:30:48 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 3.0.2
* Bump waitress min version to 3.0.2
- Update BuildRequires from setup.py
-------------------------------------------------------------------
Thu Nov 7 12:40:50 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- 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
- drop py312.patch: upstream
-------------------------------------------------------------------
Thu Feb 1 17:24:01 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-WebTest
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,25 +18,24 @@
%{?sle15_python_module_pythons}
Name: python-WebTest
Version: 3.0.0
Version: 3.0.4
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}
BuildRequires: %{python_module beautifulsoup4}
BuildRequires: %{python_module cssselect}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pyquery}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module waitress >= 0.8.5}
BuildRequires: %{python_module waitress >= 3.0.2}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# Documentation build requirements:
@@ -69,14 +68,14 @@ 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
%pyproject_wheel
sphinx-build -b html docs build/sphinx/html && rm -r build/sphinx/html/.{buildinfo,doctrees}
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
@@ -86,7 +85,7 @@ sphinx-build -b html docs build/sphinx/html && rm -r build/sphinx/html/.{buildin
%license license.rst
%doc CHANGELOG.rst README.rst
%{python_sitelib}/webtest/
%{python_sitelib}/WebTest-%{version}*-info
%{python_sitelib}/[Ww]eb[Tt]est-%{version}.dist-info
%files -n %{name}-doc
%doc build/sphinx/html

View File

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

3
webtest-3.0.4.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:94778d19a37e5abd7388dad4d93874410ecced53a1739a8e5ff2dbcba1cfc0c4
size 79395