public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/httpbin/files/, dev-python/httpbin/
@ 2019-11-22 16:21 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2019-11-22 16:21 UTC (permalink / raw
  To: gentoo-commits

commit:     ac751645b3013c63a4778351144538e0edcde9e7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 22 14:22:10 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Nov 22 16:21:03 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac751645

dev-python/httpbin: Bump to 0.7.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/httpbin/Manifest                        |  1 +
 .../files/httpbin-0.7.0-optional-raven.patch       | 19 +++++++++++
 .../files/httpbin-0.7.0-test-werkzeug.patch        | 19 +++++++++++
 dev-python/httpbin/httpbin-0.7.0.ebuild            | 38 ++++++++++++++++++++++
 4 files changed, 77 insertions(+)

diff --git a/dev-python/httpbin/Manifest b/dev-python/httpbin/Manifest
index 641be18430e..745d07f7e87 100644
--- a/dev-python/httpbin/Manifest
+++ b/dev-python/httpbin/Manifest
@@ -1 +1,2 @@
 DIST httpbin-0.4.1.tar.gz 88101 BLAKE2B 3df333ba92d50e065a598b2dc51ff3355eb94eb4b3a3094ba79cbe95fc11424e05f187e434ac299023dfbfd790b32db070a37e08a962ac19d803de4405603bb8 SHA512 feb519ee909c5115971f4bfd488ec0f9e987cd473464721f4e343e09b9d8fc592cf48b50ff3a2960bb67310521d865091cd766ed351ebfaa2dc8193115e9f052
+DIST httpbin-0.7.0.tar.gz 92613 BLAKE2B 59252df1d4d0ef853ec65263b472d3ba6c597336d844f9b457f2d0a009048d4222f715a7f6fb120aca00fa641d1687e302036dc151bd2fd67ba98cf5fc47a63a SHA512 82e80058b58943637e9f8191764cea79bf7a6e40f36069f9b5d3f908585dbef20a03ef070d1f865d350920b6e874a93a48a544b05c14ff4911038ec2c20f6f63

diff --git a/dev-python/httpbin/files/httpbin-0.7.0-optional-raven.patch b/dev-python/httpbin/files/httpbin-0.7.0-optional-raven.patch
new file mode 100644
index 00000000000..8602ed7641b
--- /dev/null
+++ b/dev-python/httpbin/files/httpbin-0.7.0-optional-raven.patch
@@ -0,0 +1,19 @@
+diff -dupr a/httpbin/core.py b/httpbin/core.py
+--- a/httpbin/core.py	2018-05-08 13:41:03.000000000 +0200
++++ b/httpbin/core.py	2019-11-22 15:07:27.516500217 +0100
+@@ -21,7 +21,6 @@ from werkzeug.datastructures import WWWA
+ from werkzeug.http import http_date
+ from werkzeug.wrappers import BaseResponse
+ from werkzeug.http import parse_authorization_header
+-from raven.contrib.flask import Sentry
+ 
+ from . import filters
+ from .helpers import get_headers, status_code, get_dict, get_request_range, check_basic_auth, check_digest_auth, \
+@@ -58,6 +57,7 @@ app.debug = bool(os.environ.get('DEBUG')
+ 
+ # Send app errors to Sentry.
+ if 'SENTRY_DSN' in os.environ:
++    from raven.contrib.flask import Sentry
+     sentry = Sentry(app, dsn=os.environ['SENTRY_DSN'])
+ 
+ # Set up Bugsnag exception tracking, if desired. To use Bugsnag, install the

diff --git a/dev-python/httpbin/files/httpbin-0.7.0-test-werkzeug.patch b/dev-python/httpbin/files/httpbin-0.7.0-test-werkzeug.patch
new file mode 100644
index 00000000000..956a2f5235c
--- /dev/null
+++ b/dev-python/httpbin/files/httpbin-0.7.0-test-werkzeug.patch
@@ -0,0 +1,19 @@
+diff -dupr a/test_httpbin.py b/test_httpbin.py
+--- a/test_httpbin.py	2019-11-22 15:06:56.199774070 +0100
++++ b/test_httpbin.py	2019-11-22 15:18:58.010069445 +0100
+@@ -144,7 +144,6 @@ class HttpbinTestCase(unittest.TestCase)
+         data = json.loads(response.data.decode('utf-8'))
+         self.assertEqual(data['args'], {})
+         self.assertEqual(data['headers']['Host'], 'localhost')
+-        self.assertEqual(data['headers']['Content-Length'], '0')
+         self.assertEqual(data['headers']['User-Agent'], 'test')
+         # self.assertEqual(data['origin'], None)
+         self.assertEqual(data['url'], 'http://localhost/get')
+@@ -158,7 +157,6 @@ class HttpbinTestCase(unittest.TestCase)
+         data = json.loads(response.data.decode('utf-8'))
+         self.assertEqual(data['args'], {})
+         self.assertEqual(data['headers']['Host'], 'localhost')
+-        self.assertEqual(data['headers']['Content-Length'], '0')
+         self.assertEqual(data['url'], 'http://localhost/anything/foo/bar')
+         self.assertEqual(data['method'], 'GET')
+         self.assertTrue(response.data.endswith(b'\n'))

diff --git a/dev-python/httpbin/httpbin-0.7.0.ebuild b/dev-python/httpbin/httpbin-0.7.0.ebuild
new file mode 100644
index 00000000000..c375374aa03
--- /dev/null
+++ b/dev-python/httpbin/httpbin-0.7.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="HTTP Request and Response Service"
+HOMEPAGE="https://github.com/postmanlabs/httpbin
+	https://pypi.org/project/httpbin/"
+SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+	dev-python/brotlipy[${PYTHON_USEDEP}]
+	dev-python/decorator[${PYTHON_USEDEP}]
+	dev-python/flask[${PYTHON_USEDEP}]
+	dev-python/itsdangerous[${PYTHON_USEDEP}]
+	dev-python/markupsafe[${PYTHON_USEDEP}]
+	dev-python/six[${PYTHON_USEDEP}]
+	>=dev-python/werkzeug-0.14.1[${PYTHON_USEDEP}]"
+BDEPEND="
+	dev-python/setuptools[${PYTHON_USEDEP}]"
+
+PATCHES=(
+	# do not import raven if it's not going to be used
+	# (upstream removed it completely in git anyway)
+	"${FILESDIR}"/httpbin-0.7.0-optional-raven.patch
+	# fix tests with new versions of werkzeug
+	"${FILESDIR}"/httpbin-0.7.0-test-werkzeug.patch
+)
+
+distutils_enable_tests unittest


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/httpbin/files/, dev-python/httpbin/
@ 2022-04-07  9:14 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2022-04-07  9:14 UTC (permalink / raw
  To: gentoo-commits

commit:     bce18f25da9def0bc03a6c5a354c85c3badd6e4f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  7 09:09:55 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Apr  7 09:12:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bce18f25

dev-python/httpbin: Fix compat with werkzeug-2.1

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../httpbin/files/httpbin-0.7.0-werkzeug-2.1.patch | 32 ++++++++++++++++++++++
 dev-python/httpbin/httpbin-0.7.0-r4.ebuild         |  9 ++++--
 ...bin-0.7.0-r4.ebuild => httpbin-0.7.0-r5.ebuild} | 20 +++++++++-----
 3 files changed, 51 insertions(+), 10 deletions(-)

diff --git a/dev-python/httpbin/files/httpbin-0.7.0-werkzeug-2.1.patch b/dev-python/httpbin/files/httpbin-0.7.0-werkzeug-2.1.patch
new file mode 100644
index 000000000000..cf7871268d99
--- /dev/null
+++ b/dev-python/httpbin/files/httpbin-0.7.0-werkzeug-2.1.patch
@@ -0,0 +1,32 @@
+From 5cc81ce87a3c447a127e4a1a707faf9f3b1c9b6b Mon Sep 17 00:00:00 2001
+From: Maximino BOGADO <bogamax2@hotmail.fr>
+Date: Wed, 30 Mar 2022 16:26:31 +0200
+Subject: [PATCH] Replace BaseResponse to Response class (new werkzeug version
+ 2.1.0)
+
+---
+ httpbin/core.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/httpbin/core.py b/httpbin/core.py
+index 305c9882..2bad408e 100644
+--- a/httpbin/core.py
++++ b/httpbin/core.py
+@@ -29,7 +29,7 @@
+ from six.moves import range as xrange
+ from werkzeug.datastructures import WWWAuthenticate, MultiDict
+ from werkzeug.http import http_date
+-from werkzeug.wrappers import BaseResponse
++from werkzeug.wrappers import Response
+ from werkzeug.http import parse_authorization_header
+ from flasgger import Swagger, NO_SANITIZER
+ 
+@@ -77,7 +77,7 @@ def jsonify(*args, **kwargs):
+ 
+ 
+ # Prevent WSGI from correcting the casing of the Location header
+-BaseResponse.autocorrect_location_header = False
++Response.autocorrect_location_header = False
+ 
+ # Find the correct template folder when running from a different location
+ tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "templates")

diff --git a/dev-python/httpbin/httpbin-0.7.0-r4.ebuild b/dev-python/httpbin/httpbin-0.7.0-r4.ebuild
index df999b5429a0..7750896348d1 100644
--- a/dev-python/httpbin/httpbin-0.7.0-r4.ebuild
+++ b/dev-python/httpbin/httpbin-0.7.0-r4.ebuild
@@ -9,8 +9,10 @@ PYTHON_COMPAT=( python3_{8..10} pypy3 )
 inherit distutils-r1
 
 DESCRIPTION="HTTP Request and Response Service"
-HOMEPAGE="https://github.com/postmanlabs/httpbin
-	https://pypi.org/project/httpbin/"
+HOMEPAGE="
+	https://github.com/postmanlabs/httpbin/
+	https://pypi.org/project/httpbin/
+"
 SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
 
 LICENSE="MIT"
@@ -24,7 +26,8 @@ RDEPEND="
 	dev-python/itsdangerous[${PYTHON_USEDEP}]
 	dev-python/markupsafe[${PYTHON_USEDEP}]
 	dev-python/six[${PYTHON_USEDEP}]
-	>=dev-python/werkzeug-0.14.1[${PYTHON_USEDEP}]"
+	<dev-python/werkzeug-2.1[${PYTHON_USEDEP}]
+"
 
 PATCHES=(
 	# do not import raven if it's not going to be used

diff --git a/dev-python/httpbin/httpbin-0.7.0-r4.ebuild b/dev-python/httpbin/httpbin-0.7.0-r5.ebuild
similarity index 71%
copy from dev-python/httpbin/httpbin-0.7.0-r4.ebuild
copy to dev-python/httpbin/httpbin-0.7.0-r5.ebuild
index df999b5429a0..83c8c6aab6f8 100644
--- a/dev-python/httpbin/httpbin-0.7.0-r4.ebuild
+++ b/dev-python/httpbin/httpbin-0.7.0-r5.ebuild
@@ -9,13 +9,15 @@ PYTHON_COMPAT=( python3_{8..10} pypy3 )
 inherit distutils-r1
 
 DESCRIPTION="HTTP Request and Response Service"
-HOMEPAGE="https://github.com/postmanlabs/httpbin
-	https://pypi.org/project/httpbin/"
+HOMEPAGE="
+	https://github.com/postmanlabs/httpbin/
+	https://pypi.org/project/httpbin/
+"
 SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
 
 LICENSE="MIT"
 SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
+KEYWORDS="~amd64 ~arm ~arm64 ~m68k ~riscv ~x86"
 
 RDEPEND="
 	dev-python/brotlicffi[${PYTHON_USEDEP}]
@@ -24,16 +26,20 @@ RDEPEND="
 	dev-python/itsdangerous[${PYTHON_USEDEP}]
 	dev-python/markupsafe[${PYTHON_USEDEP}]
 	dev-python/six[${PYTHON_USEDEP}]
-	>=dev-python/werkzeug-0.14.1[${PYTHON_USEDEP}]"
+	>=dev-python/werkzeug-2.0[${PYTHON_USEDEP}]
+"
 
 PATCHES=(
 	# do not import raven if it's not going to be used
 	# (upstream removed it completely in git anyway)
-	"${FILESDIR}"/httpbin-0.7.0-optional-raven.patch
+	"${FILESDIR}"/${P}-optional-raven.patch
 	# fix tests with new versions of werkzeug
-	"${FILESDIR}"/httpbin-0.7.0-test-werkzeug.patch
+	"${FILESDIR}"/${P}-test-werkzeug.patch
 	# use brotlicffi instead of brotlipy
-	"${FILESDIR}"/httpbin-0.7.0-brotlicffi.patch
+	"${FILESDIR}"/${P}-brotlicffi.patch
+	# fix compat with werkzeug 2.1
+	# https://github.com/postmanlabs/httpbin/pull/674
+	"${FILESDIR}"/${P}-werkzeug-2.1.patch
 )
 
 distutils_enable_tests unittest


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/httpbin/files/, dev-python/httpbin/
@ 2023-11-03 18:35 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2023-11-03 18:35 UTC (permalink / raw
  To: gentoo-commits

commit:     2d2c759ffe48f522987bc1bf7cd60829b2458c1b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  3 18:14:23 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Nov  3 18:35:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d2c759f

dev-python/httpbin: Backport werkzeug-3 fix

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../httpbin/files/httpbin-0.10.1-werkzeug-3.patch  | 78 ++++++++++++++++++++++
 dev-python/httpbin/httpbin-0.10.1-r3.ebuild        | 42 ++++++++++++
 2 files changed, 120 insertions(+)

diff --git a/dev-python/httpbin/files/httpbin-0.10.1-werkzeug-3.patch b/dev-python/httpbin/files/httpbin-0.10.1-werkzeug-3.patch
new file mode 100644
index 000000000000..5ad6f2743400
--- /dev/null
+++ b/dev-python/httpbin/files/httpbin-0.10.1-werkzeug-3.patch
@@ -0,0 +1,78 @@
+diff --git a/httpbin/core.py b/httpbin/core.py
+index 5c1783a1..a82c1b88 100644
+--- a/httpbin/core.py
++++ b/httpbin/core.py
+@@ -32,7 +32,7 @@
+     from werkzeug.wrappers import Response
+ except ImportError:  # werkzeug < 2.1
+     from werkzeug.wrappers import BaseResponse as Response
+-from werkzeug.http import parse_authorization_header
++
+ from flasgger import Swagger, NO_SANITIZER
+ 
+ from . import filters
+@@ -47,6 +47,7 @@
+     H,
+     ROBOT_TXT,
+     ANGRY_ASCII,
++    parse_authorization_header,
+     parse_multi_value_header,
+     next_stale_after_value,
+     digest_challenge_response,
+@@ -636,16 +637,13 @@ def redirect_to():
+     args_dict = request.args.items()
+     args = CaseInsensitiveDict(args_dict)
+ 
+-    # We need to build the response manually and convert to UTF-8 to prevent
+-    # werkzeug from "fixing" the URL. This endpoint should set the Location
+-    # header to the exact string supplied.
+     response = app.make_response("")
+     response.status_code = 302
+     if "status_code" in args:
+         status_code = int(args["status_code"])
+         if status_code >= 300 and status_code < 400:
+             response.status_code = status_code
+-    response.headers["Location"] = args["url"].encode("utf-8")
++    response.headers["Location"] = args["url"]
+ 
+     return response
+ 
+diff --git a/httpbin/helpers.py b/httpbin/helpers.py
+index b29e1835..836c8026 100644
+--- a/httpbin/helpers.py
++++ b/httpbin/helpers.py
+@@ -13,8 +13,14 @@
+ import time
+ import os
+ from hashlib import md5, sha256, sha512
+-from werkzeug.http import parse_authorization_header
+ from werkzeug.datastructures import WWWAuthenticate
++from werkzeug.http import dump_header
++
++try:
++    from werkzeug.http import parse_authorization_header
++except ImportError: # werkzeug < 2.3
++    from werkzeug.datastructures import Authorization
++    parse_authorization_header = Authorization.from_header
+ 
+ from flask import request, make_response
+ from six.moves.urllib.parse import urlparse, urlunparse
+@@ -466,9 +472,14 @@ def digest_challenge_response(app, qop, algorithm, stale = False):
+     ]), algorithm)
+     opaque = H(os.urandom(10), algorithm)
+ 
+-    auth = WWWAuthenticate("digest")
+-    auth.set_digest('me@kennethreitz.com', nonce, opaque=opaque,
+-                    qop=('auth', 'auth-int') if qop is None else (qop,), algorithm=algorithm)
+-    auth.stale = stale
++    values = {
++        'realm': 'me@kennethreitz.com',
++        'nonce': nonce,
++        'opaque': opaque,
++        'qop': dump_header(('auth', 'auth-int') if qop is None else (qop,)),
++        'algorithm': algorithm,
++        'stale': stale,
++    }
++    auth = WWWAuthenticate("digest", values=values)
+     response.headers['WWW-Authenticate'] = auth.to_header()
+     return response

diff --git a/dev-python/httpbin/httpbin-0.10.1-r3.ebuild b/dev-python/httpbin/httpbin-0.10.1-r3.ebuild
new file mode 100644
index 000000000000..c8dd0484fecb
--- /dev/null
+++ b/dev-python/httpbin/httpbin-0.10.1-r3.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="HTTP Request and Response Service"
+HOMEPAGE="
+	https://github.com/psf/httpbin/
+	https://pypi.org/project/httpbin/
+"
+
+LICENSE="|| ( MIT ISC )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+RDEPEND="
+	dev-python/brotlicffi[${PYTHON_USEDEP}]
+	dev-python/decorator[${PYTHON_USEDEP}]
+	dev-python/flasgger[${PYTHON_USEDEP}]
+	>=dev-python/flask-2.2.4[${PYTHON_USEDEP}]
+	dev-python/itsdangerous[${PYTHON_USEDEP}]
+	dev-python/markupsafe[${PYTHON_USEDEP}]
+	dev-python/six[${PYTHON_USEDEP}]
+"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+	local PATCHES=(
+		# https://github.com/psf/httpbin/pull/29
+		"${FILESDIR}/${P}-werkzeug-3.patch"
+	)
+
+	# unpin greenlet
+	sed -i -e '/greenlet/d' pyproject.toml || die
+	distutils-r1_src_prepare
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/httpbin/files/, dev-python/httpbin/
@ 2024-02-15 10:42 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2024-02-15 10:42 UTC (permalink / raw
  To: gentoo-commits

commit:     5bfd17750b65ff200b0d963c0dee50cb2618b942
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 15 10:35:44 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Feb 15 10:35:44 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bfd1775

dev-python/httpbin: Update no-flasgger patch for better compat

Update the no-flasgger patch not to create a redirect, as that causes
test failures in dev-python/httpcore.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../files/httpbin-0.10.1-optional-flasgger.patch   | 24 +---------------------
 ...n-0.10.1-r4.ebuild => httpbin-0.10.1-r5.ebuild} |  0
 2 files changed, 1 insertion(+), 23 deletions(-)

diff --git a/dev-python/httpbin/files/httpbin-0.10.1-optional-flasgger.patch b/dev-python/httpbin/files/httpbin-0.10.1-optional-flasgger.patch
index c3d87ec4144d..d4695173dad5 100644
--- a/dev-python/httpbin/files/httpbin-0.10.1-optional-flasgger.patch
+++ b/dev-python/httpbin/files/httpbin-0.10.1-optional-flasgger.patch
@@ -54,34 +54,12 @@ index a82c1b8..77576a4 100644
 +    @app.route("/")
 +    def no_flasgger_index():
 +        """Redirect to legacy index if flasgger is not available."""
-+        return redirect(url_for("view_landing_page"))
++        return view_landing_page()
 +
 +
  @app.route("/legacy")
  def view_landing_page():
      """Generates Landing Page in legacy layout."""
-diff --git a/tests/test_httpbin.py b/tests/test_httpbin.py
-index 6b75124..2ce63a6 100755
---- a/tests/test_httpbin.py
-+++ b/tests/test_httpbin.py
-@@ -10,6 +10,7 @@ from hashlib import md5, sha256, sha512
- from io import BytesIO
- 
- import httpbin
-+from httpbin.core import Swagger
- from httpbin.helpers import parse_multi_value_header
- 
- 
-@@ -115,7 +116,8 @@ class HttpbinTestCase(unittest.TestCase):
- 
-     def test_index(self):   
-         response = self.app.get('/', headers={'User-Agent': 'test'})
--        self.assertEqual(response.status_code, 200)
-+        self.assertEqual(response.status_code,
-+                         200 if Swagger is not None else 302)
-  
-     def get_data(self, response):
-         if 'get_data' in dir(response):
 -- 
 2.43.0
 

diff --git a/dev-python/httpbin/httpbin-0.10.1-r4.ebuild b/dev-python/httpbin/httpbin-0.10.1-r5.ebuild
similarity index 100%
rename from dev-python/httpbin/httpbin-0.10.1-r4.ebuild
rename to dev-python/httpbin/httpbin-0.10.1-r5.ebuild


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/httpbin/files/, dev-python/httpbin/
@ 2024-03-07 16:19 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2024-03-07 16:19 UTC (permalink / raw
  To: gentoo-commits

commit:     2829232366150eca34d75fb9e2ef537a9882fd41
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  7 16:18:00 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Mar  7 16:18:00 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28292323

dev-python/httpbin: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/httpbin/Manifest                        |  1 -
 .../httpbin/files/httpbin-0.10.1-werkzeug-3.patch  | 78 ----------------------
 dev-python/httpbin/httpbin-0.10.1-r5.ebuild        | 55 ---------------
 3 files changed, 134 deletions(-)

diff --git a/dev-python/httpbin/Manifest b/dev-python/httpbin/Manifest
index c095ce2f4c3f..f21fd6043cd9 100644
--- a/dev-python/httpbin/Manifest
+++ b/dev-python/httpbin/Manifest
@@ -1,2 +1 @@
-DIST httpbin-0.10.1.tar.gz 107058 BLAKE2B a46732946fc3454e2ae71c4eec4f88521e190b736445c54f555021a273a75f57acbc9234237e6973a21fc3bf8f71d8c8b51d6422d719f03546ecd6887a20fe1b SHA512 e3b851253c347893a80e866e7d0188c572f2a87a540125de3d9cbe0b8c3f1ddfab2c60ee3ffde3fd7274fc662294c978c39b1b52acfd92c52fd552966da203be
 DIST httpbin-0.10.2.tar.gz 107327 BLAKE2B 39ab1e518c9f7e1ede9cd0aa2e3155f7e36267c83d1d2537a5b6cb5aa1c9e70efe96c5bf98a5b22cd05e70368d1495f8e5364032fcf2f476d62512b7e7322652 SHA512 731b842090be516d9eccb1d2bb8303128d2b2e24b1ebf0b2018a2f0b8629b164c7de686e1775841cd57417ec89941d98fc81f878a284c7242bfef4db481a781b

diff --git a/dev-python/httpbin/files/httpbin-0.10.1-werkzeug-3.patch b/dev-python/httpbin/files/httpbin-0.10.1-werkzeug-3.patch
deleted file mode 100644
index 5ad6f2743400..000000000000
--- a/dev-python/httpbin/files/httpbin-0.10.1-werkzeug-3.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-diff --git a/httpbin/core.py b/httpbin/core.py
-index 5c1783a1..a82c1b88 100644
---- a/httpbin/core.py
-+++ b/httpbin/core.py
-@@ -32,7 +32,7 @@
-     from werkzeug.wrappers import Response
- except ImportError:  # werkzeug < 2.1
-     from werkzeug.wrappers import BaseResponse as Response
--from werkzeug.http import parse_authorization_header
-+
- from flasgger import Swagger, NO_SANITIZER
- 
- from . import filters
-@@ -47,6 +47,7 @@
-     H,
-     ROBOT_TXT,
-     ANGRY_ASCII,
-+    parse_authorization_header,
-     parse_multi_value_header,
-     next_stale_after_value,
-     digest_challenge_response,
-@@ -636,16 +637,13 @@ def redirect_to():
-     args_dict = request.args.items()
-     args = CaseInsensitiveDict(args_dict)
- 
--    # We need to build the response manually and convert to UTF-8 to prevent
--    # werkzeug from "fixing" the URL. This endpoint should set the Location
--    # header to the exact string supplied.
-     response = app.make_response("")
-     response.status_code = 302
-     if "status_code" in args:
-         status_code = int(args["status_code"])
-         if status_code >= 300 and status_code < 400:
-             response.status_code = status_code
--    response.headers["Location"] = args["url"].encode("utf-8")
-+    response.headers["Location"] = args["url"]
- 
-     return response
- 
-diff --git a/httpbin/helpers.py b/httpbin/helpers.py
-index b29e1835..836c8026 100644
---- a/httpbin/helpers.py
-+++ b/httpbin/helpers.py
-@@ -13,8 +13,14 @@
- import time
- import os
- from hashlib import md5, sha256, sha512
--from werkzeug.http import parse_authorization_header
- from werkzeug.datastructures import WWWAuthenticate
-+from werkzeug.http import dump_header
-+
-+try:
-+    from werkzeug.http import parse_authorization_header
-+except ImportError: # werkzeug < 2.3
-+    from werkzeug.datastructures import Authorization
-+    parse_authorization_header = Authorization.from_header
- 
- from flask import request, make_response
- from six.moves.urllib.parse import urlparse, urlunparse
-@@ -466,9 +472,14 @@ def digest_challenge_response(app, qop, algorithm, stale = False):
-     ]), algorithm)
-     opaque = H(os.urandom(10), algorithm)
- 
--    auth = WWWAuthenticate("digest")
--    auth.set_digest('me@kennethreitz.com', nonce, opaque=opaque,
--                    qop=('auth', 'auth-int') if qop is None else (qop,), algorithm=algorithm)
--    auth.stale = stale
-+    values = {
-+        'realm': 'me@kennethreitz.com',
-+        'nonce': nonce,
-+        'opaque': opaque,
-+        'qop': dump_header(('auth', 'auth-int') if qop is None else (qop,)),
-+        'algorithm': algorithm,
-+        'stale': stale,
-+    }
-+    auth = WWWAuthenticate("digest", values=values)
-     response.headers['WWW-Authenticate'] = auth.to_header()
-     return response

diff --git a/dev-python/httpbin/httpbin-0.10.1-r5.ebuild b/dev-python/httpbin/httpbin-0.10.1-r5.ebuild
deleted file mode 100644
index d34c543e7976..000000000000
--- a/dev-python/httpbin/httpbin-0.10.1-r5.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} pypy3 )
-
-inherit distutils-r1 optfeature pypi
-
-DESCRIPTION="HTTP Request and Response Service"
-HOMEPAGE="
-	https://github.com/psf/httpbin/
-	https://pypi.org/project/httpbin/
-"
-
-LICENSE="|| ( MIT ISC )"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="test-rust"
-
-RDEPEND="
-	dev-python/brotlicffi[${PYTHON_USEDEP}]
-	dev-python/decorator[${PYTHON_USEDEP}]
-	>=dev-python/flask-2.2.4[${PYTHON_USEDEP}]
-	dev-python/itsdangerous[${PYTHON_USEDEP}]
-	dev-python/markupsafe[${PYTHON_USEDEP}]
-	dev-python/six[${PYTHON_USEDEP}]
-"
-BDEPEND="
-	test? (
-		test-rust? (
-			dev-python/flasgger[${PYTHON_USEDEP}]
-		)
-	)
-"
-
-distutils_enable_tests pytest
-
-src_prepare() {
-	local PATCHES=(
-		# https://github.com/psf/httpbin/pull/29
-		"${FILESDIR}/${P}-werkzeug-3.patch"
-		# https://github.com/psf/httpbin/pull/44 (simplified)
-		"${FILESDIR}/${P}-optional-flasgger.patch"
-	)
-
-	# remove unnecessary deps
-	sed -i -e '/greenlet/d' -e '/flasgger/d' pyproject.toml || die
-	distutils-r1_src_prepare
-}
-
-pkg_postinst() {
-	optfeature "Fancy index" dev-python/flasgger
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-07 16:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-07  9:14 [gentoo-commits] repo/gentoo:master commit in: dev-python/httpbin/files/, dev-python/httpbin/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2024-03-07 16:19 Michał Górny
2024-02-15 10:42 Michał Górny
2023-11-03 18:35 Michał Górny
2019-11-22 16:21 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox