[arch-commits] Commit in python-imdbpy/trunk (2 files)

Evangelos Foutras foutrelis at archlinux.org
Fri Nov 27 11:58:16 UTC 2020


    Date: Friday, November 27, 2020 @ 11:58:15
  Author: foutrelis
Revision: 764081

upgpkg: python-imdbpy 2020.9.25-3: restore locales

Added:
  python-imdbpy/trunk/msgfmt.py-use-array.tobytes-on-Python-3.2.patch
Modified:
  python-imdbpy/trunk/PKGBUILD

-------------------------------------------------+
 PKGBUILD                                        |   12 ++++++----
 msgfmt.py-use-array.tobytes-on-Python-3.2.patch |   26 ++++++++++++++++++++++
 2 files changed, 34 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-11-27 11:58:14 UTC (rev 764080)
+++ PKGBUILD	2020-11-27 11:58:15 UTC (rev 764081)
@@ -3,7 +3,7 @@
 _name=IMDbPY
 pkgname=python-imdbpy
 pkgver=2020.9.25
-pkgrel=2
+pkgrel=3
 pkgdesc="Python bindings for the Internet Movie Database (IMDb)"
 url="https://imdbpy.sourceforge.io/"
 arch=('any')
@@ -10,12 +10,16 @@
 license=('GPL2')
 depends=('python-lxml' 'python-sqlalchemy' 'python-setuptools')
 checkdepends=('python-pytest')
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
-sha512sums=('5cea5146ace93b525be97ce5f3d8bb037be2e43280b3893c5475b8b2f84265e61db72ef935b1a50c341577a22ce4c98ac6d052eb047868fa88fb2dd3fab6d86a')
-b2sums=('a703682d11d798c182bb4fe0a93f8dd50c9e673ff8bb6f1acbea768121c32ec6c3293a559b48381e547c21b12103732d537c6402f0f9c3851016ae0d36376d32')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz"
+        msgfmt.py-use-array.tobytes-on-Python-3.2.patch)
+sha512sums=('5cea5146ace93b525be97ce5f3d8bb037be2e43280b3893c5475b8b2f84265e61db72ef935b1a50c341577a22ce4c98ac6d052eb047868fa88fb2dd3fab6d86a'
+            '45589039aeaaf84a3d17097d655ee3abb6f2ebd0c1cc759b1665aafe075cd91e6a8862659a5b9732182d484ea4ae5775f77ed27f89e69fef0687b9c7fc5a7577')
+b2sums=('a703682d11d798c182bb4fe0a93f8dd50c9e673ff8bb6f1acbea768121c32ec6c3293a559b48381e547c21b12103732d537c6402f0f9c3851016ae0d36376d32'
+        '1d29c8c255ecfbd2cb5143efd8122a7d12ce2b922704a3e4c379de37b00b24df4231a6569d0eb9e12dcdd31b2426603dca369c50bf882ee86996fe039d539e57')
 
 prepare() {
   mv -v "${_name}-${pkgver}" "${pkgname}-${pkgver}"
+  patch -Np1 -d "${pkgname}-${pkgver}" <msgfmt.py-use-array.tobytes-on-Python-3.2.patch
 }
 
 build() {

Added: msgfmt.py-use-array.tobytes-on-Python-3.2.patch
===================================================================
--- msgfmt.py-use-array.tobytes-on-Python-3.2.patch	                        (rev 0)
+++ msgfmt.py-use-array.tobytes-on-Python-3.2.patch	2020-11-27 11:58:15 UTC (rev 764081)
@@ -0,0 +1,26 @@
+From aab4cf9fb5a053890f4e8afac73fbbffe42f40bf Mon Sep 17 00:00:00 2001
+From: Evangelos Foutras <evangelos at foutrelis.com>
+Date: Fri, 27 Nov 2020 13:44:42 +0200
+Subject: [PATCH] msgfmt.py: use array.tobytes() on Python >= 3.2
+
+array.tostring() was deprecated in Python 3.2 and removed in 3.9.
+---
+ imdb/locale/msgfmt.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/imdb/locale/msgfmt.py b/imdb/locale/msgfmt.py
+index 52cbfa5..8861b06 100644
+--- a/imdb/locale/msgfmt.py
++++ b/imdb/locale/msgfmt.py
+@@ -87,7 +87,10 @@ def generate():
+                          7*4,               # start of key index
+                          7*4+len(keys)*8,   # start of value index
+                          0, 0)              # size and offset of hash table
+-    output += array.array("i", offsets).tostring()
++    if sys.version_info < (3, 2):
++        output += array.array("i", offsets).tostring()
++    else:
++        output += array.array("i", offsets).tobytes()
+     output += ids
+     output += strs
+     return output



More information about the arch-commits mailing list