[arch-commits] Commit in python-fields/trunk (PKGBUILD python310.patch)

Evangelos Foutras foutrelis at gemini.archlinux.org
Thu Dec 2 03:20:05 UTC 2021


    Date: Thursday, December 2, 2021 @ 03:20:04
  Author: foutrelis
Revision: 1061564

Fix doctest with Python 3.10

Added:
  python-fields/trunk/python310.patch
Modified:
  python-fields/trunk/PKGBUILD

-----------------+
 PKGBUILD        |   10 +++++++---
 python310.patch |   12 ++++++++++++
 2 files changed, 19 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-12-02 03:17:33 UTC (rev 1061563)
+++ PKGBUILD	2021-12-02 03:20:04 UTC (rev 1061564)
@@ -11,11 +11,15 @@
 depends=('python')
 makedepends=('python-setuptools')
 checkdepends=('python-pytest' 'python-attrs' 'python-characteristic')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/ionelmc/python-fields/archive/v$pkgver.tar.gz")
-sha512sums=('feaba23b98271936d6dae20b1001978483c0fe89ccf217637fac536ae5814c2c02bac1c3ddc2a86dc0d2419a3b3658871018c0ea4b7905e1c2649aa905b8e5a3')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/ionelmc/python-fields/archive/v$pkgver.tar.gz"
+        python310.patch)
+sha512sums=('feaba23b98271936d6dae20b1001978483c0fe89ccf217637fac536ae5814c2c02bac1c3ddc2a86dc0d2419a3b3658871018c0ea4b7905e1c2649aa905b8e5a3'
+            '72876eba870204558d4f1a8216be5e2240406e669929605919b1adeb03a9cf230909d7658c26197189e61bd4005bcb00665c652bff6f14a97cdff881e6b45f80')
 
 prepare() {
-  sed -i 's/\[pytest\]/[tool:pytest]/;s/--benchmark-disable//' python-fields-$pkgver/setup.cfg
+  cd $pkgname-$pkgver
+  patch -Np1 -i ../python310.patch
+  sed -i 's/\[pytest\]/[tool:pytest]/;s/--benchmark-disable//' setup.cfg
 }
 
 build() {

Added: python310.patch
===================================================================
--- python310.patch	                        (rev 0)
+++ python310.patch	2021-12-02 03:20:04 UTC (rev 1061564)
@@ -0,0 +1,12 @@
+diff -upr python-fields-5.0.0.orig/README.rst python-fields-5.0.0/README.rst
+--- python-fields-5.0.0.orig/README.rst	2016-04-13 23:51:23.000000000 +0300
++++ python-fields-5.0.0/README.rst	2021-12-02 05:18:29.428981402 +0200
+@@ -292,7 +292,7 @@ Ugly, inconsistent - you don't own the c
+         >>> MyContainer(field1=1, field2=2)
+         Traceback (most recent call last):
+             ...
+-        TypeError: __init__() ... arguments...
++        TypeError: ...__init__() ... arguments...
+ 
+     This is bananas. You have to write your class *around* these quirks.
+ 



More information about the arch-commits mailing list