All of lore.kernel.org
 help / color / mirror / Atom feed
* [1.50][PATCH 0/4] Backport fixes for python 3.10
@ 2021-11-18 16:26 Jacob Kroon
  2021-11-18 16:26 ` [1.50][PATCH 1/4] bitbake: correct the collections vs collections.abc deprecation Jacob Kroon
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Jacob Kroon @ 2021-11-18 16:26 UTC (permalink / raw)
  To: bitbake-devel

Backport fixes for running bitbake on Fedora 35, which ships with
python 3.10.

Alexander Kanavin (3):
  bitbake: correct the collections vs collections.abc deprecation
  bitbake: adjust parser error check for python 3.10 compatibility
  bitbake: correct deprecation warning in process.py

Justin Bronder (1):
  hashserv: let asyncio discover the running loop

 lib/bb/cache.py          | 3 ++-
 lib/bb/data_smart.py     | 4 ++--
 lib/bb/persist_data.py   | 5 +++--
 lib/bb/server/process.py | 2 +-
 lib/hashserv/server.py   | 4 ++--
 5 files changed, 10 insertions(+), 8 deletions(-)



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [1.50][PATCH 1/4] bitbake: correct the collections vs collections.abc deprecation
  2021-11-18 16:26 [1.50][PATCH 0/4] Backport fixes for python 3.10 Jacob Kroon
@ 2021-11-18 16:26 ` Jacob Kroon
  2021-11-18 16:26 ` [1.50][PATCH 2/4] hashserv: let asyncio discover the running loop Jacob Kroon
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Jacob Kroon @ 2021-11-18 16:26 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Alexander Kanavin, Alexander Kanavin, Richard Purdie

From: Alexander Kanavin <alex.kanavin@gmail.com>

This becomes a hard error in python 3.10.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit ae219e1f7460077f4492b31ac91cef4cf9b17277)
Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
---
 lib/bb/cache.py        | 3 ++-
 lib/bb/data_smart.py   | 2 +-
 lib/bb/persist_data.py | 5 +++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index 27eb2717..5f9c0a77 100644
--- a/lib/bb/cache.py
+++ b/lib/bb/cache.py
@@ -19,7 +19,8 @@
 import os
 import logging
 import pickle
-from collections import defaultdict, Mapping
+from collections import defaultdict
+from collections.abc import Mapping
 import bb.utils
 from bb import PrefixLoggerAdapter
 import re
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index 8291ca65..aa9ac2c8 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -17,7 +17,7 @@ BitBake build tools.
 # Based on functions from the base bb module, Copyright 2003 Holger Schurig
 
 import copy, re, sys, traceback
-from collections import MutableMapping
+from collections.abc import MutableMapping
 import logging
 import hashlib
 import bb, bb.codeparser
diff --git a/lib/bb/persist_data.py b/lib/bb/persist_data.py
index c6a209fb..6f32d81a 100644
--- a/lib/bb/persist_data.py
+++ b/lib/bb/persist_data.py
@@ -12,6 +12,7 @@ currently, providing a key/value store accessed by 'domain'.
 #
 
 import collections
+import collections.abc
 import contextlib
 import functools
 import logging
@@ -19,7 +20,7 @@ import os.path
 import sqlite3
 import sys
 import warnings
-from collections import Mapping
+from collections.abc import Mapping
 
 sqlversion = sqlite3.sqlite_version_info
 if sqlversion[0] < 3 or (sqlversion[0] == 3 and sqlversion[1] < 3):
@@ -29,7 +30,7 @@ if sqlversion[0] < 3 or (sqlversion[0] == 3 and sqlversion[1] < 3):
 logger = logging.getLogger("BitBake.PersistData")
 
 @functools.total_ordering
-class SQLTable(collections.MutableMapping):
+class SQLTable(collections.abc.MutableMapping):
     class _Decorators(object):
         @staticmethod
         def retry(*, reconnect=True):


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [1.50][PATCH 2/4] hashserv: let asyncio discover the running loop
  2021-11-18 16:26 [1.50][PATCH 0/4] Backport fixes for python 3.10 Jacob Kroon
  2021-11-18 16:26 ` [1.50][PATCH 1/4] bitbake: correct the collections vs collections.abc deprecation Jacob Kroon
@ 2021-11-18 16:26 ` Jacob Kroon
  2021-11-18 16:26 ` [1.50][PATCH 3/4] bitbake: adjust parser error check for python 3.10 compatibility Jacob Kroon
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Jacob Kroon @ 2021-11-18 16:26 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Justin Bronder, Steve Sakoman, Richard Purdie

From: Justin Bronder <jsbronder@cold-front.org>

>From 3.10 documentation [1]:
    Deprecated since version 3.8, removed in version 3.10: The loop
    parameter. This function has been implicitly getting the current
    running loop since 3.7

This is fixed in master as a side-effect of
cf9bc0310b0092bf52b61057405aeb51c86ba137 which is more intrusive but
likewise drops the loop parameter.

1. https://docs.python.org/3/library/asyncio-stream.html#asyncio.open_connection

Signed-off-by: Justin Bronder <jsbronder@cold-front.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 74a1e71b1e677a482fdedc685a71a1798ad63920)
Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
---
 lib/hashserv/server.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/hashserv/server.py b/lib/hashserv/server.py
index a0dc0c17..df0fa0a0 100644
--- a/lib/hashserv/server.py
+++ b/lib/hashserv/server.py
@@ -521,7 +521,7 @@ class Server(object):
 
     def start_tcp_server(self, host, port):
         self.server = self.loop.run_until_complete(
-            asyncio.start_server(self.handle_client, host, port, loop=self.loop)
+            asyncio.start_server(self.handle_client, host, port)
         )
 
         for s in self.server.sockets:
@@ -546,7 +546,7 @@ class Server(object):
             # Work around path length limits in AF_UNIX
             os.chdir(os.path.dirname(path))
             self.server = self.loop.run_until_complete(
-                asyncio.start_unix_server(self.handle_client, os.path.basename(path), loop=self.loop)
+                asyncio.start_unix_server(self.handle_client, os.path.basename(path))
             )
         finally:
             os.chdir(cwd)


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [1.50][PATCH 3/4] bitbake: adjust parser error check for python 3.10 compatibility
  2021-11-18 16:26 [1.50][PATCH 0/4] Backport fixes for python 3.10 Jacob Kroon
  2021-11-18 16:26 ` [1.50][PATCH 1/4] bitbake: correct the collections vs collections.abc deprecation Jacob Kroon
  2021-11-18 16:26 ` [1.50][PATCH 2/4] hashserv: let asyncio discover the running loop Jacob Kroon
@ 2021-11-18 16:26 ` Jacob Kroon
  2021-11-18 16:26 ` [1.50][PATCH 4/4] bitbake: correct deprecation warning in process.py Jacob Kroon
  2021-11-18 23:35 ` [bitbake-devel] [1.50][PATCH 0/4] Backport fixes for python 3.10 Mittal, Anuj
  4 siblings, 0 replies; 7+ messages in thread
From: Jacob Kroon @ 2021-11-18 16:26 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Alexander Kanavin, Alexander Kanavin, Richard Purdie

From: Alexander Kanavin <alex.kanavin@gmail.com>

The change was introduced in
https://github.com/python/cpython/commit/a698d52c3975c80b45b139b2f08402ec514dce75

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 8d3c6cbbe6ee734495713ae3b99c609527842506)
Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
---
 lib/bb/data_smart.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index aa9ac2c8..65857a9c 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -403,7 +403,7 @@ class DataSmart(MutableMapping):
                     s = __expand_python_regexp__.sub(varparse.python_sub, s)
                 except SyntaxError as e:
                     # Likely unmatched brackets, just don't expand the expression
-                    if e.msg != "EOL while scanning string literal":
+                    if e.msg != "EOL while scanning string literal" and not e.msg.startswith("unterminated string literal"):
                         raise
                 if s == olds:
                     break


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [1.50][PATCH 4/4] bitbake: correct deprecation warning in process.py
  2021-11-18 16:26 [1.50][PATCH 0/4] Backport fixes for python 3.10 Jacob Kroon
                   ` (2 preceding siblings ...)
  2021-11-18 16:26 ` [1.50][PATCH 3/4] bitbake: adjust parser error check for python 3.10 compatibility Jacob Kroon
@ 2021-11-18 16:26 ` Jacob Kroon
  2021-11-18 23:35 ` [bitbake-devel] [1.50][PATCH 0/4] Backport fixes for python 3.10 Mittal, Anuj
  4 siblings, 0 replies; 7+ messages in thread
From: Jacob Kroon @ 2021-11-18 16:26 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Alexander Kanavin, Alexander Kanavin, Richard Purdie

From: Alexander Kanavin <alex.kanavin@gmail.com>

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit aff52fe21a0b27f6302555c1e52a864550eb46ce)
Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
---
 lib/bb/server/process.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 07bb785a..fcdce197 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -659,7 +659,7 @@ class BBUIEventQueue:
         self.reader = ConnectionReader(readfd)
 
         self.t = threading.Thread()
-        self.t.setDaemon(True)
+        self.t.daemon = True
         self.t.run = self.startCallbackHandler
         self.t.start()
 


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* RE: [bitbake-devel] [1.50][PATCH 0/4] Backport fixes for python 3.10
  2021-11-18 16:26 [1.50][PATCH 0/4] Backport fixes for python 3.10 Jacob Kroon
                   ` (3 preceding siblings ...)
  2021-11-18 16:26 ` [1.50][PATCH 4/4] bitbake: correct deprecation warning in process.py Jacob Kroon
@ 2021-11-18 23:35 ` Mittal, Anuj
  2021-11-19  5:11   ` Jacob Kroon
  4 siblings, 1 reply; 7+ messages in thread
From: Mittal, Anuj @ 2021-11-18 23:35 UTC (permalink / raw)
  To: Jacob Kroon, bitbake-devel

Thanks, I already have these in my queue and would be sent as part of next merge request.

https://cgit.openembedded.org/bitbake-contrib/log/?h=anujm/1.50

Thanks,

Anuj

> -----Original Message-----
> From: bitbake-devel@lists.openembedded.org <bitbake-
> devel@lists.openembedded.org> On Behalf Of Jacob Kroon
> Sent: Friday, November 19, 2021 12:26 AM
> To: bitbake-devel@lists.openembedded.org
> Subject: [bitbake-devel] [1.50][PATCH 0/4] Backport fixes for python 3.10
> 
> Backport fixes for running bitbake on Fedora 35, which ships with python 3.10.
> 
> Alexander Kanavin (3):
>   bitbake: correct the collections vs collections.abc deprecation
>   bitbake: adjust parser error check for python 3.10 compatibility
>   bitbake: correct deprecation warning in process.py
> 
> Justin Bronder (1):
>   hashserv: let asyncio discover the running loop
> 
>  lib/bb/cache.py          | 3 ++-
>  lib/bb/data_smart.py     | 4 ++--
>  lib/bb/persist_data.py   | 5 +++--
>  lib/bb/server/process.py | 2 +-
>  lib/hashserv/server.py   | 4 ++--
>  5 files changed, 10 insertions(+), 8 deletions(-)



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [bitbake-devel] [1.50][PATCH 0/4] Backport fixes for python 3.10
  2021-11-18 23:35 ` [bitbake-devel] [1.50][PATCH 0/4] Backport fixes for python 3.10 Mittal, Anuj
@ 2021-11-19  5:11   ` Jacob Kroon
  0 siblings, 0 replies; 7+ messages in thread
From: Jacob Kroon @ 2021-11-19  5:11 UTC (permalink / raw)
  To: Mittal, Anuj, bitbake-devel

On 11/19/21 00:35, Mittal, Anuj wrote:
> Thanks, I already have these in my queue and would be sent as part of next merge request.
> 
> https://cgit.openembedded.org/bitbake-contrib/log/?h=anujm/1.50
> 
> Thanks,
> 
> Anuj
> 

Super! Thanks Anuj

/Jacob

>> -----Original Message-----
>> From: bitbake-devel@lists.openembedded.org <bitbake-
>> devel@lists.openembedded.org> On Behalf Of Jacob Kroon
>> Sent: Friday, November 19, 2021 12:26 AM
>> To: bitbake-devel@lists.openembedded.org
>> Subject: [bitbake-devel] [1.50][PATCH 0/4] Backport fixes for python 3.10
>>
>> Backport fixes for running bitbake on Fedora 35, which ships with python 3.10.
>>
>> Alexander Kanavin (3):
>>    bitbake: correct the collections vs collections.abc deprecation
>>    bitbake: adjust parser error check for python 3.10 compatibility
>>    bitbake: correct deprecation warning in process.py
>>
>> Justin Bronder (1):
>>    hashserv: let asyncio discover the running loop
>>
>>   lib/bb/cache.py          | 3 ++-
>>   lib/bb/data_smart.py     | 4 ++--
>>   lib/bb/persist_data.py   | 5 +++--
>>   lib/bb/server/process.py | 2 +-
>>   lib/hashserv/server.py   | 4 ++--
>>   5 files changed, 10 insertions(+), 8 deletions(-)
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-11-19  5:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 16:26 [1.50][PATCH 0/4] Backport fixes for python 3.10 Jacob Kroon
2021-11-18 16:26 ` [1.50][PATCH 1/4] bitbake: correct the collections vs collections.abc deprecation Jacob Kroon
2021-11-18 16:26 ` [1.50][PATCH 2/4] hashserv: let asyncio discover the running loop Jacob Kroon
2021-11-18 16:26 ` [1.50][PATCH 3/4] bitbake: adjust parser error check for python 3.10 compatibility Jacob Kroon
2021-11-18 16:26 ` [1.50][PATCH 4/4] bitbake: correct deprecation warning in process.py Jacob Kroon
2021-11-18 23:35 ` [bitbake-devel] [1.50][PATCH 0/4] Backport fixes for python 3.10 Mittal, Anuj
2021-11-19  5:11   ` Jacob Kroon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.