From 91990931e4788085fb22612c2e9d4240bbe44c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Wed, 18 Oct 2023 22:24:22 +0200 Subject: [PATCH] Sync from SUSE:ALP:Source:Standard:1.0 python-WebTest revision 27776b79946eec605649729d2454c9a0 --- .gitattributes | 23 +++ WebTest-3.0.0.tar.gz | 3 + py312.patch | 127 +++++++++++++++ python-WebTest.changes | 348 +++++++++++++++++++++++++++++++++++++++++ python-WebTest.spec | 89 +++++++++++ sphinx-7-fix.patch | 19 +++ 6 files changed, 609 insertions(+) create mode 100644 .gitattributes create mode 100644 WebTest-3.0.0.tar.gz create mode 100644 py312.patch create mode 100644 python-WebTest.changes create mode 100644 python-WebTest.spec create mode 100644 sphinx-7-fix.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/WebTest-3.0.0.tar.gz b/WebTest-3.0.0.tar.gz new file mode 100644 index 0000000..e252638 --- /dev/null +++ b/WebTest-3.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:54bd969725838d9861a9fa27f8d971f79d275d94ae255f5c501f53bb6d9929eb +size 75871 diff --git a/py312.patch b/py312.patch new file mode 100644 index 0000000..84bc639 --- /dev/null +++ b/py312.patch @@ -0,0 +1,127 @@ +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 new file mode 100644 index 0000000..a3b4343 --- /dev/null +++ b/python-WebTest.changes @@ -0,0 +1,348 @@ +------------------------------------------------------------------- +Wed Sep 20 14:48:54 UTC 2023 - Markéta Machová + +- Add py312.patch to fix build with Python 3.12 + +------------------------------------------------------------------- +Wed Jul 26 07:25:22 UTC 2023 - Bernhard Wiedemann + +- Drop sphinx doctrees for reproducible builds + +------------------------------------------------------------------- +Tue May 9 13:38:14 UTC 2023 - Johannes Kastl + +- add sle15_python_module_pythons + +------------------------------------------------------------------- +Wed May 3 11:41:12 UTC 2023 - Martin Liška + +- Do not depend on pkg_resources.get_distribution and build_sphinx + that is gone in Sphinx 7.0 (boo#1211051). +- Add sphinx-7-fix.patch patch. + +------------------------------------------------------------------- +Thu Aug 18 15:21:41 UTC 2022 - Ben Greiner + +- Clean specfile, remove coverage +- Use pytest as upstream does + +------------------------------------------------------------------- +Fri Aug 27 11:45:04 UTC 2021 - pgajdos@suse.com + +- version update to 3.0.0 + - Dropped support for Python 2.7 and 3.5. + - Added support for Python 3.9. + - Clean up dependencies and requirements. + - Switch from Travis to GitHub Actions for building and testing. + - Prevent PytestCollectionWarning for TestApp + +------------------------------------------------------------------- +Tue May 12 08:48:01 UTC 2020 - Dirk Mueller + +- update to 2.0.35: + - python3.8 compat + - Remove use of deprecated splittype and splithost + +------------------------------------------------------------------- +Sat Mar 14 15:45:00 UTC 2020 - Dirk Mueller + +- update to 2.0.34: + - Fix the test ``length == 0`` in ``check_content_type``. + - Treat ```` like ````. + - Handle query parameters for the ``head`` method. + +------------------------------------------------------------------- +Thu Feb 28 09:24:07 UTC 2019 - Tomáš Chvátal + +- Update to 2.0.33: + * Fixed #210. Allow to reset select multiple with field.value = [] + * Support for PYTHONOPTIMIZE=2, fix tests on PYTHONOPTIMIZE=1, 2 + * Fixed #196. Fix deprecation warnings for collections to use collections.abc for Iterable on Python 3. + +------------------------------------------------------------------- +Thu Feb 7 16:14:39 UTC 2019 - Hans-Peter Jansen + +- Update to 2.0.32 (2018-10-05) + + remove invalid email from setup.py + +- Update to 2.0.31 (2018-10-05) + + py33 is no longer supported. It may works but has been removed + from tox config + + Fixed #205: Use empty string as default value for submit and + button + + tests use pytest + + docs use the standard Pylons template on RTD + +- Update to 2.0.30 (2018-06-23) + + Add Email class for input fields with type "email". + + Documentation bearer token and JWT authorization + +- Update to 2.0.29 (2017-10-21) + + Bugfix: Preserve submit order for radio inputs. + + Fixed #186: avoid UnicodeDecodeError in linter with py2 when a + header contain non ascii chars + +------------------------------------------------------------------- +Tue Dec 4 12:56:01 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Fri Aug 10 11:02:46 UTC 2018 - tchvatal@suse.com + +- Drop not needed unittest2 dependency + +------------------------------------------------------------------- +Tue Aug 15 16:23:29 UTC 2017 - toddrme2178@gmail.com + +- Update to 2.0.28 + * Fixed #185: Fix strict cookie policy + * Fixed #146: Improve fields value checking when enctype is + multipart + * Fixed #119: Assertion error should be raised when you have + non-string response header + * Bugfix: Allow to set an int value to form fields when enctype + is multipart + * Added py36 to tox.ini / .travis.yaml + +------------------------------------------------------------------- +Wed May 3 16:31:46 UTC 2017 - toddrme2178@gmail.com + +- Update to 2.0.27 + * Bugfix: Allow to use set_cookie when HTTP_HOST is set + * Fix #177: resp.json now always decode body as utf8 +- Update to 2.0.26 + * Added JWT auth support + * Always show response body when response status is invalid +- Update to 2.0.25 + * Fix #173: Do not omit file uploads without a file from post. +- Update to 2.0.24 + * Drop python 2.6 support. Newer versions may still work if you + use waitress < 1.0 + * Remove bs4 warnings + * Docs improvments + * Tets are WebOb 1.7.x compatible +- Implement singlespec version +- Fix source URL. + +------------------------------------------------------------------- +Thu Sep 1 10:15:53 UTC 2016 - tbechtold@suse.com + +- update 2.0.23: + - Create universal wheels. + - Fix #160: Do not guess encoding if response's charset is set. + - PR #154 Allow Bearer auth + - PR #147,#148 Take care of REFERER when using form.submit(), .click() and + .clickbutton() + - PR #145 Allow to override content-type when using json methods + - nothing new release. just try to make wheel available on pypi + - fixed #131 prevent passing HTML parameters that conflict with Field kwargs + - fixed #135 Document that WSGIProxy2 is required for "using webtest with a real url" + - fixed #136 reset values of select multiple + - drop py32 support (still work but test dependencies fail) +- Use tar.gz instead of zip archive +- Use pypi.io as Source url + +------------------------------------------------------------------- +Sun Mar 13 21:01:30 UTC 2016 - dmueller@suse.com + +- adding license + +------------------------------------------------------------------- +Thu May 14 13:59:46 UTC 2015 - benoit.monin@gmx.fr + +- update to version 2.0.18: + * Avoid deprecation warning with py3.4 +- additional changes from version 2.0.17: + * Properly check for default cookiejar arguments [Julian Berman] + * Avoid raising encoding errors from debugapp (needed to use with + WSGIProxy2) [Laurence Rowe] +- additional changes from version 2.0.16: + * Fixed #110. Forced values for Radio inputs are no longer + ignored by value property on get. [bayprogrammer] + * Added method TestApp.set_parser_features to change the + parser_features used by BeautifulSoup. [tomasmoreyra] + * Added app.set_cookie [luhn] +- additional changes from version 2.0.15: + * Fixed #73. Python < 2.6.5 does not support unicode as keyword + arguments names. [Stepan Kolesnik] + * Fixed #84 Application cookies for localhost are no longer + ignored [gawel] + * Fixed #89 remove WSGIWarning: You are not supposed to send a + body in a DELETE request because we now have a good reason for + that. See http://bit.ly/1tb3yxW [gawel] + * Fixed #92 You can now override TestApp.JSONEncoder to use a + custom encoder [gawel] + * Fixed #93 Support basic authentication [gawel] + * Fixed #103 Broken "Edit me on GitHub" links in documentation + [gawel] + * Fixed #106 Make wrapping the app in the lint middleware + optional [dmlayton] + * Fixed #107 Explicit error message when WSGIProxy2 is not + installer [gawel] + * Fixed #108 cgi.parse_qsl is pending deprecation [gawel] +- additional changes from version 2.0.14: + * Allow .select() on s. [Markus + Bertheau] +- additional changes from version 2.0.13: + * Allow selecting