[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#976624: marked as done (python3-xcbgen: not compatible with python 3.9)



Your message dated Mon, 07 Dec 2020 20:32:09 +0000
with message-id <E1kmNB3-0000R9-VS@fasolo.debian.org>
and subject line Bug#976624: fixed in xcb-proto 1.14.1-1
has caused the Debian Bug report #976624,
regarding python3-xcbgen: not compatible with python 3.9
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
976624: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=976624
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: xcb-proto
Severity: serious
Tags: patch upstream

Hello Maintainer,

Python 3.9 deprecated fractions.gcd in favor of math.gcd, this causes a FTBFS in polybar #975795[0]. I believe this issue can cause FTBFS in other packages and thus I picked the serious severity (same one applied to the polybar bug report caused by this).

I have tried to find the correct place to send patches upstream and gave up along the way when I couldn't find the project on freedesktop's gitlab instance[1] and the homepage pointed to an empty bugzilla (which I assume is not used anymore).

I proposed a solution on salsa[2], which I'm also attaching to this email.

I'm also willing to NMU the fix in case the maintainers don't have available time.

Thanks,

[0] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975795
[1] https://gitlab.freedesktop.org
[2] https://salsa.debian.org/xorg-team/proto/xcb-proto/-/merge_requests/2

--
Samuel Henrique <samueloph>
From 0cb3fba7b33aae669d47ea5f30a5a2bc5f21e465 Mon Sep 17 00:00:00 2001
From: Samuel Henrique <samueloph@debian.org>
Date: Sat, 5 Dec 2020 20:07:58 +0000
Subject: [PATCH] d/p/python39-compat.patch: Add patch for python 3.9
 compatibility

---
 debian/patches/python39-compat.patch | 21 +++++++++++++++++++++
 debian/patches/series                |  1 +
 2 files changed, 22 insertions(+)
 create mode 100644 debian/patches/python39-compat.patch
 create mode 100644 debian/patches/series

diff --git a/debian/patches/python39-compat.patch b/debian/patches/python39-compat.patch
new file mode 100644
index 0000000..924ed40
--- /dev/null
+++ b/debian/patches/python39-compat.patch
@@ -0,0 +1,21 @@
+Description: Fix import of deprecated fractions.gcd function (for python >= 3.9)
+Author: Samuel Henrique <samueloph@debian.org>
+Index: xcb-proto/xcbgen/align.py
+===================================================================
+--- xcb-proto.orig/xcbgen/align.py
++++ xcb-proto/xcbgen/align.py
+@@ -2,7 +2,13 @@
+ This module contains helper classes for alignment arithmetic and checks
+ '''
+ 
+-from fractions import gcd
++# python >= 3.9 compatibility
++# fractions.gcd is deprecated since python 3.9
++# math.gcd is available since python 3.5
++try:
++    from fractions import gcd
++except ImportError:
++    from math import gcd
+ 
+ class Alignment(object):
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..5703b40
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+python39-compat.patch
-- 
2.29.2


--- End Message ---
--- Begin Message ---
Source: xcb-proto
Source-Version: 1.14.1-1
Done: Timo Aaltonen <tjaalton@debian.org>

We believe that the bug you reported is fixed in the latest version of
xcb-proto, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 976624@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Timo Aaltonen <tjaalton@debian.org> (supplier of updated xcb-proto package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 07 Dec 2020 22:01:27 +0200
Source: xcb-proto
Architecture: source
Version: 1.14.1-1
Distribution: unstable
Urgency: medium
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Changed-By: Timo Aaltonen <tjaalton@debian.org>
Closes: 976624
Changes:
 xcb-proto (1.14.1-1) unstable; urgency=medium
 .
   * New upstream release. (Closes: #976624)
   * watch: Updated.
Checksums-Sha1:
 359f1a6a05c4b8f6ebb7d5194fb37452186a8a89 1988 xcb-proto_1.14.1-1.dsc
 1bb307b09c25c42058cc36e565a29ec86d7a4b91 194674 xcb-proto_1.14.1.orig.tar.gz
 55a62241a89e84613935f4d06f3515ccd5a06a81 4846 xcb-proto_1.14.1-1.diff.gz
 d9fbfad649fc257848ccb452ac147e4bd3f29baf 7572 xcb-proto_1.14.1-1_source.buildinfo
Checksums-Sha256:
 a03c91002643ef867c52511d51f4cfb7d1fe139aa614574c020b8bb329c2f50b 1988 xcb-proto_1.14.1-1.dsc
 85cd21e9d9fbc341d0dbf11eace98d55d7db89fda724b0e598855fcddf0944fd 194674 xcb-proto_1.14.1.orig.tar.gz
 b702767fd73410fc294d854f60ab595f650dba762e152b56cfdf20462e49962c 4846 xcb-proto_1.14.1-1.diff.gz
 8cdc53c488e51d0ae12d72f6dbed5c98301d1b73cf1270a3a2e37da47c2ba8e7 7572 xcb-proto_1.14.1-1_source.buildinfo
Files:
 b39c634ea8705ccc4e746791a6a05029 1988 libdevel optional xcb-proto_1.14.1-1.dsc
 5e9e22d4dfd5b9d499fb5e2f384fbe26 194674 libdevel optional xcb-proto_1.14.1.orig.tar.gz
 09de1782970bfb5e637fe63a57d6f0ae 4846 libdevel optional xcb-proto_1.14.1-1.diff.gz
 49d3ae5398318bc72cc4626dcbe53742 7572 libdevel optional xcb-proto_1.14.1-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEdS3ifE3rFwGbS2Yjy3AxZaiJhNwFAl/OipMACgkQy3AxZaiJ
hNzhtw//Ze/dt5YJXcKOodn0+nmkzK1iKIkkuyeYwT41mJRx8nbhbUMn+AqUD1E9
Ajt3sn3U1v3dMeW3tn81H4akrx3DI5E/hxtGgnnXB4bUPZL4QCmFSolhHddoFoAX
YJBpDaAis3e76LEAznaxQGx9wa1hUZfzxxZFDJTlburd85msRd4tiMebCLiUkUG8
Wjk0fei3ySZw1D6huQt1awxKb4IhDMwKPCqGk5yzGEeNtZm7rbWf3Y+2dmFjDmAz
n2qaJTRU2ozq5NPllEJLl5JnagVoxrmCN+vdbKwWi/rEAYfOXf3vJ74BlVuP7hjM
CLpUPlUwOe6rbKPhd6n3FTzo2vAN0TnsXrO36pWrbWrN4N3huh77GKEyvdw7iEcu
9+i82Vy2RITQKXiKYt2kSScVgnuoOXBt9ZQBDtt7dcgcmLhkXRbWxkCzH3dxyP+u
ujQBu5IftePIFtP7u6skmLwaubdGHTWtyivsMaax3rBvcHhJ/jDN9xXddre0jyCJ
NJ21LYev9XNi7KJVZvdELtPVMauYldbRAVQ/m8jFrQp9LvltNvoOIboafKqccl5r
+Ha/B6XlcP7rp/UPRuc8ENsYGHccTjx4nOOahkK12QjUo1uPgaI1Lzr1dbZRHYuk
dp71WNvbkZnZ/Uve+gDwzBdtVPL31iXy2v7AM+KTAI92OtoTu70=
=Gf75
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: