* Re: [PR REVIEW] buku: fix cgi deprecation warning for python3>=3.11
2022-11-16 10:33 [PR PATCH] buku: fix cgi deprecation warning for python3>=3.11 Vinfall
@ 2022-11-16 10:39 ` paper42
2022-11-16 14:16 ` Vinfall
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: paper42 @ 2022-11-16 10:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 272 bytes --]
New review comment by paper42 on void-packages repository
https://github.com/void-linux/void-packages/pull/40555#discussion_r1023821213
Comment:
Where is this patch from? Is it a commit upstream? If yes, please just get the patch from there and don't remove the header.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR REVIEW] buku: fix cgi deprecation warning for python3>=3.11
2022-11-16 10:33 [PR PATCH] buku: fix cgi deprecation warning for python3>=3.11 Vinfall
2022-11-16 10:39 ` [PR REVIEW] " paper42
@ 2022-11-16 14:16 ` Vinfall
2022-11-17 2:45 ` [PR PATCH] [Updated] " Vinfall
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Vinfall @ 2022-11-16 14:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 552 bytes --]
New review comment by Vinfall on void-packages repository
https://github.com/void-linux/void-packages/pull/40555#discussion_r1024059318
Comment:
> Is it a commit upstream?
Yes and no. I committed to the upstream via jarun/buku/pull/605, and edited it to meet the tagged release code in `template`.
[The upstream patch](https://patch-diff.githubusercontent.com/raw/jarun/buku/pull/605.patch) I made cannot be directly applied to void as it's based on the latest code, so I made one for void. I guess in this case I don't need to add the header?
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR PATCH] [Updated] buku: fix cgi deprecation warning for python3>=3.11
2022-11-16 10:33 [PR PATCH] buku: fix cgi deprecation warning for python3>=3.11 Vinfall
2022-11-16 10:39 ` [PR REVIEW] " paper42
2022-11-16 14:16 ` Vinfall
@ 2022-11-17 2:45 ` Vinfall
2022-11-17 14:07 ` Vinfall
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Vinfall @ 2022-11-17 2:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 827 bytes --]
There is an updated pull request by Vinfall against master on the void-packages repository
https://github.com/Vinfall/void-packages master
https://github.com/void-linux/void-packages/pull/40555
buku: fix cgi deprecation warning for python3>=3.11
#### Changes
Followup of #40551.
Add the necessary patch to remove the DeprecationWarning `'cgi' is deprecated and slated for removal in Python 3.13` in buku caused by Python3 version update (3.11 as of writing).
#### Testing the changes
- I tested the changes in this PR: **YES**
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures:
- armv6l
- `xlint` also reports no error.
A patch file from https://github.com/void-linux/void-packages/pull/40555.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-40555.patch --]
[-- Type: text/x-diff, Size: 2418 bytes --]
From 902daad122eab3a073324348a32fd376b1dbf43e Mon Sep 17 00:00:00 2001
From: Vinfall <vinfall@users.noreply.github.com>
Date: Wed, 16 Nov 2022 18:26:55 +0800
Subject: [PATCH] buku: fix cgi deprecation warning for python3>=3.11
---
srcpkgs/buku/patches/remove-cgi-warning.patch | 37 +++++++++++++++++++
srcpkgs/buku/template | 2 +-
2 files changed, 38 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/buku/patches/remove-cgi-warning.patch
diff --git a/srcpkgs/buku/patches/remove-cgi-warning.patch b/srcpkgs/buku/patches/remove-cgi-warning.patch
new file mode 100644
index 000000000000..2075e2486431
--- /dev/null
+++ b/srcpkgs/buku/patches/remove-cgi-warning.patch
@@ -0,0 +1,37 @@
+--- a/buku
++++ b/buku
+@@ -19,10 +19,10 @@
+
+ import argparse
+ import calendar
+-import cgi
+ import codecs
+ import collections
+ import contextlib
++import email.message
+ import json
+ import locale
+ import logging
+@@ -3811,15 +3811,17 @@
+ if soup.meta and soup.meta.get('charset') is not None:
+ charset = soup.meta.get('charset')
+ elif 'content-type' in resp.headers:
+- _, params = cgi.parse_header(resp.headers['content-type'])
+- if params.get('charset') is not None:
+- charset = params.get('charset')
++ m = email.message.Message()
++ m['content-type'] = resp.headers['content-type']
++ if m.get_param('charset') is not None:
++ charset = m.get_param('charset')
+
+ if not charset and soup:
+ meta_tag = soup.find('meta', attrs={'http-equiv': 'Content-Type'})
+ if meta_tag:
+- _, params = cgi.parse_header(meta_tag.attrs['content'])
+- charset = params.get('charset', charset)
++ m = email.message.Message()
++ m['content'] = meta_tag.attrs['content']
++ charset = m.get_param('charset', charset)
+
+ if charset:
+ LOGDBG('charset: %s', charset)
diff --git a/srcpkgs/buku/template b/srcpkgs/buku/template
index d23f9addf74f..2bd38b49f1df 100644
--- a/srcpkgs/buku/template
+++ b/srcpkgs/buku/template
@@ -1,7 +1,7 @@
# Template file for 'buku'
pkgname=buku
version=4.7
-revision=1
+revision=2
depends="python3-urllib3 python3-BeautifulSoup4 python3-cryptography
python3-html5lib"
short_desc="Cmdline bookmark management utility"
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR PATCH] [Updated] buku: fix cgi deprecation warning for python3>=3.11
2022-11-16 10:33 [PR PATCH] buku: fix cgi deprecation warning for python3>=3.11 Vinfall
` (2 preceding siblings ...)
2022-11-17 2:45 ` [PR PATCH] [Updated] " Vinfall
@ 2022-11-17 14:07 ` Vinfall
2022-11-17 14:08 ` Vinfall
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Vinfall @ 2022-11-17 14:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 827 bytes --]
There is an updated pull request by Vinfall against master on the void-packages repository
https://github.com/Vinfall/void-packages master
https://github.com/void-linux/void-packages/pull/40555
buku: fix cgi deprecation warning for python3>=3.11
#### Changes
Followup of #40551.
Add the necessary patch to remove the DeprecationWarning `'cgi' is deprecated and slated for removal in Python 3.13` in buku caused by Python3 version update (3.11 as of writing).
#### Testing the changes
- I tested the changes in this PR: **YES**
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures:
- armv6l
- `xlint` also reports no error.
A patch file from https://github.com/void-linux/void-packages/pull/40555.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-40555.patch --]
[-- Type: text/x-diff, Size: 2418 bytes --]
From b5913ac2343e542f74081c7bf48327a5259c3116 Mon Sep 17 00:00:00 2001
From: Vinfall <vinfall@users.noreply.github.com>
Date: Thu, 17 Nov 2022 22:06:48 +0800
Subject: [PATCH] buku: fix cgi deprecation warning for python3>=3.11
---
srcpkgs/buku/patches/remove-cgi-warning.patch | 37 +++++++++++++++++++
srcpkgs/buku/template | 2 +-
2 files changed, 38 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/buku/patches/remove-cgi-warning.patch
diff --git a/srcpkgs/buku/patches/remove-cgi-warning.patch b/srcpkgs/buku/patches/remove-cgi-warning.patch
new file mode 100644
index 000000000000..2075e2486431
--- /dev/null
+++ b/srcpkgs/buku/patches/remove-cgi-warning.patch
@@ -0,0 +1,37 @@
+--- a/buku
++++ b/buku
+@@ -19,10 +19,10 @@
+
+ import argparse
+ import calendar
+-import cgi
+ import codecs
+ import collections
+ import contextlib
++import email.message
+ import json
+ import locale
+ import logging
+@@ -3811,15 +3811,17 @@
+ if soup.meta and soup.meta.get('charset') is not None:
+ charset = soup.meta.get('charset')
+ elif 'content-type' in resp.headers:
+- _, params = cgi.parse_header(resp.headers['content-type'])
+- if params.get('charset') is not None:
+- charset = params.get('charset')
++ m = email.message.Message()
++ m['content-type'] = resp.headers['content-type']
++ if m.get_param('charset') is not None:
++ charset = m.get_param('charset')
+
+ if not charset and soup:
+ meta_tag = soup.find('meta', attrs={'http-equiv': 'Content-Type'})
+ if meta_tag:
+- _, params = cgi.parse_header(meta_tag.attrs['content'])
+- charset = params.get('charset', charset)
++ m = email.message.Message()
++ m['content'] = meta_tag.attrs['content']
++ charset = m.get_param('charset', charset)
+
+ if charset:
+ LOGDBG('charset: %s', charset)
diff --git a/srcpkgs/buku/template b/srcpkgs/buku/template
index d23f9addf74f..2bd38b49f1df 100644
--- a/srcpkgs/buku/template
+++ b/srcpkgs/buku/template
@@ -1,7 +1,7 @@
# Template file for 'buku'
pkgname=buku
version=4.7
-revision=1
+revision=2
depends="python3-urllib3 python3-BeautifulSoup4 python3-cryptography
python3-html5lib"
short_desc="Cmdline bookmark management utility"
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: buku: fix cgi deprecation warning for python3>=3.11
2022-11-16 10:33 [PR PATCH] buku: fix cgi deprecation warning for python3>=3.11 Vinfall
` (3 preceding siblings ...)
2022-11-17 14:07 ` Vinfall
@ 2022-11-17 14:08 ` Vinfall
2022-11-18 6:44 ` [PR REVIEW] " classabbyamp
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Vinfall @ 2022-11-17 14:08 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
New comment by Vinfall on void-packages repository
https://github.com/void-linux/void-packages/pull/40555#issuecomment-1318692421
Comment:
I hope it should work this time😟
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR REVIEW] buku: fix cgi deprecation warning for python3>=3.11
2022-11-16 10:33 [PR PATCH] buku: fix cgi deprecation warning for python3>=3.11 Vinfall
` (4 preceding siblings ...)
2022-11-17 14:08 ` Vinfall
@ 2022-11-18 6:44 ` classabbyamp
2022-11-18 6:46 ` classabbyamp
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: classabbyamp @ 2022-11-18 6:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 232 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/40555#discussion_r1026077991
Comment:
can you add a line saying "adapted from https://github.com/jarun/buku/pull/605"
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR REVIEW] buku: fix cgi deprecation warning for python3>=3.11
2022-11-16 10:33 [PR PATCH] buku: fix cgi deprecation warning for python3>=3.11 Vinfall
` (5 preceding siblings ...)
2022-11-18 6:44 ` [PR REVIEW] " classabbyamp
@ 2022-11-18 6:46 ` classabbyamp
2022-11-18 6:46 ` classabbyamp
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: classabbyamp @ 2022-11-18 6:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 256 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/40555#discussion_r1026077991
Comment:
can you add a line at the top of the patch saying "adapted from https://github.com/jarun/buku/pull/605"
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR REVIEW] buku: fix cgi deprecation warning for python3>=3.11
2022-11-16 10:33 [PR PATCH] buku: fix cgi deprecation warning for python3>=3.11 Vinfall
` (6 preceding siblings ...)
2022-11-18 6:46 ` classabbyamp
@ 2022-11-18 6:46 ` classabbyamp
2022-12-03 1:22 ` Vinfall
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: classabbyamp @ 2022-11-18 6:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 256 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/40555#discussion_r1026077991
Comment:
can you add a line at the top of the patch saying `adapted from https://github.com/jarun/buku/pull/605`
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: buku: fix cgi deprecation warning for python3>=3.11
2022-11-16 10:33 [PR PATCH] buku: fix cgi deprecation warning for python3>=3.11 Vinfall
` (7 preceding siblings ...)
2022-11-18 6:46 ` classabbyamp
@ 2022-12-03 1:22 ` Vinfall
2022-12-03 2:03 ` classabbyamp
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Vinfall @ 2022-12-03 1:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 196 bytes --]
New comment by Vinfall on void-packages repository
https://github.com/void-linux/void-packages/pull/40555#issuecomment-1336000765
Comment:
Hmm, anything I need to do before this can get merged?
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: buku: fix cgi deprecation warning for python3>=3.11
2022-11-16 10:33 [PR PATCH] buku: fix cgi deprecation warning for python3>=3.11 Vinfall
` (8 preceding siblings ...)
2022-12-03 1:22 ` Vinfall
@ 2022-12-03 2:03 ` classabbyamp
2022-12-03 7:35 ` [PR PATCH] [Updated] " Vinfall
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: classabbyamp @ 2022-12-03 2:03 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 172 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/40555#issuecomment-1336011714
Comment:
address my comment please
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR PATCH] [Updated] buku: fix cgi deprecation warning for python3>=3.11
2022-11-16 10:33 [PR PATCH] buku: fix cgi deprecation warning for python3>=3.11 Vinfall
` (9 preceding siblings ...)
2022-12-03 2:03 ` classabbyamp
@ 2022-12-03 7:35 ` Vinfall
2022-12-03 7:36 ` Vinfall
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Vinfall @ 2022-12-03 7:35 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 827 bytes --]
There is an updated pull request by Vinfall against master on the void-packages repository
https://github.com/Vinfall/void-packages master
https://github.com/void-linux/void-packages/pull/40555
buku: fix cgi deprecation warning for python3>=3.11
#### Changes
Followup of #40551.
Add the necessary patch to remove the DeprecationWarning `'cgi' is deprecated and slated for removal in Python 3.13` in buku caused by Python3 version update (3.11 as of writing).
#### Testing the changes
- I tested the changes in this PR: **YES**
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures:
- armv6l
- `xlint` also reports no error.
A patch file from https://github.com/void-linux/void-packages/pull/40555.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-40555.patch --]
[-- Type: text/x-diff, Size: 2470 bytes --]
From 29a304c0417620c84a1f5171960670581916abee Mon Sep 17 00:00:00 2001
From: Vinfall <vinfall@users.noreply.github.com>
Date: Sat, 3 Dec 2022 15:35:07 +0800
Subject: [PATCH] buku: fix cgi deprecation warning for python3>=3.11
---
srcpkgs/buku/patches/remove-cgi-warning.patch | 38 +++++++++++++++++++
srcpkgs/buku/template | 2 +-
2 files changed, 39 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/buku/patches/remove-cgi-warning.patch
diff --git a/srcpkgs/buku/patches/remove-cgi-warning.patch b/srcpkgs/buku/patches/remove-cgi-warning.patch
new file mode 100644
index 000000000000..21a9b6b80544
--- /dev/null
+++ b/srcpkgs/buku/patches/remove-cgi-warning.patch
@@ -0,0 +1,38 @@
+adapted from https://github.com/jarun/buku/pull/605
+--- a/buku
++++ b/buku
+@@ -19,10 +19,10 @@
+
+ import argparse
+ import calendar
+-import cgi
+ import codecs
+ import collections
+ import contextlib
++import email.message
+ import json
+ import locale
+ import logging
+@@ -3811,15 +3811,17 @@
+ if soup.meta and soup.meta.get('charset') is not None:
+ charset = soup.meta.get('charset')
+ elif 'content-type' in resp.headers:
+- _, params = cgi.parse_header(resp.headers['content-type'])
+- if params.get('charset') is not None:
+- charset = params.get('charset')
++ m = email.message.Message()
++ m['content-type'] = resp.headers['content-type']
++ if m.get_param('charset') is not None:
++ charset = m.get_param('charset')
+
+ if not charset and soup:
+ meta_tag = soup.find('meta', attrs={'http-equiv': 'Content-Type'})
+ if meta_tag:
+- _, params = cgi.parse_header(meta_tag.attrs['content'])
+- charset = params.get('charset', charset)
++ m = email.message.Message()
++ m['content'] = meta_tag.attrs['content']
++ charset = m.get_param('charset', charset)
+
+ if charset:
+ LOGDBG('charset: %s', charset)
diff --git a/srcpkgs/buku/template b/srcpkgs/buku/template
index d23f9addf74f..2bd38b49f1df 100644
--- a/srcpkgs/buku/template
+++ b/srcpkgs/buku/template
@@ -1,7 +1,7 @@
# Template file for 'buku'
pkgname=buku
version=4.7
-revision=1
+revision=2
depends="python3-urllib3 python3-BeautifulSoup4 python3-cryptography
python3-html5lib"
short_desc="Cmdline bookmark management utility"
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: buku: fix cgi deprecation warning for python3>=3.11
2022-11-16 10:33 [PR PATCH] buku: fix cgi deprecation warning for python3>=3.11 Vinfall
` (10 preceding siblings ...)
2022-12-03 7:35 ` [PR PATCH] [Updated] " Vinfall
@ 2022-12-03 7:36 ` Vinfall
2022-12-03 7:36 ` [PR REVIEW] " Vinfall
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Vinfall @ 2022-12-03 7:36 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 190 bytes --]
New comment by Vinfall on void-packages repository
https://github.com/void-linux/void-packages/pull/40555#issuecomment-1336105295
Comment:
Thank you! Didn't notice that until now🙏🏻.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR REVIEW] buku: fix cgi deprecation warning for python3>=3.11
2022-11-16 10:33 [PR PATCH] buku: fix cgi deprecation warning for python3>=3.11 Vinfall
` (11 preceding siblings ...)
2022-12-03 7:36 ` Vinfall
@ 2022-12-03 7:36 ` Vinfall
2022-12-04 2:12 ` [PR PATCH] [Updated] " Vinfall
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Vinfall @ 2022-12-03 7:36 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 160 bytes --]
New review comment by Vinfall on void-packages repository
https://github.com/void-linux/void-packages/pull/40555#discussion_r1038744733
Comment:
Sure, fixed.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR PATCH] [Updated] buku: fix cgi deprecation warning for python3>=3.11
2022-11-16 10:33 [PR PATCH] buku: fix cgi deprecation warning for python3>=3.11 Vinfall
` (12 preceding siblings ...)
2022-12-03 7:36 ` [PR REVIEW] " Vinfall
@ 2022-12-04 2:12 ` Vinfall
2022-12-04 2:21 ` Vinfall
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Vinfall @ 2022-12-04 2:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 827 bytes --]
There is an updated pull request by Vinfall against master on the void-packages repository
https://github.com/Vinfall/void-packages master
https://github.com/void-linux/void-packages/pull/40555
buku: fix cgi deprecation warning for python3>=3.11
#### Changes
Followup of #40551.
Add the necessary patch to remove the DeprecationWarning `'cgi' is deprecated and slated for removal in Python 3.13` in buku caused by Python3 version update (3.11 as of writing).
#### Testing the changes
- I tested the changes in this PR: **YES**
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures:
- armv6l
- `xlint` also reports no error.
A patch file from https://github.com/void-linux/void-packages/pull/40555.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-40555.patch --]
[-- Type: text/x-diff, Size: 2470 bytes --]
From 29a304c0417620c84a1f5171960670581916abee Mon Sep 17 00:00:00 2001
From: Vinfall <vinfall@users.noreply.github.com>
Date: Sat, 3 Dec 2022 15:35:07 +0800
Subject: [PATCH] buku: fix cgi deprecation warning for python3>=3.11
---
srcpkgs/buku/patches/remove-cgi-warning.patch | 38 +++++++++++++++++++
srcpkgs/buku/template | 2 +-
2 files changed, 39 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/buku/patches/remove-cgi-warning.patch
diff --git a/srcpkgs/buku/patches/remove-cgi-warning.patch b/srcpkgs/buku/patches/remove-cgi-warning.patch
new file mode 100644
index 000000000000..21a9b6b80544
--- /dev/null
+++ b/srcpkgs/buku/patches/remove-cgi-warning.patch
@@ -0,0 +1,38 @@
+adapted from https://github.com/jarun/buku/pull/605
+--- a/buku
++++ b/buku
+@@ -19,10 +19,10 @@
+
+ import argparse
+ import calendar
+-import cgi
+ import codecs
+ import collections
+ import contextlib
++import email.message
+ import json
+ import locale
+ import logging
+@@ -3811,15 +3811,17 @@
+ if soup.meta and soup.meta.get('charset') is not None:
+ charset = soup.meta.get('charset')
+ elif 'content-type' in resp.headers:
+- _, params = cgi.parse_header(resp.headers['content-type'])
+- if params.get('charset') is not None:
+- charset = params.get('charset')
++ m = email.message.Message()
++ m['content-type'] = resp.headers['content-type']
++ if m.get_param('charset') is not None:
++ charset = m.get_param('charset')
+
+ if not charset and soup:
+ meta_tag = soup.find('meta', attrs={'http-equiv': 'Content-Type'})
+ if meta_tag:
+- _, params = cgi.parse_header(meta_tag.attrs['content'])
+- charset = params.get('charset', charset)
++ m = email.message.Message()
++ m['content'] = meta_tag.attrs['content']
++ charset = m.get_param('charset', charset)
+
+ if charset:
+ LOGDBG('charset: %s', charset)
diff --git a/srcpkgs/buku/template b/srcpkgs/buku/template
index d23f9addf74f..2bd38b49f1df 100644
--- a/srcpkgs/buku/template
+++ b/srcpkgs/buku/template
@@ -1,7 +1,7 @@
# Template file for 'buku'
pkgname=buku
version=4.7
-revision=1
+revision=2
depends="python3-urllib3 python3-BeautifulSoup4 python3-cryptography
python3-html5lib"
short_desc="Cmdline bookmark management utility"
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR PATCH] [Updated] buku: fix cgi deprecation warning for python3>=3.11
2022-11-16 10:33 [PR PATCH] buku: fix cgi deprecation warning for python3>=3.11 Vinfall
` (13 preceding siblings ...)
2022-12-04 2:12 ` [PR PATCH] [Updated] " Vinfall
@ 2022-12-04 2:21 ` Vinfall
2022-12-04 2:27 ` Vinfall
2022-12-04 3:34 ` [PR PATCH] [Merged]: " classabbyamp
16 siblings, 0 replies; 18+ messages in thread
From: Vinfall @ 2022-12-04 2:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 827 bytes --]
There is an updated pull request by Vinfall against master on the void-packages repository
https://github.com/Vinfall/void-packages master
https://github.com/void-linux/void-packages/pull/40555
buku: fix cgi deprecation warning for python3>=3.11
#### Changes
Followup of #40551.
Add the necessary patch to remove the DeprecationWarning `'cgi' is deprecated and slated for removal in Python 3.13` in buku caused by Python3 version update (3.11 as of writing).
#### Testing the changes
- I tested the changes in this PR: **YES**
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures:
- armv6l
- `xlint` also reports no error.
A patch file from https://github.com/void-linux/void-packages/pull/40555.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-40555.patch --]
[-- Type: text/x-diff, Size: 2470 bytes --]
From 87599dfee9160575b8f28e21db13e699cd080728 Mon Sep 17 00:00:00 2001
From: Vinfall <vinfall@users.noreply.github.com>
Date: Sun, 4 Dec 2022 10:20:32 +0800
Subject: [PATCH] buku: fix cgi deprecation warning for python3>=3.11
---
srcpkgs/buku/patches/remove-cgi-warning.patch | 38 +++++++++++++++++++
srcpkgs/buku/template | 2 +-
2 files changed, 39 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/buku/patches/remove-cgi-warning.patch
diff --git a/srcpkgs/buku/patches/remove-cgi-warning.patch b/srcpkgs/buku/patches/remove-cgi-warning.patch
new file mode 100644
index 000000000000..21a9b6b80544
--- /dev/null
+++ b/srcpkgs/buku/patches/remove-cgi-warning.patch
@@ -0,0 +1,38 @@
+adapted from https://github.com/jarun/buku/pull/605
+--- a/buku
++++ b/buku
+@@ -19,10 +19,10 @@
+
+ import argparse
+ import calendar
+-import cgi
+ import codecs
+ import collections
+ import contextlib
++import email.message
+ import json
+ import locale
+ import logging
+@@ -3811,15 +3811,17 @@
+ if soup.meta and soup.meta.get('charset') is not None:
+ charset = soup.meta.get('charset')
+ elif 'content-type' in resp.headers:
+- _, params = cgi.parse_header(resp.headers['content-type'])
+- if params.get('charset') is not None:
+- charset = params.get('charset')
++ m = email.message.Message()
++ m['content-type'] = resp.headers['content-type']
++ if m.get_param('charset') is not None:
++ charset = m.get_param('charset')
+
+ if not charset and soup:
+ meta_tag = soup.find('meta', attrs={'http-equiv': 'Content-Type'})
+ if meta_tag:
+- _, params = cgi.parse_header(meta_tag.attrs['content'])
+- charset = params.get('charset', charset)
++ m = email.message.Message()
++ m['content'] = meta_tag.attrs['content']
++ charset = m.get_param('charset', charset)
+
+ if charset:
+ LOGDBG('charset: %s', charset)
diff --git a/srcpkgs/buku/template b/srcpkgs/buku/template
index d23f9addf74f..2bd38b49f1df 100644
--- a/srcpkgs/buku/template
+++ b/srcpkgs/buku/template
@@ -1,7 +1,7 @@
# Template file for 'buku'
pkgname=buku
version=4.7
-revision=1
+revision=2
depends="python3-urllib3 python3-BeautifulSoup4 python3-cryptography
python3-html5lib"
short_desc="Cmdline bookmark management utility"
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: buku: fix cgi deprecation warning for python3>=3.11
2022-11-16 10:33 [PR PATCH] buku: fix cgi deprecation warning for python3>=3.11 Vinfall
` (14 preceding siblings ...)
2022-12-04 2:21 ` Vinfall
@ 2022-12-04 2:27 ` Vinfall
2022-12-04 3:34 ` [PR PATCH] [Merged]: " classabbyamp
16 siblings, 0 replies; 18+ messages in thread
From: Vinfall @ 2022-12-04 2:27 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 319 bytes --]
New comment by Vinfall on void-packages repository
https://github.com/void-linux/void-packages/pull/40555#issuecomment-1336304608
Comment:
Looks like my fork is too old so the workflow throws an error, it should be fine now. I've also checked local build testing for x86_64-glibc, cross-build for armv6l and `xlint`.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR PATCH] [Merged]: buku: fix cgi deprecation warning for python3>=3.11
2022-11-16 10:33 [PR PATCH] buku: fix cgi deprecation warning for python3>=3.11 Vinfall
` (15 preceding siblings ...)
2022-12-04 2:27 ` Vinfall
@ 2022-12-04 3:34 ` classabbyamp
16 siblings, 0 replies; 18+ messages in thread
From: classabbyamp @ 2022-12-04 3:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 672 bytes --]
There's a merged pull request on the void-packages repository
buku: fix cgi deprecation warning for python3>=3.11
https://github.com/void-linux/void-packages/pull/40555
Description:
#### Changes
Followup of #40551.
Add the necessary patch to remove the DeprecationWarning `'cgi' is deprecated and slated for removal in Python 3.13` in buku caused by Python3 version update (3.11 as of writing).
#### Testing the changes
- I tested the changes in this PR: **YES**
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures:
- armv6l
- `xlint` also reports no error.
^ permalink raw reply [flat|nested] 18+ messages in thread