* [gentoo-commits] repo/gentoo:master commit in: dev-python/webtest/files/, dev-python/webtest/
@ 2019-11-22 21:46 Patrick McLean
0 siblings, 0 replies; 2+ messages in thread
From: Patrick McLean @ 2019-11-22 21:46 UTC (permalink / raw
To: gentoo-commits
commit: e1762668f2a4524e16f5026db167b9b5af03645f
Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Fri Nov 22 21:46:04 2019 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Nov 22 21:46:38 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1762668
dev-python/webtest: Version bump to 2.0.33
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
dev-python/webtest/Manifest | 1 +
.../files/webtest-2.0.33-no-pylons-theme.patch | 51 ++++++++++++++
dev-python/webtest/webtest-2.0.33.ebuild | 79 ++++++++++++++++++++++
3 files changed, 131 insertions(+)
diff --git a/dev-python/webtest/Manifest b/dev-python/webtest/Manifest
index 87d4771de37..4ac12673163 100644
--- a/dev-python/webtest/Manifest
+++ b/dev-python/webtest/Manifest
@@ -1,2 +1,3 @@
DIST WebTest-2.0.21.tar.gz 66866 BLAKE2B d2830fcce7fb4b91029838806952e3e9c6916c3b292c7142138f30486d936b4a1f0c2d28a5973b0c351c64e499f343f3711296c6e37c38548e3a81b108163a17 SHA512 21f58ee9192fd0eb0eb2d88179ffc015aa5cf04c8004db251bd65d13d54c34b9e6b5fc9fdd8e9fcbbc18fcfb2be714c0691b2ef034318861262f8705b4a44610
DIST WebTest-2.0.29.tar.gz 74620 BLAKE2B 7fc68f1178b1abb0a0f126112b846853762ad78cb060718bc340f5ba17517180b7283f384503ff77a2c7396645ebe2d5528dbc0f027c5d44beb002c4204bf894 SHA512 319700d1444f6a681f8ed8a4ee8661ba0462b3f4bfeb7510232f58be92e017066da3bac494ebe1a3c5b9f2d06c025e08e6193277e13c6113e9485108d4ccd2d2
+DIST WebTest-2.0.33.tar.gz 76081 BLAKE2B 6c06d7cf6573282342ac190fe2365d041679fd9a75571a525cf0214f22a0631d5f97e94261090d9c2a372f77b005d22be5976f612c27c6b4c832c71469b33ee8 SHA512 9f5c614f8215837dc5cecc9c3e844c5e1678eb8275f9e27a0ec6a68648e9f4f09155aa72f6c731c34028b8671b7776a94235f3e54d7dbf5ff55de94840171ca8
diff --git a/dev-python/webtest/files/webtest-2.0.33-no-pylons-theme.patch b/dev-python/webtest/files/webtest-2.0.33-no-pylons-theme.patch
new file mode 100644
index 00000000000..3fe4fe3770e
--- /dev/null
+++ b/dev-python/webtest/files/webtest-2.0.33-no-pylons-theme.patch
@@ -0,0 +1,51 @@
+diff --git a/docs/conf.py b/docs/conf.py
+index 96746bf..2445d35 100644
+--- a/docs/conf.py
++++ b/docs/conf.py
+@@ -13,7 +13,7 @@
+
+ import sys, os
+ import datetime
+-import pylons_sphinx_themes
++#import pylons_sphinx_themes
+
+ # If extensions (or modules to document with autodoc) are in another directory,
+ # add these directories to sys.path here. If the directory is relative to the
+@@ -102,11 +102,11 @@ pygments_style = 'sphinx'
+
+ # The theme to use for HTML and HTML Help pages. See the documentation for
+ # a list of builtin themes.
+-html_theme = 'pylons'
+-html_theme_path = pylons_sphinx_themes.get_html_themes_path()
+-html_theme_options = dict(
+- github_url='https://github.com/Pylons/webtest',
+- )
++#html_theme = 'pylons'
++#html_theme_path = pylons_sphinx_themes.get_html_themes_path()
++#html_theme_options = dict(
++# github_url='https://github.com/Pylons/webtest',
++# )
+ # Theme options are theme-specific and customize the look and feel of a theme
+ # further. For a list of options available for each theme, see the
+ # documentation.
+@@ -180,13 +180,13 @@ smartquotes = False
+ htmlhelp_basename = 'WebTestdoc'
+
+ # Control display of sidebars
+-html_sidebars = { '**': [
+- 'localtoc.html',
+- 'ethicalads.html',
+- 'relations.html',
+- 'sourcelink.html',
+- 'searchbox.html',
+-] }
++#html_sidebars = { '**': [
++# 'localtoc.html',
++# 'ethicalads.html',
++# 'relations.html',
++# 'sourcelink.html',
++# 'searchbox.html',
++#] }
+
+ # -- Options for LaTeX output --------------------------------------------------
+
diff --git a/dev-python/webtest/webtest-2.0.33.ebuild b/dev-python/webtest/webtest-2.0.33.ebuild
new file mode 100644
index 00000000000..f7c319ecf35
--- /dev/null
+++ b/dev-python/webtest/webtest-2.0.33.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
+
+inherit distutils-r1
+
+MY_PN="WebTest"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Helper to test WSGI applications"
+HOMEPAGE="https://pypi.org/project/WebTest/"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="doc test"
+
+# nose<1.3.0 appears a leftover never updated in requires.txt. tests pass fine with latest
+RDEPEND="
+ dev-python/six[${PYTHON_USEDEP}]
+ >=dev-python/webob-1.2[${PYTHON_USEDEP}]
+ >=dev-python/waitress-0.8.5[${PYTHON_USEDEP}]
+ dev-python/beautifulsoup:4[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ doc? ( $(python_gen_any_dep '
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ ')
+ )
+ test? ( dev-python/nose[${PYTHON_USEDEP}]
+ dev-python/pyquery[${PYTHON_USEDEP}]
+ dev-python/pastedeploy[${PYTHON_USEDEP}]
+ dev-python/wsgiproxy2[${PYTHON_USEDEP}]
+ dev-python/coverage[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7 )
+ )"
+
+S="${WORKDIR}/${MY_P}"
+
+# Makes testing easier; otherwise we get errors from pkg_resources.
+#DISTUTILS_IN_SOURCE_BUILD=1
+PATCHES=(
+ "${FILESDIR}/webtest-2.0.33-no-pylons-theme.patch"
+)
+
+python_check_deps() {
+ use doc || return 0
+ has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
+}
+
+python_prepare_all() {
+ # Prevent un-needed d'loading during doc build
+ sed -i -e 's:^intersphinx_mapping:disabled_&: ; s:^templates_path:#&:' \
+ docs/conf.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ if use doc; then
+ sphinx-build docs html || die
+ fi
+}
+
+python_test() {
+ distutils_install_for_testing
+ # Tests raise ImportErrors with our default PYTHONPATH.
+ local -x PYTHONPATH=
+ nosetests -v || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( html/. )
+ distutils-r1_python_install_all
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/webtest/files/, dev-python/webtest/
@ 2023-05-29 15:04 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2023-05-29 15:04 UTC (permalink / raw
To: gentoo-commits
commit: 4e53837fea3abb80950d3d31abe7ba6ab57c5ee4
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May 29 14:56:14 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 29 15:04:42 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e53837f
dev-python/webtest: add py3.12 patch, no py3.12 yet though b/c pyquery
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/webtest-3.0.0-python3.12-unittest.patch | 115 +++++++++++++++++++++
dev-python/webtest/webtest-3.0.0-r1.ebuild | 4 +-
2 files changed, 118 insertions(+), 1 deletion(-)
diff --git a/dev-python/webtest/files/webtest-3.0.0-python3.12-unittest.patch b/dev-python/webtest/files/webtest-3.0.0-python3.12-unittest.patch
new file mode 100644
index 000000000000..c797a8cbb0c9
--- /dev/null
+++ b/dev-python/webtest/files/webtest-3.0.0-python3.12-unittest.patch
@@ -0,0 +1,115 @@
+https://github.com/Pylons/webtest/pull/251
+
+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.
+--- 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'])
+--- 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')
+--- 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))
+ )
+--- 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/dev-python/webtest/webtest-3.0.0-r1.ebuild b/dev-python/webtest/webtest-3.0.0-r1.ebuild
index 8e4a5a67c8eb..55be134cdd50 100644
--- a/dev-python/webtest/webtest-3.0.0-r1.ebuild
+++ b/dev-python/webtest/webtest-3.0.0-r1.ebuild
@@ -6,7 +6,8 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYPI_NO_NORMALIZE=1
PYPI_PN="WebTest"
-PYTHON_COMPAT=( python3_{9..11} pypy3 )
+# py3.12 should pass but pyquery doesn't yet support 3.12
+PYTHON_COMPAT=( python3_{10..11} pypy3 )
inherit distutils-r1 pypi
@@ -37,6 +38,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/webtest-2.0.33-no-pylons-theme.patch"
+ "${FILESDIR}/webtest-3.0.0-python3.12-unittest.patch"
)
distutils_enable_sphinx docs
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-29 15:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-22 21:46 [gentoo-commits] repo/gentoo:master commit in: dev-python/webtest/files/, dev-python/webtest/ Patrick McLean
-- strict thread matches above, loose matches on Subject: below --
2023-05-29 15:04 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox