Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] buku: fix deprecation warning for python3>=3.11
@ 2022-11-16  3:29 Vinfall
  2022-11-16  7:29 ` classabbyamp
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Vinfall @ 2022-11-16  3:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 842 bytes --]

There is a new 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/40551

buku: fix deprecation warning for python3>=3.11
#### Changes

Followup of #40526 and jarun/buku/pull/605.

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/40551.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-40551.patch --]
[-- Type: text/x-diff, Size: 1962 bytes --]

From 34453fffdb10d83dd135e9b661530298f70de97a Mon Sep 17 00:00:00 2001
From: Vinfall <91039000+Vinfall@users.noreply.github.com>
Date: Wed, 16 Nov 2022 03:26:49 +0000
Subject: [PATCH] buku: fix deprecation warning for python3>=3.11

---
 srcpkgs/buku/patches/remove-cgi-warning.patch | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 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)

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

* Re: buku: fix deprecation warning for python3>=3.11
  2022-11-16  3:29 [PR PATCH] buku: fix deprecation warning for python3>=3.11 Vinfall
@ 2022-11-16  7:29 ` classabbyamp
  2022-11-16 10:26 ` [PR PATCH] [Closed]: " Vinfall
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: classabbyamp @ 2022-11-16  7:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 200 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/40551#issuecomment-1316505718

Comment:
this needs an increment to `revision` in the template

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

* Re: [PR PATCH] [Closed]: buku: fix deprecation warning for python3>=3.11
  2022-11-16  3:29 [PR PATCH] buku: fix deprecation warning for python3>=3.11 Vinfall
  2022-11-16  7:29 ` classabbyamp
@ 2022-11-16 10:26 ` Vinfall
  2022-11-16 10:26 ` [PR PATCH] [Updated] " Vinfall
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Vinfall @ 2022-11-16 10:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 692 bytes --]

There's a closed pull request on the void-packages repository

buku: fix deprecation warning for python3>=3.11
https://github.com/void-linux/void-packages/pull/40551

Description:
#### Changes

Followup of #40526 and jarun/buku/pull/605.

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] 6+ messages in thread

* Re: [PR PATCH] [Updated] buku: fix deprecation warning for python3>=3.11
  2022-11-16  3:29 [PR PATCH] buku: fix deprecation warning for python3>=3.11 Vinfall
  2022-11-16  7:29 ` classabbyamp
  2022-11-16 10:26 ` [PR PATCH] [Closed]: " Vinfall
@ 2022-11-16 10:26 ` Vinfall
  2022-11-16 10:35 ` Vinfall
  2022-11-16 10:36 ` Vinfall
  4 siblings, 0 replies; 6+ messages in thread
From: Vinfall @ 2022-11-16 10:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 847 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/40551

buku: fix deprecation warning for python3>=3.11
#### Changes

Followup of #40526 and jarun/buku/pull/605.

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/40551.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-40551.patch --]
[-- Type: text/x-diff, Size: 0 bytes --]



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

* Re: buku: fix deprecation warning for python3>=3.11
  2022-11-16  3:29 [PR PATCH] buku: fix deprecation warning for python3>=3.11 Vinfall
                   ` (2 preceding siblings ...)
  2022-11-16 10:26 ` [PR PATCH] [Updated] " Vinfall
@ 2022-11-16 10:35 ` Vinfall
  2022-11-16 10:36 ` Vinfall
  4 siblings, 0 replies; 6+ messages in thread
From: Vinfall @ 2022-11-16 10:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 271 bytes --]

New comment by Vinfall on void-packages repository

https://github.com/void-linux/void-packages/pull/40551#issuecomment-1316774254

Comment:
Ops, I wished to squash the changes into one commit but screw up by pulling the changes first... Sorry for the inconvenience💔.

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

* Re: buku: fix deprecation warning for python3>=3.11
  2022-11-16  3:29 [PR PATCH] buku: fix deprecation warning for python3>=3.11 Vinfall
                   ` (3 preceding siblings ...)
  2022-11-16 10:35 ` Vinfall
@ 2022-11-16 10:36 ` Vinfall
  4 siblings, 0 replies; 6+ messages in thread
From: Vinfall @ 2022-11-16 10:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 297 bytes --]

New comment by Vinfall on void-packages repository

https://github.com/void-linux/void-packages/pull/40551#issuecomment-1316774254

Comment:
Ops, I wished to squash the changes into one commit but screw up by pulling the changes first... The fix is at #40555 now, sorry for the inconvenience💔.

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

end of thread, other threads:[~2022-11-16 10:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-16  3:29 [PR PATCH] buku: fix deprecation warning for python3>=3.11 Vinfall
2022-11-16  7:29 ` classabbyamp
2022-11-16 10:26 ` [PR PATCH] [Closed]: " Vinfall
2022-11-16 10:26 ` [PR PATCH] [Updated] " Vinfall
2022-11-16 10:35 ` Vinfall
2022-11-16 10:36 ` Vinfall

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).