From: ahesford <ahesford@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] Flask: update to 3.0, clean up stale dependants
Date: Tue, 17 Oct 2023 14:24:04 +0200 [thread overview]
Message-ID: <20231017122404.R4jj4ZpPvWAJGNAhdOafuHak--cRo-AEbqECz8zovr4@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-46736@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1644 bytes --]
There is an updated pull request by ahesford against master on the void-packages repository
https://github.com/ahesford/void-packages flask
https://github.com/void-linux/void-packages/pull/46736
[WIP] Flask: update to 3.0, clean up stale dependants
Flask and Werkzeug 3 drop some deprecated interfaces and break some old packages, but a lot of these are effectively dead anyway.
## Testing the changes
- I tested the changes in this PR: **in progress**
The results of `xbps-src` check on the dependants of `python3-Flask` and `python3-Werkzeug` are noted below.
### Flask dependants
- [x] OpenLP (23 pre-existing failures, 17 pre-existing errors)
- [ ] etesync-dav (no tests)
- [x] fava (4 pre-existing failures)
- [x] grip
- [x] impacket (1396 pre-existing failures)
- [x] mitmproxy (3 pre-existing failures)
- [ ] mkchromecast (no tests, maybe abandonware)
- [x] python3-Flask-Babel
- [x] python3-Flask-Cors
- [ ] python3-Flask-HTTPAuth (no tests)
- [x] python3-Flask-Login
- [ ] python3-Flask-RESTful (tests are broken with Python 3.12)
- [x] python3-Flask-WTF
- [ ] python3-httpbin
`python3-Werkzeug: cannot import name 'parse_authorization_header' from 'werkzeug.http'`
- [ ] voltron
### Werkzeug Dependants
- [x] python3-openapi-core
- [x] python3-pytest-httpserver
- [x] python3-pytest-localserver
- [ ] python3-quart
## Removed Packages
- python3-Flask-User
- python3-Flask-Mail
- python3-Flask-Script
- python3-Flask-OAuthlib
- python3-Flask-Assets
- python3-Flask-SQLAlchemy
- python3-stormssh
A patch file from https://github.com/void-linux/void-packages/pull/46736.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-flask-46736.patch --]
[-- Type: text/x-diff, Size: 52010 bytes --]
From d10fcaa8f4de227daf4aa167d5d48fa96f6fac2f Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 16 Oct 2023 10:49:38 -0400
Subject: [PATCH 01/17] python3-Flask-Assets: remove package
This package hasn't been meaningfully touched since 2016-08-25.
---
srcpkgs/python3-Flask-Assets/template | 17 -----------------
srcpkgs/removed-packages/template | 1 +
2 files changed, 1 insertion(+), 17 deletions(-)
delete mode 100644 srcpkgs/python3-Flask-Assets/template
diff --git a/srcpkgs/python3-Flask-Assets/template b/srcpkgs/python3-Flask-Assets/template
deleted file mode 100644
index e4a4b5c72f662..0000000000000
--- a/srcpkgs/python3-Flask-Assets/template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Template file for 'python3-Flask-Assets'
-pkgname=python3-Flask-Assets
-version=0.12
-revision=9
-build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-Flask python3-webassets"
-short_desc="Asset management for Flask (Python3)"
-maintainer="Orphaned <orphan@voidlinux.org>"
-license="BSD-2-Clause"
-homepage="https://github.com/miracle2k/flask-assets"
-distfiles="${PYPI_SITE}/F/Flask-Assets/Flask-Assets-${version}.tar.gz"
-checksum=6031527b89fb3509d1581d932affa5a79dd348cfffb58d0aef99a43461d47847
-
-post_install() {
- vlicense LICENSE
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 20ea28881f046..e611576a591b3 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -587,6 +587,7 @@ replaces="
python-xlib<=0.29_1
python-zipp<=1.2.0_2
python3-Django<=3.0.7_2
+ python3-Flask-Assets<=0.12_9
python3-SPARQLWrapper<=1.8.4_4
python3-aiohttp-cors2<=0.7.0_3
python3-aiohttp2<=2.3.10_4
From 9a9c1dc0a4dfa011f9739140a251a34f59a21496 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 16 Oct 2023 15:54:31 -0400
Subject: [PATCH 02/17] python3-Flask-User: remove package
This package isn't required by any others and hasn't been meaningfully
touched since 2020-07-27.
---
srcpkgs/python3-Flask-User/template | 18 ------------------
srcpkgs/removed-packages/template | 1 +
2 files changed, 1 insertion(+), 18 deletions(-)
delete mode 100644 srcpkgs/python3-Flask-User/template
diff --git a/srcpkgs/python3-Flask-User/template b/srcpkgs/python3-Flask-User/template
deleted file mode 100644
index 0030f623753d2..0000000000000
--- a/srcpkgs/python3-Flask-User/template
+++ /dev/null
@@ -1,18 +0,0 @@
-# Template file for 'python3-Flask-User'
-pkgname=python3-Flask-User
-version=1.0.2.2
-revision=6
-build_style=python3-module
-hostmakedepends="python3-setuptools python3-Flask-Login python3-wheel"
-depends="python3-Flask python3-Flask-Login python3-Flask-WTF
- python3-Flask-SQLAlchemy python3-Flask-Mail python3-Flask-Babel"
-short_desc="User session management for Flask (Python3)"
-maintainer="pulux <pulux@pf4sh.de>"
-license="MIT"
-homepage="https://flask-user.readthedocs.io/en/latest/"
-distfiles="${PYPI_SITE}/F/Flask-User/Flask-User-${version}.tar.gz"
-checksum=c9785febc2fc7ca15c69cfff1c8dabc2788f25043b54a33f73a6c2a9daf7fbe4
-
-post_install() {
- vlicense LICENSE.txt
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index e611576a591b3..e065853a5b453 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -588,6 +588,7 @@ replaces="
python-zipp<=1.2.0_2
python3-Django<=3.0.7_2
python3-Flask-Assets<=0.12_9
+ python3-Flask-User<=1.0.2.2_6
python3-SPARQLWrapper<=1.8.4_4
python3-aiohttp-cors2<=0.7.0_3
python3-aiohttp2<=2.3.10_4
From 3e74ba65f59143b8b05df7dfcf4910ad900ca5a0 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 16 Oct 2023 15:57:50 -0400
Subject: [PATCH 03/17] python3-Flask-Mail: remove package
This package hasn't been updated since 2014 and hasn't been meaningfully
touched since its addition to the Void repository and is not required by
any other packages.
---
srcpkgs/python3-Flask-Mail/template | 17 -----------------
srcpkgs/removed-packages/template | 1 +
2 files changed, 1 insertion(+), 17 deletions(-)
delete mode 100644 srcpkgs/python3-Flask-Mail/template
diff --git a/srcpkgs/python3-Flask-Mail/template b/srcpkgs/python3-Flask-Mail/template
deleted file mode 100644
index 51699d3b9d2a4..0000000000000
--- a/srcpkgs/python3-Flask-Mail/template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Template file for 'python3-Flask-Mail'
-pkgname=python3-Flask-Mail
-version=0.9.1
-revision=5
-build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-Flask"
-short_desc="Flask extension for sending email (python3)"
-maintainer="pulux <pulux@pf4sh.de>"
-license="BSD-2-Clause"
-homepage="https://pythonhosted.org/flask-mail/"
-distfiles="${PYPI_SITE}/F/Flask-Mail/Flask-Mail-${version}.tar.gz"
-checksum=22e5eb9a940bf407bcf30410ecc3708f3c56cc44b29c34e1726fe85006935f41
-
-post_install() {
- vlicense LICENSE
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index e065853a5b453..7fb3efff3d27a 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -588,6 +588,7 @@ replaces="
python-zipp<=1.2.0_2
python3-Django<=3.0.7_2
python3-Flask-Assets<=0.12_9
+ python3-Flask-Mail<=0.9.1_5
python3-Flask-User<=1.0.2.2_6
python3-SPARQLWrapper<=1.8.4_4
python3-aiohttp-cors2<=0.7.0_3
From 097ecd4dcb10c248a6fd5e8c080a70eae4cc48dc Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 16 Oct 2023 16:03:29 -0400
Subject: [PATCH 04/17] python3-Flask-OAuthlib: remove package
This package has not been meaningfully touched since it was added to the
repository on 2020-11-29, nothing depends on it, and upstream recommends
using an alternative package anyway.
---
srcpkgs/python3-Flask-OAuthlib/template | 18 ------------------
srcpkgs/removed-packages/template | 1 +
2 files changed, 1 insertion(+), 18 deletions(-)
delete mode 100644 srcpkgs/python3-Flask-OAuthlib/template
diff --git a/srcpkgs/python3-Flask-OAuthlib/template b/srcpkgs/python3-Flask-OAuthlib/template
deleted file mode 100644
index 3ae5365ef0d64..0000000000000
--- a/srcpkgs/python3-Flask-OAuthlib/template
+++ /dev/null
@@ -1,18 +0,0 @@
-# Template file for 'python3-Flask-OAuthlib'
-pkgname=python3-Flask-OAuthlib
-version=0.9.6
-revision=4
-build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-Flask python3-requests-oauthlib"
-short_desc="OAuthlib for Flask (Python3)"
-maintainer="Orphaned <orphan@voidlinux.org>"
-license="BSD-3-Clause"
-homepage="https://github.com/lepture/flask-oauthlib"
-changelog="https://raw.githubusercontent.com/lepture/flask-oauthlib/master/CHANGES.rst"
-distfiles="${PYPI_SITE}/F/Flask-OAuthlib/Flask-OAuthlib-${version}.tar.gz"
-checksum=5bb79c8a8e670c2eb4cb553dfc3283b6c8d1202f674934676dc173cee94fe39c
-
-post_install() {
- vlicense LICENSE
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 7fb3efff3d27a..47d8a2ea4eb34 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -589,6 +589,7 @@ replaces="
python3-Django<=3.0.7_2
python3-Flask-Assets<=0.12_9
python3-Flask-Mail<=0.9.1_5
+ python3-Flask-OAuthlib<=0.9.6_4
python3-Flask-User<=1.0.2.2_6
python3-SPARQLWrapper<=1.8.4_4
python3-aiohttp-cors2<=0.7.0_3
From 758724347644d90c92b06d52603695c4ff1687c7 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 16 Oct 2023 16:10:31 -0400
Subject: [PATCH 05/17] python3-Flask-Script: remove package
The package hasn't been meaningfully touched since 2017-09-13, nothing
depends on it, and the upstream repo has been archived for 3.5 years.
---
srcpkgs/python3-Flask-Script/template | 17 -----------------
srcpkgs/removed-packages/template | 1 +
2 files changed, 1 insertion(+), 17 deletions(-)
delete mode 100644 srcpkgs/python3-Flask-Script/template
diff --git a/srcpkgs/python3-Flask-Script/template b/srcpkgs/python3-Flask-Script/template
deleted file mode 100644
index 04fbbb6d4684b..0000000000000
--- a/srcpkgs/python3-Flask-Script/template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Template file for 'python3-Flask-Script'
-pkgname=python3-Flask-Script
-version=2.0.6
-revision=7
-build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-Flask"
-short_desc="Scripting support for Flask (Python3)"
-maintainer="Orphaned <orphan@voidlinux.org>"
-license="BSD-3-Clause"
-homepage="https://github.com/smurfix/flask-script"
-distfiles="${PYPI_SITE}/F/Flask-Script/Flask-Script-${version}.tar.gz"
-checksum=6425963d91054cfcc185807141c7314a9c5ad46325911bd24dcb489bd0161c65
-
-post_install() {
- vlicense LICENSE
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 47d8a2ea4eb34..bd630493b598f 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -590,6 +590,7 @@ replaces="
python3-Flask-Assets<=0.12_9
python3-Flask-Mail<=0.9.1_5
python3-Flask-OAuthlib<=0.9.6_4
+ python3-Flask-Script<=2.0.6_7
python3-Flask-User<=1.0.2.2_6
python3-SPARQLWrapper<=1.8.4_4
python3-aiohttp-cors2<=0.7.0_3
From e1775b59f0c70d8b4ebb543a20f238a02f89650c Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 16 Oct 2023 16:29:38 -0400
Subject: [PATCH 06/17] python3-Flask-SQLAlchemy: remove package
This package has not been meaningfully touched since 2021-05-08, nothing
depends on it, its current version does not function with Flask 3.0, and
newer versions require an update to python3-SQLAlchemy that will break
other packages in the repository.
---
srcpkgs/python3-Flask-SQLAlchemy/template | 18 ------------------
srcpkgs/removed-packages/template | 1 +
2 files changed, 1 insertion(+), 18 deletions(-)
delete mode 100644 srcpkgs/python3-Flask-SQLAlchemy/template
diff --git a/srcpkgs/python3-Flask-SQLAlchemy/template b/srcpkgs/python3-Flask-SQLAlchemy/template
deleted file mode 100644
index d2ab61d9fb7e2..0000000000000
--- a/srcpkgs/python3-Flask-SQLAlchemy/template
+++ /dev/null
@@ -1,18 +0,0 @@
-# Template file for 'python3-Flask-SQLAlchemy'
-pkgname=python3-Flask-SQLAlchemy
-version=2.5.1
-revision=4
-build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-Flask python3-SQLAlchemy"
-checkdepends="$depends"
-short_desc="Adds SQLAlchemy support to your Flask application (python3)"
-maintainer="pulux <pulux@pf4sh.de>"
-license="MIT"
-homepage="https://github.com/pallets/flask-sqlalchemy"
-distfiles="${PYPI_SITE}/F/Flask-SQLAlchemy/Flask-SQLAlchemy-${version}.tar.gz"
-checksum=2bda44b43e7cacb15d4e05ff3cc1f8bc97936cc464623424102bfc2c35e95912
-
-post_install() {
- vlicense LICENSE.rst
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index bd630493b598f..95fa16422add2 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -591,6 +591,7 @@ replaces="
python3-Flask-Mail<=0.9.1_5
python3-Flask-OAuthlib<=0.9.6_4
python3-Flask-Script<=2.0.6_7
+ python3-Flask-SQLAlchemy<=2.5.1_4
python3-Flask-User<=1.0.2.2_6
python3-SPARQLWrapper<=1.8.4_4
python3-aiohttp-cors2<=0.7.0_3
From 144d3ba3c4d640b464e5bdd5f12bc990a7f22163 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 16 Oct 2023 16:17:46 -0400
Subject: [PATCH 07/17] python3-stormssh: remove package
The package has not been meaningfully touched since 2018-10-01, is not
required by any other packages, and the upstream repo has been archived
since 2022-12-21.
---
srcpkgs/python3-stormssh/template | 18 ------------------
srcpkgs/python3-stormssh/update | 1 -
srcpkgs/removed-packages/template | 1 +
3 files changed, 1 insertion(+), 19 deletions(-)
delete mode 100644 srcpkgs/python3-stormssh/template
delete mode 100644 srcpkgs/python3-stormssh/update
diff --git a/srcpkgs/python3-stormssh/template b/srcpkgs/python3-stormssh/template
deleted file mode 100644
index 2ac88580c76a5..0000000000000
--- a/srcpkgs/python3-stormssh/template
+++ /dev/null
@@ -1,18 +0,0 @@
-# Template file for 'python3-stormssh'
-pkgname=python3-stormssh
-version=0.7.0
-revision=7
-build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-setuptools python3-six python3-paramiko python3-termcolor python3-Flask"
-short_desc="Manage your SSH like a boss (Python3)"
-maintainer="Orphaned <orphan@voidlinux.org>"
-license="MIT"
-homepage="https://github.com/emre/storm"
-distfiles="https://github.com/emre/storm/archive/${version}.tar.gz"
-checksum=c2e5da1cb4a27b309ed7e470c5acebe2822f7928c5ef0e38f9dade247cf9a6c6
-conflicts="python-stormssh>=0"
-
-post_install() {
- vlicense LICENSE
-}
diff --git a/srcpkgs/python3-stormssh/update b/srcpkgs/python3-stormssh/update
deleted file mode 100644
index 5a49d7d4455f1..0000000000000
--- a/srcpkgs/python3-stormssh/update
+++ /dev/null
@@ -1 +0,0 @@
-ignore="1.6.7"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 95fa16422add2..b163df81f1f70 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -616,6 +616,7 @@ replaces="
python3-shiboken<=5.15.0_3
python3-snakeoil-devel<=0.8.8_4
python3-sqlalchemy-migrate<=0.12.0_6
+ python3-stormssh<=0.7.0_7
python3-txacme<=0.9.3_3
qimageblitz<=0.0.6_4
qt-designer-devel<=4.8.7_29
From 7f8cb18d90e5e45d6cb4c9a2d9daa8899796c69a Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 16 Oct 2023 11:00:40 -0400
Subject: [PATCH 08/17] python3-blinker: update to 1.6.3.
---
srcpkgs/python3-blinker/template | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/python3-blinker/template b/srcpkgs/python3-blinker/template
index c747ab10ea4c1..da1894ffcb01c 100644
--- a/srcpkgs/python3-blinker/template
+++ b/srcpkgs/python3-blinker/template
@@ -1,9 +1,9 @@
# Template file for 'python3-blinker'
pkgname=python3-blinker
-version=1.6.2
-revision=2
+version=1.6.3
+revision=1
build_style=python3-pep517
-hostmakedepends="python3-setuptools python3-wheel"
+hostmakedepends="python3-flit_core"
makedepends="python3-devel"
depends="python3"
checkdepends="python3-pytest-asyncio python3-pluggy python3-packaging
@@ -14,7 +14,7 @@ license="MIT"
homepage="https://blinker.readthedocs.io/en/stable/"
changelog="https://raw.githubusercontent.com/pallets-eco/blinker/main/CHANGES.rst"
distfiles="${PYPI_SITE}/b/blinker/blinker-${version}.tar.gz"
-checksum=4afd3de66ef3a9f8067559fb7a1cbe555c17dcbe15971b05d1b625c3e7abe213
+checksum=152090d27c1c5c722ee7e48504b02d76502811ce02e1523553b4cf8c8b3d3a8d
post_install() {
vlicense LICENSE.rst
From d61a4840cc586699701e3317c95def77ce0c3666 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 16 Oct 2023 11:00:57 -0400
Subject: [PATCH 09/17] python3-Werkzeug: update to 3.0.0.
---
srcpkgs/python3-Werkzeug/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/python3-Werkzeug/template b/srcpkgs/python3-Werkzeug/template
index 22cf283d70672..599470181c104 100644
--- a/srcpkgs/python3-Werkzeug/template
+++ b/srcpkgs/python3-Werkzeug/template
@@ -1,7 +1,7 @@
# Template file for 'python3-Werkzeug'
pkgname=python3-Werkzeug
-version=2.3.7
-revision=2
+version=3.0.0
+revision=1
build_style=python3-pep517
# Some tests depend on unpackaged dependencies
make_check_args="
@@ -18,7 +18,7 @@ license="BSD-3-Clause"
homepage="https://palletsprojects.com/p/werkzeug/"
changelog="https://raw.githubusercontent.com/pallets/werkzeug/main/CHANGES.rst"
distfiles="https://github.com/pallets/werkzeug/archive/${version}.tar.gz"
-checksum=d9a68679b430e099b668a61130f1eb6e6768ac663a8667745ad637955ca1dd9d
+checksum=3ba5b5f0668073c7a32f13451c3703e7bcdbfbf7dce469739873c86d37b7ae0c
pre_check() {
# For some reason, --ignore doesn't work on this file
From dbd2ec5dc6eb7abc9f3e0724de48b44f8eadc263 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 16 Oct 2023 11:01:18 -0400
Subject: [PATCH 10/17] python3-Flask: update to 3.0.0.
---
srcpkgs/python3-Flask/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/python3-Flask/template b/srcpkgs/python3-Flask/template
index d7b6da366ab97..e4a89b4e59376 100644
--- a/srcpkgs/python3-Flask/template
+++ b/srcpkgs/python3-Flask/template
@@ -1,7 +1,7 @@
# Template file for 'python3-Flask'
pkgname=python3-Flask
-version=2.3.3
-revision=2
+version=3.0.0
+revision=1
build_style=python3-pep517
hostmakedepends="python3-flit_core"
depends="python3-Werkzeug python3-Jinja2 python3-itsdangerous
@@ -13,7 +13,7 @@ license="BSD-3-Clause"
homepage="http://flask.pocoo.org"
changelog="https://raw.githubusercontent.com/pallets/flask/main/CHANGES.rst"
distfiles="https://github.com/pallets/flask/archive/${version}.tar.gz"
-checksum=0e3e8ab9a6c8c2003256583deb03cb1a561d58bf27512e9dabda10b009c5c164
+checksum=9075bacbd3636daadf14872dc53b0aa97b8ee255352f32deed848424d7999a37
conflicts="python-Flask>=0"
post_install() {
From 3fca5a389c329bf655397d67c6098e89c0cb83dc Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 16 Oct 2023 11:03:18 -0400
Subject: [PATCH 11/17] python3-Flask-Cors: update to 4.0.0.
---
srcpkgs/python3-Flask-Cors/template | 6 +++---
srcpkgs/python3-Flask-Cors/update | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)
create mode 100644 srcpkgs/python3-Flask-Cors/update
diff --git a/srcpkgs/python3-Flask-Cors/template b/srcpkgs/python3-Flask-Cors/template
index 8f9b44d0788ed..ded40aa05b8f4 100644
--- a/srcpkgs/python3-Flask-Cors/template
+++ b/srcpkgs/python3-Flask-Cors/template
@@ -1,7 +1,7 @@
# Template file for 'python3-Flask-Cors'
pkgname=python3-Flask-Cors
-version=3.0.10
-revision=3
+version=4.0.0
+revision=1
build_style=python3-module
hostmakedepends="python3-setuptools"
depends="python3-Flask python3-six"
@@ -12,7 +12,7 @@ license="MIT"
homepage="https://github.com/corydolphin/flask-cors"
changelog="https://raw.githubusercontent.com/corydolphin/flask-cors/master/CHANGELOG.md"
distfiles="${PYPI_SITE}/F/Flask-Cors/Flask-Cors-${version}.tar.gz"
-checksum=b60839393f3b84a0f3746f6cdca56c1ad7426aa738b70d6c61375857823181de
+checksum=f268522fcb2f73e2ecdde1ef45e2fd5c71cc48fe03cffb4b441c6d1b40684eb0
post_install() {
vlicense LICENSE
diff --git a/srcpkgs/python3-Flask-Cors/update b/srcpkgs/python3-Flask-Cors/update
new file mode 100644
index 0000000000000..f7dcfce5eacb3
--- /dev/null
+++ b/srcpkgs/python3-Flask-Cors/update
@@ -0,0 +1 @@
+ignore="*a* *rc*"
From 909bae437c2066fcee13126da409b3cf38dd42b8 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 16 Oct 2023 11:38:34 -0400
Subject: [PATCH 12/17] python3-Flask-HTTPAuth: update to 4.8.0.
---
srcpkgs/python3-Flask-HTTPAuth/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/python3-Flask-HTTPAuth/template b/srcpkgs/python3-Flask-HTTPAuth/template
index 16596abf688e5..e833d5332019e 100644
--- a/srcpkgs/python3-Flask-HTTPAuth/template
+++ b/srcpkgs/python3-Flask-HTTPAuth/template
@@ -1,7 +1,7 @@
# Template file for 'python3-Flask-HTTPAuth'
pkgname=python3-Flask-HTTPAuth
-version=4.5.0
-revision=3
+version=4.8.0
+revision=1
build_style=python3-module
hostmakedepends="python3-setuptools"
depends="python3-Flask"
@@ -10,7 +10,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://github.com/miguelgrinberg/Flask-HTTPAuth"
distfiles="${PYPI_SITE}/f/flask-httpauth/Flask-HTTPAuth-${version}.tar.gz"
-checksum=395040fda2854df800d15e84bc4a81a5f32f1d4a5e91eee554936f36f330aa29
+checksum=66568a05bc73942c65f1e2201ae746295816dc009edd84b482c44c758d75097a
make_check=no # needs packages not in repo (asgiref)
post_install() {
From 986a3d064b4115bfeddab294874654e1cc3360e8 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 16 Oct 2023 14:56:15 -0400
Subject: [PATCH 13/17] python3-Flask-Babel: update to 4.0.0.
---
srcpkgs/python3-Flask-Babel/template | 14 +++++++-------
srcpkgs/python3-Flask-Babel/update | 1 +
2 files changed, 8 insertions(+), 7 deletions(-)
create mode 100644 srcpkgs/python3-Flask-Babel/update
diff --git a/srcpkgs/python3-Flask-Babel/template b/srcpkgs/python3-Flask-Babel/template
index 5ce63595340f6..ff0fb4bb06686 100644
--- a/srcpkgs/python3-Flask-Babel/template
+++ b/srcpkgs/python3-Flask-Babel/template
@@ -1,17 +1,17 @@
# Template file for 'python3-Flask-Babel'
pkgname=python3-Flask-Babel
-version=2.0.0
-revision=6
-build_style=python3-module
-hostmakedepends="python3-setuptools"
+version=4.0.0
+revision=1
+build_style=python3-pep517
+hostmakedepends="python3-poetry-core"
depends="python3-pytz python3-Jinja2 python3-Babel python3-Flask"
checkdepends="${depends} python3-pytest-mock"
short_desc="Python3 i18n and l10n support for Flask based on Babel and pytz"
maintainer="pulux <pulux@pf4sh.de>"
license="BSD-3-Clause"
-homepage="https://pythonhosted.org/Flask-Babel/"
-distfiles="${PYPI_SITE}/F/Flask-Babel/Flask-Babel-${version}.tar.gz"
-checksum=f9faf45cdb2e1a32ea2ec14403587d4295108f35017a7821a2b1acb8cfd9257d
+homepage="https://python-babel.github.io/flask-babel/"
+distfiles="https://github.com/python-babel/flask-babel/archive/v${version}.tar.gz"
+checksum=6952ba8a6813a33a5c2ff65ddad61e8215307b5eb060d2d87e413822af9114a7
post_install() {
vlicense LICENSE
diff --git a/srcpkgs/python3-Flask-Babel/update b/srcpkgs/python3-Flask-Babel/update
new file mode 100644
index 0000000000000..8aecfdca11096
--- /dev/null
+++ b/srcpkgs/python3-Flask-Babel/update
@@ -0,0 +1 @@
+pkgname="flask_babel"
From ffcfec81527f721067bd3faf9d1790a61dcbd350 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 16 Oct 2023 15:02:31 -0400
Subject: [PATCH 14/17] grip: patch for Werkzeug 3
---
srcpkgs/grip/patches/werkzeug-3.0.patch | 24 ++++++++++++++++++++++++
srcpkgs/grip/template | 2 +-
2 files changed, 25 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/grip/patches/werkzeug-3.0.patch
diff --git a/srcpkgs/grip/patches/werkzeug-3.0.patch b/srcpkgs/grip/patches/werkzeug-3.0.patch
new file mode 100644
index 0000000000000..a45ce81b2548c
--- /dev/null
+++ b/srcpkgs/grip/patches/werkzeug-3.0.patch
@@ -0,0 +1,24 @@
+From 2784eb2c1515f1cdb1554d049d48b3bff0f42085 Mon Sep 17 00:00:00 2001
+From: Joe Esposito <joe@joeyespo.com>
+Date: Wed, 11 Oct 2023 16:34:56 -0400
+Subject: [PATCH] Support Werkzeug 3 by using a default encoding of UTF-8
+
+This fixes the removal of `charset` attribute of requests from https://github.com/pallets/werkzeug/issues/2602
+introduced by Werkzeug 2.3.0 (https://werkzeug.palletsprojects.com/en/3.0.x/changes/#version-2-3-0)
+---
+ grip/app.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/grip/app.py b/grip/app.py
+index f963e9d..16cd5f4 100644
+--- a/grip/app.py
++++ b/grip/app.py
+@@ -397,7 +397,7 @@ def render(self, route=None):
+ route = '/'
+ with self.test_client() as c:
+ response = c.get(route, follow_redirects=True)
+- encoding = response.charset
++ encoding = getattr(response, 'charset', 'utf-8')
+ return response.data.decode(encoding)
+
+ def run(self, host=None, port=None, debug=None, use_reloader=None,
diff --git a/srcpkgs/grip/template b/srcpkgs/grip/template
index 8eb29d2fa7210..0cab8751fe84a 100644
--- a/srcpkgs/grip/template
+++ b/srcpkgs/grip/template
@@ -1,7 +1,7 @@
# Template file for 'grip'
pkgname=grip
version=4.6.1
-revision=3
+revision=4
build_style=python3-module
hostmakedepends="python3-setuptools"
depends="python3-docopt python3-Flask python3-Markdown python3-path-and-address
From ac3fdc4807591a1fb4cc660accdc502727d00edf Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 16 Oct 2023 15:50:49 -0400
Subject: [PATCH 15/17] python3-Flask-Login: patch for Flask and Werzeug 3
---
.../patches/00.flask-3.0.patch | 46 +++
.../patches/01.flask-3.0.patch | 317 ++++++++++++++++++
srcpkgs/python3-Flask-Login/template | 5 +-
3 files changed, 366 insertions(+), 2 deletions(-)
create mode 100644 srcpkgs/python3-Flask-Login/patches/00.flask-3.0.patch
create mode 100644 srcpkgs/python3-Flask-Login/patches/01.flask-3.0.patch
diff --git a/srcpkgs/python3-Flask-Login/patches/00.flask-3.0.patch b/srcpkgs/python3-Flask-Login/patches/00.flask-3.0.patch
new file mode 100644
index 0000000000000..9c445f769c468
--- /dev/null
+++ b/srcpkgs/python3-Flask-Login/patches/00.flask-3.0.patch
@@ -0,0 +1,46 @@
+From 7b170bf4e5e0240fe084166c9ca6ec4fba258dcd Mon Sep 17 00:00:00 2001
+From: Hiromasa Ihara <iharahiromasa@gmail.com>
+Date: Mon, 2 Oct 2023 20:14:40 +0900
+Subject: [PATCH] fix: avoid DeprecationWarning 'werkzeug.urls.url_decode' is
+ deprecated (#746)
+
+---
+ src/flask_login/utils.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/flask_login/utils.py b/src/flask_login/utils.py
+index c3c46846..45a7e279 100644
+--- a/src/flask_login/utils.py
++++ b/src/flask_login/utils.py
+@@ -3,6 +3,8 @@
+ from hashlib import sha512
+ from urllib.parse import urlparse
+ from urllib.parse import urlunparse
++from urllib.parse import parse_qs
++from urllib.parse import urlencode
+
+ from flask import current_app
+ from flask import g
+@@ -11,8 +13,6 @@
+ from flask import session
+ from flask import url_for
+ from werkzeug.local import LocalProxy
+-from werkzeug.urls import url_decode
+-from werkzeug.urls import url_encode
+
+ from .config import COOKIE_NAME
+ from .config import EXEMPT_METHODS
+@@ -123,11 +123,11 @@ def login_url(login_view, next_url=None, next_field="next"):
+ return base
+
+ parsed_result = urlparse(base)
+- md = url_decode(parsed_result.query)
++ md = parse_qs(parsed_result.query)
+ md[next_field] = make_next_param(base, next_url)
+ netloc = current_app.config.get("FORCE_HOST_FOR_REDIRECTS") or parsed_result.netloc
+ parsed_result = parsed_result._replace(
+- netloc=netloc, query=url_encode(md, sort=True)
++ netloc=netloc, query=urlencode(md, doseq=True)
+ )
+ return urlunparse(parsed_result)
+
diff --git a/srcpkgs/python3-Flask-Login/patches/01.flask-3.0.patch b/srcpkgs/python3-Flask-Login/patches/01.flask-3.0.patch
new file mode 100644
index 0000000000000..d2bc485820762
--- /dev/null
+++ b/srcpkgs/python3-Flask-Login/patches/01.flask-3.0.patch
@@ -0,0 +1,317 @@
+From 7d98a49bc38d0849367b348bfe37a2b689323419 Mon Sep 17 00:00:00 2001
+From: Sha <wangsha@users.noreply.github.com>
+Date: Mon, 2 Oct 2023 07:00:12 -0500
+Subject: [PATCH] flask 3.0 compatibility (#778)
+
+* Werkzeug 3.0 compatible
+
+* python3.7 compatibility
+
+* troubleshooting version compatibility
+
+* update constrain
+
+* package version troubleshooting
+
+* troubleshooting package version
+
+* troubleshoot package version
+
+* package tuning
+
+* troubleshoot package version
+
+* troubleshooting package version
+
+* troubleshoot test cases
+
+* troubleshoot python package version
+
+* Update tox.ini
+
+* version troubleshoot
+
+* version fix
+
+* package version
+
+* package version
+
+* Update setup.py
+
+* Update setup.py
+
+* package version
+
+* package version
+
+* package version
+
+* Update setup.cfg
+
+* version fix
+
+* package version
+
+* package version
+
+* package version
+
+* package version
+
+* deprecate python3.7
+
+* package version
+
+* merge conflicts
+
+* pylint fix
+---
+ .github/workflows/tests.yaml | 4 +-
+ requirements/ci-release.txt | 83 +++++++++------------
+ requirements/ci-tests.in | 5 +-
+ requirements/ci-tests.txt | 61 +++++++++-------
+ requirements/dev.txt | 138 ++++++-----------------------------
+ requirements/docs.txt | 50 +++++++------
+ requirements/style.txt | 25 +++----
+ requirements/tests-min.in | 8 +-
+ requirements/tests-min.txt | 34 ++++-----
+ requirements/tests.in | 6 +-
+ requirements/tests.txt | 28 +++----
+ setup.cfg | 2 +-
+ setup.py | 5 +-
+ src/flask_login/utils.py | 4 +-
+ tests/test_login.py | 26 ++++---
+ tox.ini | 2 +-
+ 16 files changed, 198 insertions(+), 283 deletions(-)
+
+diff --git a/src/flask_login/utils.py b/src/flask_login/utils.py
+index 45a7e279..0fde23f4 100644
+--- a/src/flask_login/utils.py
++++ b/src/flask_login/utils.py
+@@ -1,10 +1,10 @@
+ import hmac
+ from functools import wraps
+ from hashlib import sha512
+-from urllib.parse import urlparse
+-from urllib.parse import urlunparse
+ from urllib.parse import parse_qs
+ from urllib.parse import urlencode
++from urllib.parse import urlparse
++from urllib.parse import urlunparse
+
+ from flask import current_app
+ from flask import g
+diff --git a/tests/test_login.py b/tests/test_login.py
+--- a/tests/test_login.py
++++ b/tests/test_login.py
+@@ -328,7 +328,7 @@
+ def empty_session():
+ return f"modified={session.modified}"
+
+- # This will help us with the possibility of typoes in the tests. Now
++ # This will help us with the possibility of typos in the tests. Now
+ # we shouldn't have to check each response to help us set up state
+ # (such as login pages) to make sure it worked: we will always
+ # get an exception raised (rather than return a 404 response)
+@@ -669,24 +669,17 @@
+ name = self.app.config["REMEMBER_COOKIE_NAME"] = "myname"
+ duration = self.app.config["REMEMBER_COOKIE_DURATION"] = timedelta(days=2)
+ path = self.app.config["REMEMBER_COOKIE_PATH"] = "/mypath"
+- domain = self.app.config["REMEMBER_COOKIE_DOMAIN"] = ".localhost.local"
++ domain = self.app.config["REMEMBER_COOKIE_DOMAIN"] = "localhost.local"
+
+ with self.app.test_client() as c:
+ c.get("/login-notch-remember")
+
+- # TODO: Is there a better way to test this?
+- self.assertIn(
+- domain,
+- c.cookie_jar._cookies,
+- "Custom domain not found as cookie domain",
++ cookie = c.get_cookie(key=name, domain=domain, path=path)
++ self.assertIsNotNone(
++ cookie, "Custom domain, path and name not found in cookies"
+ )
+- domain_cookie = c.cookie_jar._cookies[domain]
+- self.assertIn(path, domain_cookie, "Custom path not found as cookie path")
+- path_cookie = domain_cookie[path]
+- self.assertIn(name, path_cookie, "Custom name not found as cookie name")
+- cookie = path_cookie[name]
+
+- expiration_date = datetime.utcfromtimestamp(cookie.expires)
++ expiration_date = datetime.utcfromtimestamp(cookie.expires.timestamp())
+ expected_date = datetime.utcnow() + duration
+ difference = expected_date - expiration_date
+
+@@ -702,24 +695,17 @@
+ self.app.config["REMEMBER_COOKIE_DURATION"] = 172800
+ duration = timedelta(hours=7)
+ path = self.app.config["REMEMBER_COOKIE_PATH"] = "/mypath"
+- domain = self.app.config["REMEMBER_COOKIE_DOMAIN"] = ".localhost.local"
++ domain = self.app.config["REMEMBER_COOKIE_DOMAIN"] = "localhost.local"
+
+ with self.app.test_client() as c:
+ c.get("/login-notch-remember-custom")
+
+- # TODO: Is there a better way to test this?
+- self.assertIn(
+- domain,
+- c.cookie_jar._cookies,
+- "Custom domain not found as cookie domain",
++ cookie = c.get_cookie(key=name, domain=domain, path=path)
++ self.assertIsNotNone(
++ cookie, "Custom domain, path and name not found in cookies"
+ )
+- domain_cookie = c.cookie_jar._cookies[domain]
+- self.assertIn(path, domain_cookie, "Custom path not found as cookie path")
+- path_cookie = domain_cookie[path]
+- self.assertIn(name, path_cookie, "Custom name not found as cookie name")
+- cookie = path_cookie[name]
+
+- expiration_date = datetime.utcfromtimestamp(cookie.expires)
++ expiration_date = datetime.utcfromtimestamp(cookie.expires.timestamp())
+ expected_date = datetime.utcnow() + duration
+ difference = expected_date - expiration_date
+
+@@ -734,15 +720,15 @@
+ self.app.config["REMEMBER_COOKIE_DURATION"] = 172800
+ duration = timedelta(seconds=172800)
+ name = self.app.config["REMEMBER_COOKIE_NAME"] = "myname"
+- domain = self.app.config["REMEMBER_COOKIE_DOMAIN"] = ".localhost.local"
++ domain = self.app.config["REMEMBER_COOKIE_DOMAIN"] = "localhost.local"
+
+ with self.app.test_client() as c:
+ result = c.get("/login-notch-remember")
+ self.assertEqual(result.status_code, 200)
+
+- cookie = c.cookie_jar._cookies[domain]["/"][name]
++ cookie = c.get_cookie(key=name, domain=domain, path="/")
+
+- expiration_date = datetime.utcfromtimestamp(cookie.expires)
++ expiration_date = datetime.utcfromtimestamp(cookie.expires.timestamp())
+ expected_date = datetime.utcnow() + duration
+ difference = expected_date - expiration_date
+
+@@ -794,25 +780,22 @@
+ self.assertIn(expected_exception_message, str(cm.exception))
+
+ def test_remember_me_refresh_every_request(self):
+- domain = self.app.config["REMEMBER_COOKIE_DOMAIN"] = ".localhost.local"
++ domain = self.app.config["REMEMBER_COOKIE_DOMAIN"] = "localhost.local"
+ path = self.app.config["REMEMBER_COOKIE_PATH"] = "/"
+
+ # No refresh
+ self.app.config["REMEMBER_COOKIE_REFRESH_EACH_REQUEST"] = False
+ with self.app.test_client() as c:
+ c.get("/login-notch-remember")
+- self.assertIn("remember", c.cookie_jar._cookies[domain][path])
+- expiration_date_1 = datetime.utcfromtimestamp(
+- c.cookie_jar._cookies[domain][path]["remember"].expires
+- )
+-
+- self._delete_session(c)
++ cookie = c.get_cookie(key="remember", domain=domain, path=path)
++ self.assertIsNotNone(cookie)
++ expiration_date_1 = datetime.utcfromtimestamp(cookie.expires.timestamp())
+
++ # self._delete_session(c)
+ c.get("/username")
+- self.assertIn("remember", c.cookie_jar._cookies[domain][path])
+- expiration_date_2 = datetime.utcfromtimestamp(
+- c.cookie_jar._cookies[domain][path]["remember"].expires
+- )
++ cookie = c.get_cookie(key="remember", domain=domain, path=path)
++ self.assertIsNotNone(cookie)
++ expiration_date_2 = datetime.utcfromtimestamp(cookie.expires.timestamp())
+ self.assertEqual(expiration_date_1, expiration_date_2)
+
+ # With refresh (mock datetime's `utcnow`)
+@@ -820,22 +803,24 @@
+ self.app.config["REMEMBER_COOKIE_REFRESH_EACH_REQUEST"] = True
+ now = datetime.utcnow()
+ mock_dt.utcnow = Mock(return_value=now)
+-
++ mock_utcnow1 = mock_dt.utcnow
+ with self.app.test_client() as c:
+ c.get("/login-notch-remember")
+- self.assertIn("remember", c.cookie_jar._cookies[domain][path])
++ cookie = c.get_cookie(key="remember", domain=domain, path=path)
+ expiration_date_1 = datetime.utcfromtimestamp(
+- c.cookie_jar._cookies[domain][path]["remember"].expires
++ cookie.expires.timestamp()
+ )
+ self.assertIsNotNone(expiration_date_1)
+
+- self._delete_session(c)
++ # self._delete_session(c)
+
+ mock_dt.utcnow = Mock(return_value=now + timedelta(seconds=1))
++ mock_utcnow2 = mock_dt.utcnow
++ self.assertNotEqual(mock_utcnow1, mock_utcnow2)
+ c.get("/username")
+- self.assertIn("remember", c.cookie_jar._cookies[domain][path])
++ cookie = c.get_cookie(key="remember", domain=domain, path=path)
+ expiration_date_2 = datetime.utcfromtimestamp(
+- c.cookie_jar._cookies[domain][path]["remember"].expires
++ cookie.expires.timestamp()
+ )
+ self.assertIsNotNone(expiration_date_2)
+ self.assertNotEqual(expiration_date_1, expiration_date_2)
+@@ -1016,7 +1001,7 @@
+ c.get("/login-notch-remember")
+ with c.session_transaction() as sess:
+ sess["_user_id"] = None
+- c.set_cookie(domain, self.remember_cookie_name, "foo")
++ c.set_cookie(self.remember_cookie_name, "foo", domain=domain)
+ result = c.get("/username")
+ self.assertEqual("Anonymous", result.data.decode("utf-8"))
+
+@@ -1315,7 +1300,7 @@
+ pass
+ return USERS.get(user_id)
+
+- # This will help us with the possibility of typoes in the tests. Now
++ # This will help us with the possibility of typos in the tests. Now
+ # we shouldn't have to check each response to help us set up state
+ # (such as login pages) to make sure it worked: we will always
+ # get an exception raised (rather than return a 404 response)
+@@ -1426,9 +1411,10 @@
+ result = login_url("https://auth.localhost/login", PROTECTED)
+ self.assertEqual(expected, result)
+
++ url = login_url("/login?affil=cgnu", PROTECTED)
+ self.assertEqual(
+ "/login?affil=cgnu&next=%2Fprotected",
+- login_url("/login?affil=cgnu", PROTECTED),
++ url,
+ )
+
+ def test_login_url_generation_with_view(self):
+@@ -1590,7 +1576,7 @@
+ def load_user(user_id):
+ return USERS[str(user_id)]
+
+- # This will help us with the possibility of typoes in the tests. Now
++ # This will help us with the possibility of typos in the tests. Now
+ # we shouldn't have to check each response to help us set up state
+ # (such as login pages) to make sure it worked: we will always
+ # get an exception raised (rather than return a 404 response)
+@@ -1646,7 +1632,7 @@
+ def load_user(user_id):
+ return USERS[str(user_id)]
+
+- # This will help us with the possibility of typoes in the tests. Now
++ # This will help us with the possibility of typos in the tests. Now
+ # we shouldn't have to check each response to help us set up state
+ # (such as login pages) to make sure it worked: we will always
+ # get an exception raised (rather than return a 404 response)
+@@ -1742,7 +1728,7 @@
+ def load_user(user_id):
+ return USERS[int(user_id)]
+
+- # This will help us with the possibility of typoes in the tests. Now
++ # This will help us with the possibility of typos in the tests. Now
+ # we shouldn't have to check each response to help us set up state
+ # (such as login pages) to make sure it worked: we will always
+ # get an exception raised (rather than return a 404 response)
diff --git a/srcpkgs/python3-Flask-Login/template b/srcpkgs/python3-Flask-Login/template
index 1e1989fcbb72c..c1b662043f44b 100644
--- a/srcpkgs/python3-Flask-Login/template
+++ b/srcpkgs/python3-Flask-Login/template
@@ -1,11 +1,12 @@
# Template file for 'python3-Flask-Login'
pkgname=python3-Flask-Login
version=0.6.2
-revision=3
+revision=4
build_style=python3-module
+make_check_args="-p no:warnings"
hostmakedepends="python3-setuptools"
depends="python3-Flask"
-checkdepends="python3-Werkzeug python3-Flask"
+checkdepends="python3-semanticversion python3-pytest python3-asgiref $depends"
short_desc="User session management for Flask (Python3)"
maintainer="pulux <pulux@pf4sh.de>"
license="MIT"
From e8fac95f6afa98aff2f8f7ebcf4a857a5daa6fad Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 17 Oct 2023 08:11:35 -0400
Subject: [PATCH 16/17] New package: python3-flasgger-0.9.7.1
---
srcpkgs/python3-flasgger/template | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 srcpkgs/python3-flasgger/template
diff --git a/srcpkgs/python3-flasgger/template b/srcpkgs/python3-flasgger/template
new file mode 100644
index 0000000000000..2cf6a5c5d440c
--- /dev/null
+++ b/srcpkgs/python3-flasgger/template
@@ -0,0 +1,22 @@
+# Template file for 'python3-flasgger'
+pkgname=python3-flasgger
+version=0.9.7.1
+revision=1
+build_style=python3-module
+# Examples require unpackaged "flex"
+make_check_args="--ignore tests/test_examples.py"
+make_check_target="tests"
+hostmakedepends="python3-setuptools"
+depends="python3-Flask python3-yaml python3-jsonschema python3-mistune
+ python3-packaging python3-packaging python3-six"
+checkdepends="python3-pytest $depends"
+short_desc="OpenAPI specs and Swagger UI for Flask APIs"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="http://flasgger.pythonanywhere.com/"
+distfiles="${PYPI_SITE}/f/flasgger/flasgger-${version}.tar.gz"
+checksum=ca098e10bfbb12f047acc6299cc70a33851943a746e550d86e65e60d4df245fb
+
+post_install() {
+ vlicense LICENSE
+}
From 217a774474cbff34a9972dec4771bc65a7aeb8c4 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 17 Oct 2023 08:23:52 -0400
Subject: [PATCH 17/17] python3-httpbin: update to 0.10.1.
---
srcpkgs/python3-httpbin/patches/brotli.patch | 28 +++++
.../python3-httpbin/patches/flask-3.0.patch | 110 ++++++++++++++++++
.../patches/werkzeug-2.1.patch | 61 ----------
srcpkgs/python3-httpbin/template | 16 +--
4 files changed, 146 insertions(+), 69 deletions(-)
create mode 100644 srcpkgs/python3-httpbin/patches/brotli.patch
create mode 100644 srcpkgs/python3-httpbin/patches/flask-3.0.patch
delete mode 100644 srcpkgs/python3-httpbin/patches/werkzeug-2.1.patch
diff --git a/srcpkgs/python3-httpbin/patches/brotli.patch b/srcpkgs/python3-httpbin/patches/brotli.patch
new file mode 100644
index 0000000000000..534164cc5088f
--- /dev/null
+++ b/srcpkgs/python3-httpbin/patches/brotli.patch
@@ -0,0 +1,28 @@
+diff -ur python3-httpbin-0.10.1.orig/httpbin/filters.py python3-httpbin-0.10.1/httpbin/filters.py
+--- python3-httpbin-0.10.1.orig/httpbin/filters.py 2023-10-17 08:12:56.814139485 -0400
++++ python3-httpbin-0.10.1/httpbin/filters.py 2023-10-17 08:14:20.979514500 -0400
+@@ -10,7 +10,10 @@
+ import gzip as gzip2
+ import zlib
+
+-import brotlicffi as _brotli
++try:
++ import brotlicffi as _brotli
++except ImportError:
++ import brotli as _brotli
+
+ from six import BytesIO
+ from decimal import Decimal
+diff -ur python3-httpbin-0.10.1.orig/pyproject.toml python3-httpbin-0.10.1/pyproject.toml
+--- python3-httpbin-0.10.1.orig/pyproject.toml 2023-10-17 08:12:56.816139494 -0400
++++ python3-httpbin-0.10.1/pyproject.toml 2023-10-17 08:13:46.165359377 -0400
+@@ -32,7 +32,8 @@
+ ]
+ dependencies = [
+ "Flask",
+- "brotlicffi",
++ "brotli; platform_python_implementation == 'CPython'",
++ "brotlicffi; platform_python_implementation != 'CPython'",
+ "decorator",
+ "flasgger",
+ 'greenlet < 3.0; python_version<"3.12"',
diff --git a/srcpkgs/python3-httpbin/patches/flask-3.0.patch b/srcpkgs/python3-httpbin/patches/flask-3.0.patch
new file mode 100644
index 0000000000000..70b98e891411b
--- /dev/null
+++ b/srcpkgs/python3-httpbin/patches/flask-3.0.patch
@@ -0,0 +1,110 @@
+From c1d9e33049263fed3cb27806a97f094acc350905 Mon Sep 17 00:00:00 2001
+From: Nate Prewitt <nate.prewitt@gmail.com>
+Date: Thu, 12 Oct 2023 08:30:42 -0700
+Subject: [PATCH] Support Flask 3.0 (#29)
+
+---
+ httpbin/core.py | 8 +++-----
+ httpbin/helpers.py | 21 ++++++++++++++++-----
+ pyproject.toml | 3 +--
+ 3 files changed, 20 insertions(+), 12 deletions(-)
+
+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/pyproject.toml b/pyproject.toml
+index 020457ec..9454e569 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -31,15 +31,14 @@ classifiers = [
+ "Programming Language :: Python :: 3.12",
+ ]
+ dependencies = [
+- "Flask",
++ "flask >= 2.2.4",
+ "brotli; platform_python_implementation == 'CPython'",
+ "brotlicffi; platform_python_implementation != 'CPython'",
+ "decorator",
+ "flasgger",
+ 'greenlet < 3.0; python_version<"3.12"',
+ 'greenlet >= 3.0.0a1; python_version>="3.12.0rc0"',
+ 'importlib-metadata; python_version<"3.8"',
+- "werkzeug >= 0.14.1",
+ "six",
+ ]
+
diff --git a/srcpkgs/python3-httpbin/patches/werkzeug-2.1.patch b/srcpkgs/python3-httpbin/patches/werkzeug-2.1.patch
deleted file mode 100644
index 4ac566edbf032..0000000000000
--- a/srcpkgs/python3-httpbin/patches/werkzeug-2.1.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From df733e90032589861d93be78e22dbafc2f1dbea4 Mon Sep 17 00:00:00 2001
-From: Danil Shein <dshein@altlinux.org>
-Date: Mon, 26 Sep 2022 15:26:00 +0300
-Subject: [PATCH] fix Werkzeug 2.1.x compatibility
-
-- fix httpbin/core.py: use Responce class instead of BaseResponse
-see: https://github.com/pallets/werkzeug/pull/2276
-- fix tests: TestClient doesn't provide 'Content-Length' header anymore
-see: https://github.com/pallets/werkzeug/issues/2347
----
- httpbin/core.py | 7 +++++--
- test_httpbin.py | 4 ++--
- 2 files changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/httpbin/core.py b/httpbin/core.py
-index 305c9882..d5c89eed 100644
---- a/httpbin/core.py
-+++ b/httpbin/core.py
-@@ -29,7 +29,10 @@
- from six.moves import range as xrange
- from werkzeug.datastructures import WWWAuthenticate, MultiDict
- from werkzeug.http import http_date
--from werkzeug.wrappers import BaseResponse
-+try:
-+ from werkzeug.wrappers import Response
-+except ImportError:
-+ from werkzeug.wrappers import BaseResponse as Response
- from werkzeug.http import parse_authorization_header
- from flasgger import Swagger, NO_SANITIZER
-
-@@ -77,7 +80,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/test_httpbin.py b/test_httpbin.py
-index b7104ffc..87305ae6 100755
---- a/test_httpbin.py
-+++ b/test_httpbin.py
-@@ -148,7 +148,7 @@ 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']['Content-Length'], '0')
- self.assertEqual(data['headers']['User-Agent'], 'test')
- # self.assertEqual(data['origin'], None)
- self.assertEqual(data['url'], 'http://localhost/get')
-@@ -162,7 +162,7 @@ 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['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/srcpkgs/python3-httpbin/template b/srcpkgs/python3-httpbin/template
index e74543a67fc5b..e6e8fc9bbd1bf 100644
--- a/srcpkgs/python3-httpbin/template
+++ b/srcpkgs/python3-httpbin/template
@@ -1,18 +1,18 @@
# Template file for 'python3-httpbin'
pkgname=python3-httpbin
-version=0.7.0
-revision=4
-build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-Flask python3-decorator python3-six python3-Brotli
- python3-raven python3-blinker"
+version=0.10.1
+revision=1
+build_style=python3-pep517
+hostmakedepends="python3-setuptools python3-wheel"
+depends="python3-Flask python3-Brotli python3-decorator python3-flasgger
+ python3-greenlet python3-six"
checkdepends="python3-pytest $depends"
short_desc="HTTP Request & Response Service"
maintainer="Michal Vasilek <michal@vasilek.cz>"
license="ISC"
-homepage="https://github.com/postmanlabs/httpbin"
+homepage="https://github.com/psf/httpbin"
distfiles="${PYPI_SITE}/h/httpbin/httpbin-${version}.tar.gz"
-checksum=cbb37790c91575f4f15757f42ad41d9f729eb227d5edbe89e4ec175486db8dfa
+checksum=7b8596beb0e75a7b653c39d1f3cf263d6d5c476d29e1df6f7bb2b70bf9f06a3d
post_install() {
vlicense LICENSE
next prev parent reply other threads:[~2023-10-17 12:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-16 20:23 [PR PATCH] " ahesford
2023-10-16 20:37 ` [PR PATCH] [Updated] " ahesford
2023-10-17 12:24 ` ahesford [this message]
2023-10-17 14:04 ` ahesford
2023-10-17 14:14 ` ahesford
2023-10-17 14:20 ` [PR PATCH] [Updated] " ahesford
2023-10-24 13:35 ` [PR PATCH] [Closed]: " ahesford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231017122404.R4jj4ZpPvWAJGNAhdOafuHak--cRo-AEbqECz8zovr4@z \
--to=ahesford@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).