Date: Saturday, December 4, 2021 @ 15:48:10
  Author: yan12125
Revision: 1065036

buildbot: fix for Python 3.10

Related tickets/PRs:
* https://github.com/python/cpython/pull/20236
* https://twistedmatrix.com/trac/ticket/10273

Added:
  buildbot/trunk/python310.diff
Modified:
  buildbot/trunk/PKGBUILD

----------------+
 PKGBUILD       |   11 +++++++++--
 python310.diff |   33 +++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2021-12-04 13:32:06 UTC (rev 1065035)
+++ PKGBUILD    2021-12-04 15:48:10 UTC (rev 1065036)
@@ -28,11 +28,13 @@
              git yarn)
 
source=("https://github.com/buildbot/buildbot/releases/download/v$pkgver/buildbot-v$pkgver.gitarchive.tar.gz"{,.asc}
         
"git+https://github.com/buildbot/buildbot-contrib.git#commit=$_bb_contrib_commit";
-        
"buildbot-contrib-systemd-common.patch::https://github.com/buildbot/buildbot-contrib/pull/22.patch";)
+        
"buildbot-contrib-systemd-common.patch::https://github.com/buildbot/buildbot-contrib/pull/22.patch";
+        "python310.diff")
 sha256sums=('da729c7f4dc2e30f5a5d69e34dd629b0b3d97001b12d72aeb691bb2f0ef0efeb'
             'SKIP'
             'SKIP'
-            '896eede4c33a8574d7c29ac4a28cebbe3d7e850931a86e945328f8ea358195a9')
+            '896eede4c33a8574d7c29ac4a28cebbe3d7e850931a86e945328f8ea358195a9'
+            '7ca79a209e5f77dff01bef526d92a0ac08cf65a6ab22f32d03575c97a5b49ebd')
 validpgpkeys=(
   '390EB159056ED56F66AB1092AECD456B4D2531FC'  # Pierre Tardy 
<tar...@gmail.com> (@tardyp on GitHub)
   'FD0004A26EADFE43A4C3F249C6F7AE200374452D'  # Povilas Kanapickas 
<povi...@radix.lt> (@p12tic on GitHub)
@@ -57,6 +59,11 @@
   rm -v master/buildbot/scripts/windows_service.py
   rm -v worker/buildbot_worker/scripts/windows_service.py
 
+  # Fixes for Python 3.10 breakages:
+  # https://github.com/python/cpython/pull/20236
+  # https://twistedmatrix.com/trac/ticket/10273
+  patch -Np1 -i ../python310.diff
+
   cd "$srcdir"/buildbot-contrib
   patch -Np1 -i ../buildbot-contrib-systemd-common.patch
 }

Added: python310.diff
===================================================================
--- python310.diff                              (rev 0)
+++ python310.diff      2021-12-04 15:48:10 UTC (rev 1065036)
@@ -0,0 +1,33 @@
+diff --git a/master/buildbot/test/unit/www/test_ws.py 
b/master/buildbot/test/unit/www/test_ws.py
+index 43dfce5a7..21f4b3b5c 100644
+--- a/master/buildbot/test/unit/www/test_ws.py
++++ b/master/buildbot/test/unit/www/test_ws.py
+@@ -92,7 +92,7 @@ class WsResource(TestReactorMixin, www.WwwTestMixin, 
unittest.TestCase):
+             {
+                 "_id": 1,
+                 "code": 400,
+-                "error": "Invalid method argument 'cmd_ping() got an 
unexpected keyword "
++                "error": "Invalid method argument 'WsProtocol.cmd_ping() got 
an unexpected keyword "
+                 "argument 'foo''",
+             },
+         )
+@@ -106,7 +106,7 @@ class WsResource(TestReactorMixin, www.WwwTestMixin, 
unittest.TestCase):
+             self.proto.sendMessage,
+             {
+                 "id": None,
+-                "message": "Invalid method argument 
'graphql_cmd_connection_init() got an "
++                "message": "Invalid method argument 
'WsProtocol.graphql_cmd_connection_init() got an "
+                 "unexpected keyword argument 'foo''",
+                 "type": "error",
+             },
+diff --git a/master/buildbot/test/__init__.py 
b/master/buildbot/test/__init__.py
+index 8c8f53823..0f176028a 100644
+--- a/master/buildbot/test/__init__.py
++++ b/master/buildbot/test/__init__.py
+@@ -128,3 +128,6 @@ warnings.filterwarnings('ignore', ".*Not importing 
directory .*/sphinxcontrib: m
+ # https://github.com/pypa/setuptools/issues/2086
+ warnings.filterwarnings('ignore', ".*lib2to3 package is deprecated",
+                         category=PendingDeprecationWarning)
++
++warnings.filterwarnings('ignore', r".*currentThread\(\) is deprecated, use 
current_thread\(\) instead.*",
++                        category=DeprecationWarning)

Reply via email to