* [PR PATCH] [WIP] Flask: update to 3.0, clean up stale dependants
@ 2023-10-16 20:23 ahesford
2023-10-16 20:37 ` [PR PATCH] [Updated] " ahesford
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: ahesford @ 2023-10-16 20:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1670 bytes --]
There is a new 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
- [ ] OpenLP
`python3-SQLAlchemy: cannot import name 'relation' from 'sqlalchemy.orm'`
- [ ] 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-SQLAlchemy
- [x] python3-Flask-WTF
- [ ] python3-httpbin
`python3-Werkzeug: cannot import name 'parse_authorization_header' from 'werkzeug.http'`
- [ ] voltron
### Werkzeug Dependants
- [ ] python3-openapi-core
- [ ] python3-pytest-httpserver
- [ ] python3-pytest-localserver
- [ ] python3-quart
## Removed Packages
- python3-Flask-User
- python3-Flask-Mail
- python3-Flask-Script
- python3-Flask-OAuthlib
- python3-Flask-Assets
- 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: 42436 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 05b3fbe2b95e6208cedb02a76c37e9a706801fb4 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 06/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 bd630493b598f..73e0558d20b98 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -615,6 +615,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 7698ed5cf479ae5e5895920a9c725ac75c702a21 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 07/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 84aa04a623c18171d924840a2b7ef1366b72c7b2 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 08/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 c2274032527ff4cb29e57298671478a73dfba6d0 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 09/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 a15d991e227e5fee593d651b9836e9ac5451adfb 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 10/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 e7a1b5b3bd0197c86ad226496ce2914aff5bc145 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 16 Oct 2023 11:07:19 -0400
Subject: [PATCH 11/17] python3-SQLAlchemy: update to 2.0.22.
---
srcpkgs/python3-SQLAlchemy/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/python3-SQLAlchemy/template b/srcpkgs/python3-SQLAlchemy/template
index 5bdbe7c35f67a..8d60612e12065 100644
--- a/srcpkgs/python3-SQLAlchemy/template
+++ b/srcpkgs/python3-SQLAlchemy/template
@@ -1,7 +1,7 @@
# Template file for 'python3-SQLAlchemy'
pkgname=python3-SQLAlchemy
-version=1.3.18
-revision=6
+version=2.0.22
+revision=1
build_style=python3-module
hostmakedepends="python3-setuptools"
makedepends="python3-devel"
@@ -12,7 +12,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://www.sqlalchemy.org"
distfiles="${PYPI_SITE}/S/SQLAlchemy/SQLAlchemy-${version}.tar.gz"
-checksum=da2fb75f64792c1fc64c82313a00c728a7c301efe6a60b7a9fe35b16b4368ce7
+checksum=5434cc601aa17570d79e5377f5fd45ff92f9379e2abed0be5e8c2fba8d353d2b
make_check=no # FIXME
post_install() {
From adbbccc21e216e0a77b636cb09d2c1eee3b37d60 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 16 Oct 2023 11:32:13 -0400
Subject: [PATCH 12/17] python3-SQLAlchemy: update to 2.0.22.
---
srcpkgs/python3-SQLAlchemy/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/python3-SQLAlchemy/template b/srcpkgs/python3-SQLAlchemy/template
index 8d60612e12065..272d828beba84 100644
--- a/srcpkgs/python3-SQLAlchemy/template
+++ b/srcpkgs/python3-SQLAlchemy/template
@@ -3,17 +3,16 @@ pkgname=python3-SQLAlchemy
version=2.0.22
revision=1
build_style=python3-module
-hostmakedepends="python3-setuptools"
+hostmakedepends="python3-setuptools python3-Cython"
makedepends="python3-devel"
-depends="python3"
-checkdepends="python3-pytest-xdist"
+depends="python3-typing_extensions"
+checkdepends="python3-pytest-xdist python3-mypy $depends"
short_desc="SQL Toolkit and Object Relational Mapper for Python3"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://www.sqlalchemy.org"
distfiles="${PYPI_SITE}/S/SQLAlchemy/SQLAlchemy-${version}.tar.gz"
checksum=5434cc601aa17570d79e5377f5fd45ff92f9379e2abed0be5e8c2fba8d353d2b
-make_check=no # FIXME
post_install() {
vlicense LICENSE
From e3ea85d3ac0cf1ed30be10293632d1731c31fbc0 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 16 Oct 2023 11:38:08 -0400
Subject: [PATCH 13/17] python3-Flask-SQLAlchemy: update to 3.1.1.
---
srcpkgs/python3-Flask-SQLAlchemy/template | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/srcpkgs/python3-Flask-SQLAlchemy/template b/srcpkgs/python3-Flask-SQLAlchemy/template
index d2ab61d9fb7e2..a9298b430fd2d 100644
--- a/srcpkgs/python3-Flask-SQLAlchemy/template
+++ b/srcpkgs/python3-Flask-SQLAlchemy/template
@@ -1,17 +1,19 @@
# Template file for 'python3-Flask-SQLAlchemy'
pkgname=python3-Flask-SQLAlchemy
-version=2.5.1
-revision=4
-build_style=python3-module
-hostmakedepends="python3-setuptools"
+version=3.1.1
+revision=1
+build_style=python3-pep517
+# datetime DeprecationWarnings trigger test failures
+make_check_args="-p no:warnings"
+hostmakedepends="python3-flit_core"
depends="python3-Flask python3-SQLAlchemy"
-checkdepends="$depends"
+checkdepends="python3-pytest-xdist python3-typing_extensions $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
+homepage="https://flask-sqlalchemy.palletsprojects.com/"
+distfiles="https://github.com/pallets-eco/flask-sqlalchemy/archive/${version}.tar.gz"
+checksum=1989afdf046a935bd1ab98dbd9a2d68e5ba1c69d0cd3e3646df0876bf8d997d3
post_install() {
vlicense LICENSE.rst
From f208cc9299817aad3a8b8d5ab08b80ecd4aea0d4 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 14/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 d30c4b935095161130d812d1d383244e5d278146 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 15/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 99bb43cddeebfd7ecf367472746d6f087076c452 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 16/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 d6bf974582224bc4636ab981568408962d085dd4 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 17/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"
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Flask: update to 3.0, clean up stale dependants
2023-10-16 20:23 [PR PATCH] [WIP] Flask: update to 3.0, clean up stale dependants ahesford
@ 2023-10-16 20:37 ` ahesford
2023-10-17 12:24 ` ahesford
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ahesford @ 2023-10-16 20:37 UTC (permalink / raw)
To: ml
[-- 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
- [ ] python3-openapi-core
- [ ] python3-pytest-httpserver
- [ ] 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: 40352 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/15] 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/15] 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/15] 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/15] 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/15] 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/15] 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/15] 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/15] 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/15] 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/15] 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/15] 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/15] 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/15] 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/15] 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/15] 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"
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Flask: update to 3.0, clean up stale dependants
2023-10-16 20:23 [PR PATCH] [WIP] Flask: update to 3.0, clean up stale dependants ahesford
2023-10-16 20:37 ` [PR PATCH] [Updated] " ahesford
@ 2023-10-17 12:24 ` ahesford
2023-10-17 14:04 ` ahesford
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ahesford @ 2023-10-17 12:24 UTC (permalink / raw)
To: ml
[-- 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Flask: update to 3.0, clean up stale dependants
2023-10-16 20:23 [PR PATCH] [WIP] Flask: update to 3.0, clean up stale dependants ahesford
2023-10-16 20:37 ` [PR PATCH] [Updated] " ahesford
2023-10-17 12:24 ` ahesford
@ 2023-10-17 14:04 ` ahesford
2023-10-17 14:14 ` ahesford
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ahesford @ 2023-10-17 14:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1671 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
- [x] python3-httpbin
`python3-Werkzeug: cannot import name 'parse_authorization_header' from 'werkzeug.http'`
- [ ] voltron (test framework uncertain)
### Werkzeug Dependants
- [x] python3-openapi-core
- [x] python3-pytest-httpserver
- [x] python3-pytest-localserver
- [x] 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: 68375 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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/18] 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
From d358f2e2e85ded268b5eeb2fda4748657bbb235d Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 17 Oct 2023 10:04:50 -0400
Subject: [PATCH 18/18] python3-quart: update to 0.19.3.
---
.../python3-quart/patches/blinker-1.6.patch | 360 ------------------
srcpkgs/python3-quart/template | 13 +-
2 files changed, 7 insertions(+), 366 deletions(-)
delete mode 100644 srcpkgs/python3-quart/patches/blinker-1.6.patch
diff --git a/srcpkgs/python3-quart/patches/blinker-1.6.patch b/srcpkgs/python3-quart/patches/blinker-1.6.patch
deleted file mode 100644
index f5b56b3c8bab7..0000000000000
--- a/srcpkgs/python3-quart/patches/blinker-1.6.patch
+++ /dev/null
@@ -1,360 +0,0 @@
-From c9b555ff284bb54a45adab44c8e6d78ab8713da0 Mon Sep 17 00:00:00 2001
-From: pgjones <philip.graham.jones@googlemail.com>
-Date: Sun, 9 Apr 2023 16:57:26 +0100
-Subject: [PATCH] Upgrade to blinker 1.6
-
-This allows the custom signal implementation to be removed and for
-sync signal receivers to be supported in the same manner as sync route
-handlers.
----
- pyproject.toml | 2 +-
- src/quart/app.py | 38 +++++++++++++++++++++-----------
- src/quart/asgi.py | 4 ++--
- src/quart/ctx.py | 4 ++--
- src/quart/helpers.py | 5 +++--
- src/quart/signals.py | 48 ++---------------------------------------
- src/quart/templating.py | 16 ++++++++++----
- tests/test_signals.py | 37 -------------------------------
- 8 files changed, 48 insertions(+), 106 deletions(-)
- delete mode 100644 tests/test_signals.py
-
-diff --git a/pyproject.toml b/pyproject.toml
-index da35a647..9d4876a0 100644
---- a/pyproject.toml
-+++ b/pyproject.toml
-@@ -27,7 +27,7 @@
- [tool.poetry.dependencies]
- python = ">=3.7"
- aiofiles = "*"
--blinker = "<1.6"
-+blinker = ">=1.6"
- click = ">=8.0.0"
- hypercorn = ">=0.11.2"
- importlib_metadata = { version = "*", python = "<3.10" }
-diff --git a/src/quart/app.py b/src/quart/app.py
-index 8ee111a7..e3d3cc0f 100644
---- a/src/quart/app.py
-+++ b/src/quart/app.py
-@@ -1113,7 +1113,9 @@
- By default this switches the error response to a 500 internal
- server error.
- """
-- await got_request_exception.send(self, exception=error)
-+ await got_request_exception.send_async(
-+ self, _sync_wrapper=self.ensure_async, exception=error
-+ )
-
- self.log_exception(sys.exc_info())
-
-@@ -1138,7 +1140,9 @@
-
- By default this logs the exception and then re-raises it.
- """
-- await got_websocket_exception.send(self, exception=error)
-+ await got_websocket_exception.send_async(
-+ self, _sync_wrapper=self.ensure_async, exception=error
-+ )
-
- self.log_exception(sys.exc_info())
-
-@@ -1245,7 +1249,7 @@
- for function in self.teardown_request_funcs[name]:
- await self.ensure_async(function)(exc)
-
-- await request_tearing_down.send(self, exc=exc)
-+ await request_tearing_down.send_async(self, _sync_wrapper=self.ensure_async, exc=exc)
-
- async def do_teardown_websocket(
- self, exc: Optional[BaseException], websocket_context: Optional[WebsocketContext] = None
-@@ -1263,13 +1267,13 @@
- for function in self.teardown_websocket_funcs[name]:
- await self.ensure_async(function)(exc)
-
-- await websocket_tearing_down.send(self, exc=exc)
-+ await websocket_tearing_down.send_async(self, _sync_wrapper=self.ensure_async, exc=exc)
-
- async def do_teardown_appcontext(self, exc: Optional[BaseException]) -> None:
- """Teardown the app (context), calling the teardown functions."""
- for function in self.teardown_appcontext_funcs:
- await self.ensure_async(function)(exc)
-- await appcontext_tearing_down.send(self, exc=exc)
-+ await appcontext_tearing_down.send_async(self, _sync_wrapper=self.ensure_async, exc=exc)
-
- def app_context(self) -> AppContext:
- """Create and return an app context.
-@@ -1558,7 +1562,9 @@
- self.background_tasks.add(task)
-
- async def handle_background_exception(self, error: Exception) -> None:
-- await got_background_exception.send(self, exception=error)
-+ await got_background_exception.send_async(
-+ self, _sync_wrapper=self.ensure_async, exception=error
-+ )
-
- self.log_exception(sys.exc_info())
-
-@@ -1666,7 +1672,7 @@
- omits this argument.
- """
- await self.try_trigger_before_first_request_functions()
-- await request_started.send(self)
-+ await request_started.send_async(self, _sync_wrapper=self.ensure_async)
- try:
- result = await self.preprocess_request(request_context)
- if result is None:
-@@ -1733,7 +1739,9 @@
- response = await self.make_response(result)
- try:
- response = await self.process_response(response, request_context)
-- await request_finished.send(self, response=response)
-+ await request_finished.send_async(
-+ self, _sync_wrapper=self.ensure_async, response=response
-+ )
- except Exception:
- if not from_error_handler:
- raise
-@@ -1787,7 +1795,7 @@
- the Flask convention.
- """
- await self.try_trigger_before_first_request_functions()
-- await websocket_started.send(self)
-+ await websocket_started.send_async(self, _sync_wrapper=self.ensure_async)
- try:
- result = await self.preprocess_websocket(websocket_context)
- if result is None:
-@@ -1857,7 +1865,9 @@
- response = None
- try:
- response = await self.postprocess_websocket(response, websocket_context)
-- await websocket_finished.send(self, response=response)
-+ await websocket_finished.send_async(
-+ self, _sync_wrapper=self.ensure_async, response=response
-+ )
- except Exception:
- if not from_error_handler:
- raise
-@@ -1937,7 +1947,9 @@
- for gen in self.while_serving_gens:
- await gen.__anext__()
- except Exception as error:
-- await got_serving_exception.send(self, exception=error)
-+ await got_serving_exception.send_async(
-+ self, _sync_wrapper=self.ensure_async, exception=error
-+ )
- self.log_exception(sys.exc_info())
- raise
-
-@@ -1954,7 +1966,9 @@
- else:
- raise RuntimeError("While serving generator didn't terminate")
- except Exception as error:
-- await got_serving_exception.send(self, exception=error)
-+ await got_serving_exception.send_async(
-+ self, _sync_wrapper=self.ensure_async, exception=error
-+ )
- self.log_exception(sys.exc_info())
- raise
-
-diff --git a/src/quart/asgi.py b/src/quart/asgi.py
-index ba266dc3..2725af8d 100644
---- a/src/quart/asgi.py
-+++ b/src/quart/asgi.py
-@@ -169,7 +169,7 @@ async def handle_messages(self, receive: ASGIReceiveCallable) -> None:
- event = await receive()
- if event["type"] == "websocket.receive":
- message = event.get("bytes") or event["text"]
-- await websocket_received.send(message)
-+ await websocket_received.send_async(message)
- await self.queue.put(message)
- elif event["type"] == "websocket.disconnect":
- return
-@@ -261,7 +261,7 @@ async def send_data(self, send: ASGISendCallable, data: AnyStr) -> None:
- await send({"type": "websocket.send", "bytes": None, "text": data})
- else:
- await send({"type": "websocket.send", "bytes": data, "text": None})
-- await websocket_sent.send(data)
-+ await websocket_sent.send_async(data)
-
- async def accept_connection(
- self, send: ASGISendCallable, headers: Headers, subprotocol: Optional[str]
-diff --git a/src/quart/ctx.py b/src/quart/ctx.py
-index 806aff74..c92ba92e 100644
---- a/src/quart/ctx.py
-+++ b/src/quart/ctx.py
-@@ -240,7 +240,7 @@ def copy(self) -> "AppContext":
-
- async def push(self) -> None:
- self._cv_tokens.append(_cv_app.set(self))
-- await appcontext_pushed.send(self.app)
-+ await appcontext_pushed.send_async(self.app, _sync_wrapper=self.app.ensure_async)
-
- async def pop(self, exc: Optional[BaseException] = _sentinel) -> None: # type: ignore
- try:
-@@ -255,7 +255,7 @@ async def pop(self, exc: Optional[BaseException] = _sentinel) -> None: # type:
- if ctx is not self:
- raise AssertionError(f"Popped wrong app context. ({ctx!r} instead of {self!r})")
-
-- await appcontext_popped.send(self.app)
-+ await appcontext_popped.send_async(self.app, _sync_wrapper=self.app.ensure_async)
-
- async def __aenter__(self) -> "AppContext":
- await self.push()
-diff --git a/src/quart/helpers.py b/src/quart/helpers.py
-index c848a72f..0491acfe 100644
---- a/src/quart/helpers.py
-+++ b/src/quart/helpers.py
-@@ -113,8 +113,9 @@ async def login():
- flashes = session.get("_flashes", [])
- flashes.append((category, message))
- session["_flashes"] = flashes
-- await message_flashed.send(
-- current_app._get_current_object(), message=message, category=category # type: ignore
-+ app = current_app._get_current_object() # type: ignore
-+ await message_flashed.send_async(
-+ app, _sync_wrapper=app.ensure_async, message=message, category=category
- )
-
-
-diff --git a/src/quart/signals.py b/src/quart/signals.py
-index a23b902d..de5e9fcc 100644
---- a/src/quart/signals.py
-+++ b/src/quart/signals.py
-@@ -1,54 +1,10 @@
- from __future__ import annotations
-
--from functools import wraps
--from typing import Any, Callable, List, Optional, Tuple
--
--from blinker import NamedSignal, Namespace # type: ignore[import]
--
--from .utils import is_coroutine_function
-+from blinker import Namespace
-
- signals_available = True
-
--
--class AsyncNamedSignal(NamedSignal): # type: ignore
-- def __init__(self, name: str, doc: Optional[str] = None) -> None:
-- super().__init__(name, doc)
--
-- async def send(self, *sender: Any, **kwargs: Any) -> List[Tuple[Callable, Any]]:
-- coroutines = super().send(*sender, **kwargs)
-- result: List[Tuple[Callable, Any]] = []
-- for handler, coroutine in coroutines:
-- result.append((handler, await coroutine))
-- return result
--
-- def connect(self, receiver: Callable, *args: Any, **kwargs: Any) -> Callable:
-- if is_coroutine_function(receiver):
-- handler = receiver
-- else:
--
-- @wraps(receiver)
-- async def handler(*a: Any, **k: Any) -> Any:
-- return receiver(*a, **k)
--
-- if handler is not receiver and kwargs.get("weak", True):
-- # Blinker will take a weakref to handler, which goes out
-- # of scope with this method as it is a wrapper around the
-- # receiver. Whereas we'd want it to go out of scope when
-- # receiver does. Therefore we can place it on the receiver
-- # function. (Ideally I'll think of a better way).
-- receiver._quart_wrapper_func = handler # type: ignore
-- return super().connect(handler, *args, **kwargs)
--
--
--class AsyncNamespace(Namespace): # type: ignore
-- def signal(self, name: str, doc: Optional[str] = None) -> AsyncNamedSignal:
-- try:
-- return self[name]
-- except KeyError:
-- return self.setdefault(name, AsyncNamedSignal(name, doc))
--
--
--_signals = AsyncNamespace()
-+_signals = Namespace()
-
- #: Called before a template is rendered, connection functions
- # should have a signature of Callable[[Quart, Template, dict], None]
-diff --git a/src/quart/templating.py b/src/quart/templating.py
-index 416c2eef..5c07d132 100644
---- a/src/quart/templating.py
-+++ b/src/quart/templating.py
-@@ -116,9 +116,13 @@ async def render_template_string(source: str, **context: Any) -> str:
-
-
- async def _render(template: Template, context: dict, app: "Quart") -> str:
-- await before_render_template.send(app, template=template, context=context)
-+ await before_render_template.send_async(
-+ app, _sync_wrapper=app.ensure_async, template=template, context=context
-+ )
- rendered_template = await template.render_async(context)
-- await template_rendered.send(app, template=template, context=context)
-+ await template_rendered.send_async(
-+ app, _sync_wrapper=app.ensure_async, template=template, context=context
-+ )
- return rendered_template
-
-
-@@ -166,12 +170,16 @@ async def stream_template_string(source: str, **context: Any) -> AsyncIterator[s
-
-
- async def _stream(app: "Quart", template: Template, context: Dict[str, Any]) -> AsyncIterator[str]:
-- await before_render_template.send(app, template=template, context=context)
-+ await before_render_template.send_async(
-+ app, _sync_wrapper=app.ensure_async, template=template, context=context
-+ )
-
- async def generate() -> AsyncIterator[str]:
- async for chunk in template.generate_async(context):
- yield chunk
-- await template_rendered.send(app, template=template, context=context)
-+ await template_rendered.send_async(
-+ app, _sync_wrapper=app.ensure_async, template=template, context=context
-+ )
-
- # If a request context is active, keep it while generating.
- if has_request_context():
-diff --git a/tests/test_signals.py b/tests/test_signals.py
-deleted file mode 100644
-index 671d5942..00000000
---- a/tests/test_signals.py
-+++ /dev/null
-@@ -1,37 +0,0 @@
--from __future__ import annotations
--
--from typing import Any
--
--import pytest
--
--from quart.signals import AsyncNamedSignal
--
--
--@pytest.mark.parametrize("weak", [True, False])
--async def test_sync_signal(weak: bool) -> None:
-- signal = AsyncNamedSignal("name")
-- fired = False
--
-- def sync_fired(*_: Any) -> None:
-- nonlocal fired
-- fired = True
--
-- signal.connect(sync_fired, weak=weak)
--
-- await signal.send()
-- assert fired
--
--
--@pytest.mark.parametrize("weak", [True, False])
--async def test_async_signal(weak: bool) -> None:
-- signal = AsyncNamedSignal("name")
-- fired = False
--
-- async def async_fired(*_: Any) -> None:
-- nonlocal fired
-- fired = True
--
-- signal.connect(async_fired, weak=weak)
--
-- await signal.send()
-- assert fired
diff --git a/srcpkgs/python3-quart/template b/srcpkgs/python3-quart/template
index 86e6a4bcc64b8..9109aba45e8b2 100644
--- a/srcpkgs/python3-quart/template
+++ b/srcpkgs/python3-quart/template
@@ -1,19 +1,20 @@
# Template file for 'python3-quart'
pkgname=python3-quart
-version=0.18.4
-revision=3
+version=0.19.3
+revision=1
build_style=python3-pep517
hostmakedepends="python3-poetry-core"
-depends="python3-aiofiles python3-hypercorn python3-click python3-MarkupSafe
- python3-blinker python3-itsdangerous python3-Jinja2 python3-Werkzeug"
-checkdepends="python3-pytest-asyncio python3-hypothesis python3-mock python3-dotenv $depends"
+depends="python3-aiofiles python3-blinker python3-click python3-Flask
+ python3-hypercorn python3-itsdangerous python3-Jinja2 python3-MarkupSafe
+ python3-Werkzeug"
+checkdepends="python3-pytest-asyncio python3-hypothesis python3-dotenv $depends"
short_desc="Python asyncio ASGI web framework with Flask API"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="MIT"
homepage="https://quart.palletsprojects.com/en/latest/"
changelog="https://raw.githubusercontent.com/pallets/quart/main/CHANGES.rst"
distfiles="https://github.com/pallets/quart/archive/refs/tags/${version}.tar.gz"
-checksum=0fc5fe5c32ec94a3a12262afa56c1be143599c2a4fb02bdf7109456b61c87ac2
+checksum=5f1a43e2296960c755fec3ab6144b6786614bf4602c2f52084f75d5ce0d8ad25
pre_check() {
vsed -e '/addopts/d' -i pyproject.toml
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Flask: update to 3.0, clean up stale dependants
2023-10-16 20:23 [PR PATCH] [WIP] Flask: update to 3.0, clean up stale dependants ahesford
` (2 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: ahesford @ 2023-10-17 14:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 270 bytes --]
New comment by ahesford on void-packages repository
https://github.com/void-linux/void-packages/pull/46736#issuecomment-1766510174
Comment:
cc:
- @abenson (python3-Flask-RESTful, voltron)
- @pfpulux (python3-Flask-User, python3-Flask-Mail, python3-Flask-SQLAlchemy)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR PATCH] [Updated] Flask: update to 3.0, clean up stale dependants
2023-10-16 20:23 [PR PATCH] [WIP] Flask: update to 3.0, clean up stale dependants ahesford
` (3 preceding siblings ...)
2023-10-17 14:14 ` ahesford
@ 2023-10-17 14:20 ` ahesford
2023-10-24 13:35 ` [PR PATCH] [Closed]: " ahesford
5 siblings, 0 replies; 7+ messages in thread
From: ahesford @ 2023-10-17 14:20 UTC (permalink / raw)
To: ml
[-- 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
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
- [ ] etesync-dav (no tests; version restrictions on Flask-WTF have been violated since 2022-09-07)
- [ ] mkchromecast (no tests, maybe abandonware)
- [ ] python3-Flask-HTTPAuth (no tests)
- [ ] python3-Flask-RESTful (tests are broken with Python 3.12)
- [ ] voltron (test framework uncertain)
- [x] OpenLP (23 pre-existing failures, 17 pre-existing errors)
- [x] fava (4 pre-existing failures)
- [x] grip
- [x] impacket (1396 pre-existing failures)
- [x] mitmproxy (3 pre-existing failures)
- [x] python3-Flask-Babel
- [x] python3-Flask-Cors
- [x] python3-Flask-Login
- [x] python3-Flask-WTF
- [x] python3-httpbin
### Werkzeug Dependants
- [x] python3-openapi-core
- [x] python3-pytest-httpserver
- [x] python3-pytest-localserver
- [x] 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: 68691 bytes --]
From d349bf4f401dce5feb14ec80a7eb22f2dfa0f9b4 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/18] 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 02770b7c86eaece71eaf25b1a24205bc8374354c 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/18] 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 cea0fe2c8b02e7205462eb67be7e039cc74df990 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/18] 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 6bcbd23810e1369afda4967e911b73688fe73644 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/18] 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 00910b9b965a8df0bcf60eff608d970aab1b566f 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/18] 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 95f49b48ad8ae48350441e862636d8a2af78fcd3 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/18] 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 c9e994642390c875f8140f5694363ea33be28520 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/18] 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 80e397f0b6e34564529635458985889a9dc3dd9b 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/18] 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 537bcdd7ee712a6b68c2781ded0b1904a7dab3f4 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/18] 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 b4db60cbe87a6ab318b7863e0a330489cadeb912 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/18] 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 85b0ace817d50ec3085d737a34803d53ff59a386 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/18] 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 d18790ba4602ff02dea982cd1fe509e5975fb360 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/18] 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 1083fe485fd9b2be01de7e457d43d2d15d3c26d2 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/18] 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 07bcdaa050c7bb34eb919bccd4811097e5103e09 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/18] 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 4d87467ff5cbc03e176a73ab6c200dee283da19a 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/18] 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 05894074f1242728f6dff8ca13aa30d5841adb0f 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/18] New package: python3-flasgger-0.9.7.1
---
srcpkgs/python3-flasgger/template | 22 ++++++++++++++++++++++
srcpkgs/python3-flasgger/update | 1 +
2 files changed, 23 insertions(+)
create mode 100644 srcpkgs/python3-flasgger/template
create mode 100644 srcpkgs/python3-flasgger/update
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
+}
diff --git a/srcpkgs/python3-flasgger/update b/srcpkgs/python3-flasgger/update
new file mode 100644
index 0000000000000..d40d474e5da54
--- /dev/null
+++ b/srcpkgs/python3-flasgger/update
@@ -0,0 +1 @@
+ignore="*b* *dev*"
From 984d5a40483ddeee8d57971e1b3bb48c278c2cb4 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/18] 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
From 9f7341bcaf7e66b6a9ea75743ce6e9969b5396d3 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 17 Oct 2023 10:04:50 -0400
Subject: [PATCH 18/18] python3-quart: update to 0.19.3.
---
.../python3-quart/patches/blinker-1.6.patch | 360 ------------------
srcpkgs/python3-quart/template | 13 +-
2 files changed, 7 insertions(+), 366 deletions(-)
delete mode 100644 srcpkgs/python3-quart/patches/blinker-1.6.patch
diff --git a/srcpkgs/python3-quart/patches/blinker-1.6.patch b/srcpkgs/python3-quart/patches/blinker-1.6.patch
deleted file mode 100644
index f5b56b3c8bab7..0000000000000
--- a/srcpkgs/python3-quart/patches/blinker-1.6.patch
+++ /dev/null
@@ -1,360 +0,0 @@
-From c9b555ff284bb54a45adab44c8e6d78ab8713da0 Mon Sep 17 00:00:00 2001
-From: pgjones <philip.graham.jones@googlemail.com>
-Date: Sun, 9 Apr 2023 16:57:26 +0100
-Subject: [PATCH] Upgrade to blinker 1.6
-
-This allows the custom signal implementation to be removed and for
-sync signal receivers to be supported in the same manner as sync route
-handlers.
----
- pyproject.toml | 2 +-
- src/quart/app.py | 38 +++++++++++++++++++++-----------
- src/quart/asgi.py | 4 ++--
- src/quart/ctx.py | 4 ++--
- src/quart/helpers.py | 5 +++--
- src/quart/signals.py | 48 ++---------------------------------------
- src/quart/templating.py | 16 ++++++++++----
- tests/test_signals.py | 37 -------------------------------
- 8 files changed, 48 insertions(+), 106 deletions(-)
- delete mode 100644 tests/test_signals.py
-
-diff --git a/pyproject.toml b/pyproject.toml
-index da35a647..9d4876a0 100644
---- a/pyproject.toml
-+++ b/pyproject.toml
-@@ -27,7 +27,7 @@
- [tool.poetry.dependencies]
- python = ">=3.7"
- aiofiles = "*"
--blinker = "<1.6"
-+blinker = ">=1.6"
- click = ">=8.0.0"
- hypercorn = ">=0.11.2"
- importlib_metadata = { version = "*", python = "<3.10" }
-diff --git a/src/quart/app.py b/src/quart/app.py
-index 8ee111a7..e3d3cc0f 100644
---- a/src/quart/app.py
-+++ b/src/quart/app.py
-@@ -1113,7 +1113,9 @@
- By default this switches the error response to a 500 internal
- server error.
- """
-- await got_request_exception.send(self, exception=error)
-+ await got_request_exception.send_async(
-+ self, _sync_wrapper=self.ensure_async, exception=error
-+ )
-
- self.log_exception(sys.exc_info())
-
-@@ -1138,7 +1140,9 @@
-
- By default this logs the exception and then re-raises it.
- """
-- await got_websocket_exception.send(self, exception=error)
-+ await got_websocket_exception.send_async(
-+ self, _sync_wrapper=self.ensure_async, exception=error
-+ )
-
- self.log_exception(sys.exc_info())
-
-@@ -1245,7 +1249,7 @@
- for function in self.teardown_request_funcs[name]:
- await self.ensure_async(function)(exc)
-
-- await request_tearing_down.send(self, exc=exc)
-+ await request_tearing_down.send_async(self, _sync_wrapper=self.ensure_async, exc=exc)
-
- async def do_teardown_websocket(
- self, exc: Optional[BaseException], websocket_context: Optional[WebsocketContext] = None
-@@ -1263,13 +1267,13 @@
- for function in self.teardown_websocket_funcs[name]:
- await self.ensure_async(function)(exc)
-
-- await websocket_tearing_down.send(self, exc=exc)
-+ await websocket_tearing_down.send_async(self, _sync_wrapper=self.ensure_async, exc=exc)
-
- async def do_teardown_appcontext(self, exc: Optional[BaseException]) -> None:
- """Teardown the app (context), calling the teardown functions."""
- for function in self.teardown_appcontext_funcs:
- await self.ensure_async(function)(exc)
-- await appcontext_tearing_down.send(self, exc=exc)
-+ await appcontext_tearing_down.send_async(self, _sync_wrapper=self.ensure_async, exc=exc)
-
- def app_context(self) -> AppContext:
- """Create and return an app context.
-@@ -1558,7 +1562,9 @@
- self.background_tasks.add(task)
-
- async def handle_background_exception(self, error: Exception) -> None:
-- await got_background_exception.send(self, exception=error)
-+ await got_background_exception.send_async(
-+ self, _sync_wrapper=self.ensure_async, exception=error
-+ )
-
- self.log_exception(sys.exc_info())
-
-@@ -1666,7 +1672,7 @@
- omits this argument.
- """
- await self.try_trigger_before_first_request_functions()
-- await request_started.send(self)
-+ await request_started.send_async(self, _sync_wrapper=self.ensure_async)
- try:
- result = await self.preprocess_request(request_context)
- if result is None:
-@@ -1733,7 +1739,9 @@
- response = await self.make_response(result)
- try:
- response = await self.process_response(response, request_context)
-- await request_finished.send(self, response=response)
-+ await request_finished.send_async(
-+ self, _sync_wrapper=self.ensure_async, response=response
-+ )
- except Exception:
- if not from_error_handler:
- raise
-@@ -1787,7 +1795,7 @@
- the Flask convention.
- """
- await self.try_trigger_before_first_request_functions()
-- await websocket_started.send(self)
-+ await websocket_started.send_async(self, _sync_wrapper=self.ensure_async)
- try:
- result = await self.preprocess_websocket(websocket_context)
- if result is None:
-@@ -1857,7 +1865,9 @@
- response = None
- try:
- response = await self.postprocess_websocket(response, websocket_context)
-- await websocket_finished.send(self, response=response)
-+ await websocket_finished.send_async(
-+ self, _sync_wrapper=self.ensure_async, response=response
-+ )
- except Exception:
- if not from_error_handler:
- raise
-@@ -1937,7 +1947,9 @@
- for gen in self.while_serving_gens:
- await gen.__anext__()
- except Exception as error:
-- await got_serving_exception.send(self, exception=error)
-+ await got_serving_exception.send_async(
-+ self, _sync_wrapper=self.ensure_async, exception=error
-+ )
- self.log_exception(sys.exc_info())
- raise
-
-@@ -1954,7 +1966,9 @@
- else:
- raise RuntimeError("While serving generator didn't terminate")
- except Exception as error:
-- await got_serving_exception.send(self, exception=error)
-+ await got_serving_exception.send_async(
-+ self, _sync_wrapper=self.ensure_async, exception=error
-+ )
- self.log_exception(sys.exc_info())
- raise
-
-diff --git a/src/quart/asgi.py b/src/quart/asgi.py
-index ba266dc3..2725af8d 100644
---- a/src/quart/asgi.py
-+++ b/src/quart/asgi.py
-@@ -169,7 +169,7 @@ async def handle_messages(self, receive: ASGIReceiveCallable) -> None:
- event = await receive()
- if event["type"] == "websocket.receive":
- message = event.get("bytes") or event["text"]
-- await websocket_received.send(message)
-+ await websocket_received.send_async(message)
- await self.queue.put(message)
- elif event["type"] == "websocket.disconnect":
- return
-@@ -261,7 +261,7 @@ async def send_data(self, send: ASGISendCallable, data: AnyStr) -> None:
- await send({"type": "websocket.send", "bytes": None, "text": data})
- else:
- await send({"type": "websocket.send", "bytes": data, "text": None})
-- await websocket_sent.send(data)
-+ await websocket_sent.send_async(data)
-
- async def accept_connection(
- self, send: ASGISendCallable, headers: Headers, subprotocol: Optional[str]
-diff --git a/src/quart/ctx.py b/src/quart/ctx.py
-index 806aff74..c92ba92e 100644
---- a/src/quart/ctx.py
-+++ b/src/quart/ctx.py
-@@ -240,7 +240,7 @@ def copy(self) -> "AppContext":
-
- async def push(self) -> None:
- self._cv_tokens.append(_cv_app.set(self))
-- await appcontext_pushed.send(self.app)
-+ await appcontext_pushed.send_async(self.app, _sync_wrapper=self.app.ensure_async)
-
- async def pop(self, exc: Optional[BaseException] = _sentinel) -> None: # type: ignore
- try:
-@@ -255,7 +255,7 @@ async def pop(self, exc: Optional[BaseException] = _sentinel) -> None: # type:
- if ctx is not self:
- raise AssertionError(f"Popped wrong app context. ({ctx!r} instead of {self!r})")
-
-- await appcontext_popped.send(self.app)
-+ await appcontext_popped.send_async(self.app, _sync_wrapper=self.app.ensure_async)
-
- async def __aenter__(self) -> "AppContext":
- await self.push()
-diff --git a/src/quart/helpers.py b/src/quart/helpers.py
-index c848a72f..0491acfe 100644
---- a/src/quart/helpers.py
-+++ b/src/quart/helpers.py
-@@ -113,8 +113,9 @@ async def login():
- flashes = session.get("_flashes", [])
- flashes.append((category, message))
- session["_flashes"] = flashes
-- await message_flashed.send(
-- current_app._get_current_object(), message=message, category=category # type: ignore
-+ app = current_app._get_current_object() # type: ignore
-+ await message_flashed.send_async(
-+ app, _sync_wrapper=app.ensure_async, message=message, category=category
- )
-
-
-diff --git a/src/quart/signals.py b/src/quart/signals.py
-index a23b902d..de5e9fcc 100644
---- a/src/quart/signals.py
-+++ b/src/quart/signals.py
-@@ -1,54 +1,10 @@
- from __future__ import annotations
-
--from functools import wraps
--from typing import Any, Callable, List, Optional, Tuple
--
--from blinker import NamedSignal, Namespace # type: ignore[import]
--
--from .utils import is_coroutine_function
-+from blinker import Namespace
-
- signals_available = True
-
--
--class AsyncNamedSignal(NamedSignal): # type: ignore
-- def __init__(self, name: str, doc: Optional[str] = None) -> None:
-- super().__init__(name, doc)
--
-- async def send(self, *sender: Any, **kwargs: Any) -> List[Tuple[Callable, Any]]:
-- coroutines = super().send(*sender, **kwargs)
-- result: List[Tuple[Callable, Any]] = []
-- for handler, coroutine in coroutines:
-- result.append((handler, await coroutine))
-- return result
--
-- def connect(self, receiver: Callable, *args: Any, **kwargs: Any) -> Callable:
-- if is_coroutine_function(receiver):
-- handler = receiver
-- else:
--
-- @wraps(receiver)
-- async def handler(*a: Any, **k: Any) -> Any:
-- return receiver(*a, **k)
--
-- if handler is not receiver and kwargs.get("weak", True):
-- # Blinker will take a weakref to handler, which goes out
-- # of scope with this method as it is a wrapper around the
-- # receiver. Whereas we'd want it to go out of scope when
-- # receiver does. Therefore we can place it on the receiver
-- # function. (Ideally I'll think of a better way).
-- receiver._quart_wrapper_func = handler # type: ignore
-- return super().connect(handler, *args, **kwargs)
--
--
--class AsyncNamespace(Namespace): # type: ignore
-- def signal(self, name: str, doc: Optional[str] = None) -> AsyncNamedSignal:
-- try:
-- return self[name]
-- except KeyError:
-- return self.setdefault(name, AsyncNamedSignal(name, doc))
--
--
--_signals = AsyncNamespace()
-+_signals = Namespace()
-
- #: Called before a template is rendered, connection functions
- # should have a signature of Callable[[Quart, Template, dict], None]
-diff --git a/src/quart/templating.py b/src/quart/templating.py
-index 416c2eef..5c07d132 100644
---- a/src/quart/templating.py
-+++ b/src/quart/templating.py
-@@ -116,9 +116,13 @@ async def render_template_string(source: str, **context: Any) -> str:
-
-
- async def _render(template: Template, context: dict, app: "Quart") -> str:
-- await before_render_template.send(app, template=template, context=context)
-+ await before_render_template.send_async(
-+ app, _sync_wrapper=app.ensure_async, template=template, context=context
-+ )
- rendered_template = await template.render_async(context)
-- await template_rendered.send(app, template=template, context=context)
-+ await template_rendered.send_async(
-+ app, _sync_wrapper=app.ensure_async, template=template, context=context
-+ )
- return rendered_template
-
-
-@@ -166,12 +170,16 @@ async def stream_template_string(source: str, **context: Any) -> AsyncIterator[s
-
-
- async def _stream(app: "Quart", template: Template, context: Dict[str, Any]) -> AsyncIterator[str]:
-- await before_render_template.send(app, template=template, context=context)
-+ await before_render_template.send_async(
-+ app, _sync_wrapper=app.ensure_async, template=template, context=context
-+ )
-
- async def generate() -> AsyncIterator[str]:
- async for chunk in template.generate_async(context):
- yield chunk
-- await template_rendered.send(app, template=template, context=context)
-+ await template_rendered.send_async(
-+ app, _sync_wrapper=app.ensure_async, template=template, context=context
-+ )
-
- # If a request context is active, keep it while generating.
- if has_request_context():
-diff --git a/tests/test_signals.py b/tests/test_signals.py
-deleted file mode 100644
-index 671d5942..00000000
---- a/tests/test_signals.py
-+++ /dev/null
-@@ -1,37 +0,0 @@
--from __future__ import annotations
--
--from typing import Any
--
--import pytest
--
--from quart.signals import AsyncNamedSignal
--
--
--@pytest.mark.parametrize("weak", [True, False])
--async def test_sync_signal(weak: bool) -> None:
-- signal = AsyncNamedSignal("name")
-- fired = False
--
-- def sync_fired(*_: Any) -> None:
-- nonlocal fired
-- fired = True
--
-- signal.connect(sync_fired, weak=weak)
--
-- await signal.send()
-- assert fired
--
--
--@pytest.mark.parametrize("weak", [True, False])
--async def test_async_signal(weak: bool) -> None:
-- signal = AsyncNamedSignal("name")
-- fired = False
--
-- async def async_fired(*_: Any) -> None:
-- nonlocal fired
-- fired = True
--
-- signal.connect(async_fired, weak=weak)
--
-- await signal.send()
-- assert fired
diff --git a/srcpkgs/python3-quart/template b/srcpkgs/python3-quart/template
index 86e6a4bcc64b8..9109aba45e8b2 100644
--- a/srcpkgs/python3-quart/template
+++ b/srcpkgs/python3-quart/template
@@ -1,19 +1,20 @@
# Template file for 'python3-quart'
pkgname=python3-quart
-version=0.18.4
-revision=3
+version=0.19.3
+revision=1
build_style=python3-pep517
hostmakedepends="python3-poetry-core"
-depends="python3-aiofiles python3-hypercorn python3-click python3-MarkupSafe
- python3-blinker python3-itsdangerous python3-Jinja2 python3-Werkzeug"
-checkdepends="python3-pytest-asyncio python3-hypothesis python3-mock python3-dotenv $depends"
+depends="python3-aiofiles python3-blinker python3-click python3-Flask
+ python3-hypercorn python3-itsdangerous python3-Jinja2 python3-MarkupSafe
+ python3-Werkzeug"
+checkdepends="python3-pytest-asyncio python3-hypothesis python3-dotenv $depends"
short_desc="Python asyncio ASGI web framework with Flask API"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="MIT"
homepage="https://quart.palletsprojects.com/en/latest/"
changelog="https://raw.githubusercontent.com/pallets/quart/main/CHANGES.rst"
distfiles="https://github.com/pallets/quart/archive/refs/tags/${version}.tar.gz"
-checksum=0fc5fe5c32ec94a3a12262afa56c1be143599c2a4fb02bdf7109456b61c87ac2
+checksum=5f1a43e2296960c755fec3ab6144b6786614bf4602c2f52084f75d5ce0d8ad25
pre_check() {
vsed -e '/addopts/d' -i pyproject.toml
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR PATCH] [Closed]: Flask: update to 3.0, clean up stale dependants
2023-10-16 20:23 [PR PATCH] [WIP] Flask: update to 3.0, clean up stale dependants ahesford
` (4 preceding siblings ...)
2023-10-17 14:20 ` [PR PATCH] [Updated] " ahesford
@ 2023-10-24 13:35 ` ahesford
5 siblings, 0 replies; 7+ messages in thread
From: ahesford @ 2023-10-24 13:35 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1488 bytes --]
There's a closed pull request on the void-packages repository
Flask: update to 3.0, clean up stale dependants
https://github.com/void-linux/void-packages/pull/46736
Description:
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
- [ ] etesync-dav (no tests; version restrictions on Flask-WTF have been violated since 2022-09-07)
- [ ] mkchromecast (no tests, maybe abandonware)
- [ ] python3-Flask-HTTPAuth (no tests)
- [ ] python3-Flask-RESTful (tests are broken with Python 3.12)
- [ ] voltron (test framework uncertain)
- [x] OpenLP (23 pre-existing failures, 17 pre-existing errors)
- [x] fava (4 pre-existing failures)
- [x] grip
- [x] impacket (1396 pre-existing failures)
- [x] mitmproxy (3 pre-existing failures)
- [x] python3-Flask-Babel
- [x] python3-Flask-Cors
- [x] python3-Flask-Login
- [x] python3-Flask-WTF
- [x] python3-httpbin
### Werkzeug Dependants
- [x] python3-openapi-core
- [x] python3-pytest-httpserver
- [x] python3-pytest-localserver
- [x] python3-quart
## Removed Packages
- python3-Flask-User
- python3-Flask-Mail
- python3-Flask-Script
- python3-Flask-OAuthlib
- python3-Flask-Assets
- python3-Flask-SQLAlchemy
- python3-stormssh
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-10-24 13:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-16 20:23 [PR PATCH] [WIP] Flask: update to 3.0, clean up stale dependants ahesford
2023-10-16 20:37 ` [PR PATCH] [Updated] " ahesford
2023-10-17 12:24 ` ahesford
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
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).