[arch-commits] Commit in httpbin/repos/community-staging-any (5 files)

Felix Yan felixonmars at gemini.archlinux.org
Tue Dec 7 01:18:49 UTC 2021


    Date: Tuesday, December 7, 2021 @ 01:18:49
  Author: felixonmars
Revision: 1065426

archrelease: copy trunk to community-staging-any

Added:
  httpbin/repos/community-staging-any/PKGBUILD
    (from rev 1065425, httpbin/trunk/PKGBUILD)
  httpbin/repos/community-staging-any/httpbin-werkzeug-0.15.1.patch
    (from rev 1065425, httpbin/trunk/httpbin-werkzeug-0.15.1.patch)
  httpbin/repos/community-staging-any/httpbin-werkzeug-2.0.0.patch
    (from rev 1065425, httpbin/trunk/httpbin-werkzeug-2.0.0.patch)
Deleted:
  httpbin/repos/community-staging-any/PKGBUILD
  httpbin/repos/community-staging-any/httpbin-werkzeug-0.15.1.patch

-------------------------------+
 PKGBUILD                      |   86 ++++++++++++++++++++--------------------
 httpbin-werkzeug-0.15.1.patch |   68 +++++++++++++++----------------
 httpbin-werkzeug-2.0.0.patch  |   32 ++++++++++++++
 3 files changed, 111 insertions(+), 75 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-12-07 01:18:27 UTC (rev 1065425)
+++ PKGBUILD	2021-12-07 01:18:49 UTC (rev 1065426)
@@ -1,41 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-
-pkgname=httpbin
-pkgver=0.7.0
-pkgrel=7
-pkgdesc="HTTP Request and Response Service"
-arch=('any')
-url="https://github.com/requests/httpbin"
-license=('MIT')
-depends=('python-flask' 'python-markupsafe' 'python-itsdangerous' 'python-six' 'python-decorator'
-         'python-brotli' 'python-raven' 'python-werkzeug' 'python-gevent' 'python-flasgger'
-         'python-blinker')
-makedepends=('python-setuptools')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/requests/httpbin/archive/v$pkgver.tar.gz"
-        httpbin-werkzeug-0.15.1.patch)
-sha512sums=('faec48a0a2ac8800293b10281966a28195884ad2f69f0f28f1b8c8e1a7bfd8933ebbc9b541c80cdc19e1031a8ba9383afe8e372b9044436cb307dd1e8eddaae7'
-            '3c058ca5f685e281f7d60216de844e58727e7677766660df410ec57d8c985485cf611ec64eb71a234bdd49b4fdf66be6138d4bb7258d9e6d0346d6c6ee9f3cdf')
-
-prepare() {
-  patch -d httpbin-$pkgver -p1 -i ../httpbin-werkzeug-0.15.1.patch
-  sed -i 's/brotlipy/Brotli/g' httpbin-$pkgver/setup.py
-}
-
-build() {
-  cd httpbin-$pkgver
-  LC_CTYPE=en_US.UTF-8 python setup.py build
-}
-
-check() {
-  cd httpbin-$pkgver
-  python test_httpbin.py
-}
-
-package() {
-  cd httpbin-$pkgver
-  LC_CTYPE=en_US.UTF-8 python setup.py install -O1 --root="$pkgdir"
-
-  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
-
-# vim:set ts=2 sw=2 et:

Copied: httpbin/repos/community-staging-any/PKGBUILD (from rev 1065425, httpbin/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-12-07 01:18:49 UTC (rev 1065426)
@@ -0,0 +1,45 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=httpbin
+pkgver=0.7.0
+pkgrel=8
+pkgdesc="HTTP Request and Response Service"
+arch=('any')
+url="https://github.com/requests/httpbin"
+license=('MIT')
+depends=('python-flask' 'python-markupsafe' 'python-itsdangerous' 'python-six' 'python-decorator'
+         'python-brotli' 'python-raven' 'python-werkzeug' 'python-gevent' 'python-flasgger'
+         'python-blinker')
+makedepends=('python-setuptools')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/requests/httpbin/archive/v$pkgver.tar.gz"
+        httpbin-werkzeug-0.15.1.patch
+        httpbin-werkzeug-2.0.0.patch)
+sha512sums=('faec48a0a2ac8800293b10281966a28195884ad2f69f0f28f1b8c8e1a7bfd8933ebbc9b541c80cdc19e1031a8ba9383afe8e372b9044436cb307dd1e8eddaae7'
+            '3c058ca5f685e281f7d60216de844e58727e7677766660df410ec57d8c985485cf611ec64eb71a234bdd49b4fdf66be6138d4bb7258d9e6d0346d6c6ee9f3cdf'
+            '25aced8dc34ed517ba7304d86d7e32fc49282262512962edf743265c78f3c5a2e3324902ec76ea121c11a9af0219d8c4e506ce301ad625d9e72f07491b8cbe49')
+
+prepare() {
+  cd httpbin-$pkgver
+  patch -p1 -i ../httpbin-werkzeug-0.15.1.patch
+  patch -p1 -i ../httpbin-werkzeug-2.0.0.patch
+  sed -i 's/brotlipy/Brotli/g' setup.py
+}
+
+build() {
+  cd httpbin-$pkgver
+  LC_CTYPE=en_US.UTF-8 python setup.py build
+}
+
+check() {
+  cd httpbin-$pkgver
+  python test_httpbin.py
+}
+
+package() {
+  cd httpbin-$pkgver
+  LC_CTYPE=en_US.UTF-8 python setup.py install -O1 --root="$pkgdir"
+
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: httpbin-werkzeug-0.15.1.patch
===================================================================
--- httpbin-werkzeug-0.15.1.patch	2021-12-07 01:18:27 UTC (rev 1065425)
+++ httpbin-werkzeug-0.15.1.patch	2021-12-07 01:18:49 UTC (rev 1065426)
@@ -1,34 +0,0 @@
-From b6cb2b47a3813da5df8dbffada284b72d7fe099e Mon Sep 17 00:00:00 2001
-From: Simon Kowallik <github at simonkowallik.com>
-Date: Sat, 18 May 2019 13:10:08 +0200
-Subject: [PATCH 1/2] fix #554: update tests, Pipfile, Pipfile.lock for
- werkzeug>=0.15.1
-
-- update test_httpbin.py to reflect new behaviour of werkzeug
-- require werkzeug>=0.15.1
----
- Pipfile         | 2 +-
- Pipfile.lock    | 6 +++---
- test_httpbin.py | 2 --
- 3 files changed, 4 insertions(+), 6 deletions(-)
-
-diff --git a/test_httpbin.py b/test_httpbin.py
-index b7104ff..ea51ae8 100755
---- a/test_httpbin.py
-+++ b/test_httpbin.py
-@@ -148,7 +148,6 @@ def test_get(self):
-         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')
-@@ -162,7 +161,6 @@ def test_anything(self):
-         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'))

Copied: httpbin/repos/community-staging-any/httpbin-werkzeug-0.15.1.patch (from rev 1065425, httpbin/trunk/httpbin-werkzeug-0.15.1.patch)
===================================================================
--- httpbin-werkzeug-0.15.1.patch	                        (rev 0)
+++ httpbin-werkzeug-0.15.1.patch	2021-12-07 01:18:49 UTC (rev 1065426)
@@ -0,0 +1,34 @@
+From b6cb2b47a3813da5df8dbffada284b72d7fe099e Mon Sep 17 00:00:00 2001
+From: Simon Kowallik <github at simonkowallik.com>
+Date: Sat, 18 May 2019 13:10:08 +0200
+Subject: [PATCH 1/2] fix #554: update tests, Pipfile, Pipfile.lock for
+ werkzeug>=0.15.1
+
+- update test_httpbin.py to reflect new behaviour of werkzeug
+- require werkzeug>=0.15.1
+---
+ Pipfile         | 2 +-
+ Pipfile.lock    | 6 +++---
+ test_httpbin.py | 2 --
+ 3 files changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/test_httpbin.py b/test_httpbin.py
+index b7104ff..ea51ae8 100755
+--- a/test_httpbin.py
++++ b/test_httpbin.py
+@@ -148,7 +148,6 @@ def test_get(self):
+         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')
+@@ -162,7 +161,6 @@ def test_anything(self):
+         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'))

Copied: httpbin/repos/community-staging-any/httpbin-werkzeug-2.0.0.patch (from rev 1065425, httpbin/trunk/httpbin-werkzeug-2.0.0.patch)
===================================================================
--- httpbin-werkzeug-2.0.0.patch	                        (rev 0)
+++ httpbin-werkzeug-2.0.0.patch	2021-12-07 01:18:49 UTC (rev 1065426)
@@ -0,0 +1,32 @@
+From ccd417eea8d13192ea980539e1a4bbe31206c802 Mon Sep 17 00:00:00 2001
+From: Adam Williamson <awilliam at redhat.com>
+Date: Mon, 19 Jul 2021 15:41:23 -0700
+Subject: [PATCH] Fix disabling of location header autocorrect for werkzeug 2+
+ (#647)
+
+In werkzeug 2.0.0 and later, the Location header autocorrection
+moved from BaseResponse to Response, so we need to set
+`autocorrect_location_header = False` in `Response` not
+`BaseResponse`. For now let's just set it in both to be safe,
+this doesn't cause any errors at least with 1.0.1 and 2.0.1.
+
+Signed-off-by: Adam Williamson <awilliam at redhat.com>
+---
+ httpbin/core.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/httpbin/core.py b/httpbin/core.py
+index 305c9882..3726e21f 100644
+--- a/httpbin/core.py
++++ b/httpbin/core.py
+@@ -77,7 +77,10 @@ def jsonify(*args, **kwargs):
+ 
+ 
+ # Prevent WSGI from correcting the casing of the Location header
++# and forcing it to be absolute. This moved from BaseResponse to
++# Response in werkzeug 2.0.0, so we set both to be safe.
+ 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")



More information about the arch-commits mailing list