[arch-commits] Commit in python-twisted/repos/staging-any (3 files)

Evangelos Foutras foutrelis at gemini.archlinux.org
Mon Dec 6 23:12:35 UTC 2021


    Date: Monday, December 6, 2021 @ 23:12:35
  Author: foutrelis
Revision: 430765

archrelease: copy trunk to staging-any

Added:
  python-twisted/repos/staging-any/PKGBUILD
    (from rev 430764, python-twisted/trunk/PKGBUILD)
  python-twisted/repos/staging-any/python310.patch
    (from rev 430764, python-twisted/trunk/python310.patch)
Deleted:
  python-twisted/repos/staging-any/PKGBUILD

-----------------+
 PKGBUILD        |  121 ++++++++++++++++++++++++++++--------------------------
 python310.patch |   69 ++++++++++++++++++++++++++++++
 2 files changed, 132 insertions(+), 58 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-12-06 23:12:30 UTC (rev 430764)
+++ PKGBUILD	2021-12-06 23:12:35 UTC (rev 430765)
@@ -1,58 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: Ionut Biru <ibiru at archlinux.org>
-# Contributor: Juergen Hoetzel <juergen at archlinux.org>
-# Contributor: Douglas Soares de Andrade <douglas at archlinux.org>
-
-pkgname=python-twisted
-pkgver=21.7.0
-pkgrel=3
-pkgdesc="Asynchronous networking framework written in Python"
-arch=('any')
-url="https://twistedmatrix.com/"
-license=('MIT')
-depends=('python-zope-interface' 'python-constantly' 'python-incremental' 'python-automat'
-         'python-hyperlink' 'python-attrs' 'python-typing_extensions')
-makedepends=('python-setuptools')
-optdepends=('python-pyopenssl: for TLS client hostname verification'
-            'python-service-identity: for TLS client hostname verification'
-            'python-idna: for TLS client hostname verification'
-            'python-cryptography: for using conch'
-            'python-pyasn1: for using conch'
-            'python-appdirs: for using conch'
-            'python-bcrypt: for using conch'
-            'python-h2: for http2 support'
-            'python-priority: for http2 support'
-            'python-pyserial: for serial support'
-            'tk: for using tkconch')
-checkdepends=('python-pyhamcrest' 'subversion' 'xorg-server-xvfb' 'tk' 'openssh' 'git' 'gtk3'
-              'python-gobject' 'python-subunit' 'python-h2' 'python-priority' 'python-cryptography'
-              'python-idna' 'python-pyasn1' 'python-pyserial' 'python-bcrypt'
-              'python-cython-test-exception-raiser' 'python-pyopenssl')
-# Conflicts with the command line tools used to be provided by the python2 package.
-conflicts=("python2-twisted<=20.3.0-3")
-source=("https://github.com/twisted/twisted/archive/twisted-$pkgver.tar.gz")
-sha512sums=('a946769a6bc6c72af26e7763b9e0675788f134b4d005ea89d935da1b1d5f60d92c84fdb2615e442e7da2b98291ee8a63d5236ec7ba72ef04ad3f847b092feecb')
-
-prepare() {
-  cd twisted-twisted-$pkgver
-  # Remove upper bounds
-  sed -i 's/, < 4.0//;s/, < 2.0//' setup.cfg
-}
-
-build() {
-  cd twisted-twisted-$pkgver
-  python setup.py build
-}
-
-check() {
-  export LC_CTYPE=en_US.UTF-8
-
-  # tests use the underlying function from the 'python -m twisted.trial' module, to prevent loading system entry points
-  PYTHONPATH="$srcdir/twisted-twisted-$pkgver/build/lib" xvfb-run python -c 'from twisted.scripts.trial import run; run()' twisted || echo "Tests failed"
-}
-
-package() {
-  cd twisted-twisted-$pkgver
-  python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
-  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}

Copied: python-twisted/repos/staging-any/PKGBUILD (from rev 430764, python-twisted/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-12-06 23:12:35 UTC (rev 430765)
@@ -0,0 +1,63 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Ionut Biru <ibiru at archlinux.org>
+# Contributor: Juergen Hoetzel <juergen at archlinux.org>
+# Contributor: Douglas Soares de Andrade <douglas at archlinux.org>
+
+pkgname=python-twisted
+pkgver=21.7.0
+pkgrel=4
+pkgdesc="Asynchronous networking framework written in Python"
+arch=('any')
+url="https://twistedmatrix.com/"
+license=('MIT')
+depends=('python-zope-interface' 'python-constantly' 'python-incremental' 'python-automat'
+         'python-hyperlink' 'python-attrs' 'python-typing_extensions')
+makedepends=('python-setuptools')
+optdepends=('python-pyopenssl: for TLS client hostname verification'
+            'python-service-identity: for TLS client hostname verification'
+            'python-idna: for TLS client hostname verification'
+            'python-cryptography: for using conch'
+            'python-pyasn1: for using conch'
+            'python-appdirs: for using conch'
+            'python-bcrypt: for using conch'
+            'python-h2: for http2 support'
+            'python-priority: for http2 support'
+            'python-pyserial: for serial support'
+            'tk: for using tkconch')
+checkdepends=('python-pyhamcrest' 'subversion' 'xorg-server-xvfb' 'tk' 'openssh' 'git' 'gtk3'
+              'python-gobject' 'python-subunit' 'python-h2' 'python-priority' 'python-cryptography'
+              'python-idna' 'python-pyasn1' 'python-pyserial' 'python-bcrypt'
+              'python-cython-test-exception-raiser' 'python-pyopenssl')
+# Conflicts with the command line tools used to be provided by the python2 package.
+conflicts=("python2-twisted<=20.3.0-3")
+source=("https://github.com/twisted/twisted/archive/twisted-$pkgver.tar.gz"
+        python310.patch)
+sha512sums=('a946769a6bc6c72af26e7763b9e0675788f134b4d005ea89d935da1b1d5f60d92c84fdb2615e442e7da2b98291ee8a63d5236ec7ba72ef04ad3f847b092feecb'
+            '5402256d06cbee74d575bdc57b8a3df2224aad531b083050c7a4e66e61b6ed2610e13de6a4346719318c076cabffce473e5dd0e14638cee6fd1cf930a50608c5')
+
+prepare() {
+  cd twisted-twisted-$pkgver
+  # Avoid currentThread() DeprecationWarning (breaks tests in other packages)
+  # Related upstream PR: https://github.com/twisted/twisted/pull/1671
+  patch -Np1 -i ../python310.patch
+  # Remove upper bounds
+  sed -i 's/, < 4.0//;s/, < 2.0//' setup.cfg
+}
+
+build() {
+  cd twisted-twisted-$pkgver
+  python setup.py build
+}
+
+check() {
+  export LC_CTYPE=en_US.UTF-8
+
+  # tests use the underlying function from the 'python -m twisted.trial' module, to prevent loading system entry points
+  PYTHONPATH="$srcdir/twisted-twisted-$pkgver/build/lib" xvfb-run python -c 'from twisted.scripts.trial import run; run()' twisted || echo "Tests failed"
+}
+
+package() {
+  cd twisted-twisted-$pkgver
+  python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
+  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}

Copied: python-twisted/repos/staging-any/python310.patch (from rev 430764, python-twisted/trunk/python310.patch)
===================================================================
--- python310.patch	                        (rev 0)
+++ python310.patch	2021-12-06 23:12:35 UTC (rev 430765)
@@ -0,0 +1,69 @@
+diff -upr twisted-twisted-21.7.0.orig/src/twisted/internet/test/test_threads.py twisted-twisted-21.7.0/src/twisted/internet/test/test_threads.py
+--- twisted-twisted-21.7.0.orig/src/twisted/internet/test/test_threads.py	2021-07-26 18:03:56.000000000 +0300
++++ twisted-twisted-21.7.0/src/twisted/internet/test/test_threads.py	2021-12-07 00:48:58.573886527 +0200
+@@ -108,13 +108,13 @@ class ThreadTestsBuilder(ReactorBuilder)
+         result = []
+ 
+         def threadCall():
+-            result.append(threading.currentThread())
++            result.append(threading.current_thread())
+             reactor.stop()
+ 
+         reactor.callLater(0, reactor.callInThread, reactor.callFromThread, threadCall)
+         self.runReactor(reactor, 5)
+ 
+-        self.assertEqual(result, [threading.currentThread()])
++        self.assertEqual(result, [threading.current_thread()])
+ 
+     def test_stopThreadPool(self):
+         """
+diff -upr twisted-twisted-21.7.0.orig/src/twisted/python/threadable.py twisted-twisted-21.7.0/src/twisted/python/threadable.py
+--- twisted-twisted-21.7.0.orig/src/twisted/python/threadable.py	2021-07-26 18:03:56.000000000 +0300
++++ twisted-twisted-21.7.0/src/twisted/python/threadable.py	2021-12-07 00:49:02.183979399 +0200
+@@ -104,7 +104,7 @@ _dummyID = object()
+ def getThreadID():
+     if threadingmodule is None:
+         return _dummyID
+-    return threadingmodule.currentThread().ident
++    return threadingmodule.current_thread().ident
+ 
+ 
+ def isInIOThread():
+diff -upr twisted-twisted-21.7.0.orig/src/twisted/python/threadpool.py twisted-twisted-21.7.0/src/twisted/python/threadpool.py
+--- twisted-twisted-21.7.0.orig/src/twisted/python/threadpool.py	2021-07-26 18:03:56.000000000 +0300
++++ twisted-twisted-21.7.0/src/twisted/python/threadpool.py	2021-12-07 00:49:27.894640858 +0200
+@@ -9,7 +9,7 @@ In most cases you can just use C{reactor
+ instead of creating a thread pool directly.
+ """
+ 
+-from threading import Thread, currentThread
++from threading import Thread, current_thread
+ from typing import List
+ 
+ from twisted._threads import pool as _pool
+@@ -44,7 +44,7 @@ class ThreadPool:
+     name = None
+ 
+     threadFactory = Thread
+-    currentThread = staticmethod(currentThread)
++    currentThread = staticmethod(current_thread)
+     _pool = staticmethod(_pool)
+ 
+     def __init__(self, minthreads=5, maxthreads=20, name=None):
+diff -upr twisted-twisted-21.7.0.orig/src/twisted/test/test_threadpool.py twisted-twisted-21.7.0/src/twisted/test/test_threadpool.py
+--- twisted-twisted-21.7.0.orig/src/twisted/test/test_threadpool.py	2021-07-26 18:03:56.000000000 +0300
++++ twisted-twisted-21.7.0/src/twisted/test/test_threadpool.py	2021-12-07 00:49:41.461656589 +0200
+@@ -404,11 +404,11 @@ class ThreadPoolTests(unittest.Synchrono
+         event = threading.Event()
+ 
+         def onResult(success, result):
+-            threadIds.append(threading.currentThread().ident)
++            threadIds.append(threading.current_thread().ident)
+             event.set()
+ 
+         def func():
+-            threadIds.append(threading.currentThread().ident)
++            threadIds.append(threading.current_thread().ident)
+ 
+         tp = threadpool.ThreadPool(0, 1)
+         tp.callInThreadWithCallback(onResult, func)



More information about the arch-commits mailing list