Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/1] utils/genrandconfig: switch to async/await format
@ 2024-05-28 13:22 James Hilliard
  2024-05-28 13:31 ` Baruch Siach via buildroot
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: James Hilliard @ 2024-05-28 13:22 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard

This requires python 3.5 or newer but is a bit cleaner than the
previous coroutine method.

This should also fix a python3.12 issue:
[Tue, 28 May 2024 13:09:05] INFO: generate the configuration
Traceback (most recent call last):
  File "/home/autobuild/autobuild/instance-0/buildroot/utils/genrandconfig", line 833, in <module>
    ret = asyncio.run(gen_config(args))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/asyncio/runners.py", line 89, in run
    raise ValueError("a coroutine was expected, got {!r}".format(coro))
ValueError: a coroutine was expected, got <generator object gen_config at 0xffff7bd822c0>
[Tue, 28 May 2024 13:09:06] WARN: failed to generate configuration

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
Changes v1 -> v2:
  - rebase
  - update commit message with python 3.12 fix info
---
 utils/genrandconfig | 62 +++++++++++++++++----------------------------
 1 file changed, 23 insertions(+), 39 deletions(-)

diff --git a/utils/genrandconfig b/utils/genrandconfig
index df6bede158..b838dda34d 100755
--- a/utils/genrandconfig
+++ b/utils/genrandconfig
@@ -28,11 +28,6 @@ import traceback
 from distutils.version import StrictVersion
 import platform
 
-if sys.version_info < (3, 8):
-    from asyncio import coroutine
-else:
-    from types import coroutine
-
 
 class SystemInfo:
     DEFAULT_NEEDED_PROGS = ["make", "git", "gcc", "timeout"]
@@ -60,8 +55,7 @@ class SystemInfo:
         # --
         return None
 
-    @coroutine
-    def has(self, prog):
+    async def has(self, prog):
         """Checks whether a program is available.
         Lazily evaluates missing entries.
 
@@ -76,11 +70,11 @@ class SystemInfo:
         have_it = self.find_prog(prog)
         # java[c] needs special care
         if have_it and prog in ('java', 'javac'):
-            proc = yield from asyncio.create_subprocess_shell(
+            proc = await asyncio.create_subprocess_shell(
                 "%s -version | grep gcj" % prog,
                 stdout=asyncio.subprocess.DEVNULL,
                 stderr=asyncio.subprocess.DEVNULL)
-            ret = yield from proc.wait()
+            ret = await proc.wait()
             if ret != 1:
                 have_it = False
         # --
@@ -159,8 +153,7 @@ def get_toolchain_configs(toolchains_csv, buildrootdir):
     return configs
 
 
-@coroutine
-def is_toolchain_usable(configfile, config):
+async def is_toolchain_usable(configfile, config):
     """Check if the toolchain is actually usable."""
 
     with open(configfile) as configf:
@@ -180,9 +173,9 @@ def is_toolchain_usable(configfile, config):
            'BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64=y\n' in configlines or \
            'BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_BE=y\n' in configlines or \
            'BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB=y\n' in configlines:
-            proc = yield from asyncio.create_subprocess_exec(
+            proc = await asyncio.create_subprocess_exec(
                 'ldd', '--version', stdout=asyncio.subprocess.PIPE)
-            ldd_version_output, _ = yield from proc.communicate()
+            ldd_version_output, _ = await proc.communicate()
             if proc.returncode:
                 return False
             glibc_version = ldd_version_output.decode().splitlines()[0].split()[-1]
@@ -193,8 +186,7 @@ def is_toolchain_usable(configfile, config):
     return True
 
 
-@coroutine
-def fixup_config(sysinfo, configfile):
+async def fixup_config(sysinfo, configfile):
     """Finalize the configuration and reject any problematic combinations
 
     This function returns 'True' when the configuration has been
@@ -210,8 +202,7 @@ def fixup_config(sysinfo, configfile):
 
     BR2_TOOLCHAIN_EXTERNAL_URL = 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/'
 
-    has_java = yield from sysinfo.has("java")
-    if "BR2_NEEDS_HOST_JAVA=y\n" in configlines and not has_java:
+    if "BR2_NEEDS_HOST_JAVA=y\n" in configlines and not await sysinfo.has("java"):
         return False
     # The ctng toolchain is affected by PR58854
     if 'BR2_PACKAGE_LTTNG_TOOLS=y\n' in configlines and \
@@ -669,8 +660,7 @@ def fixup_config(sysinfo, configfile):
     return True
 
 
-@coroutine
-def gen_config(args):
+async def gen_config(args):
     """Generate a new random configuration
 
     This function generates the configuration, by choosing a random
@@ -728,8 +718,7 @@ def gen_config(args):
 
     # Randomly enable BR2_REPRODUCIBLE 10% of times
     # also enable tar filesystem images for testing
-    has_diffoscope = yield from sysinfo.has("diffoscope")
-    if has_diffoscope and randint(0, 10) == 0:
+    if await sysinfo.has("diffoscope") and randint(0, 10) == 0:
         configlines.append("BR2_REPRODUCIBLE=y\n")
         configlines.append("BR2_TARGET_ROOTFS_TAR=y\n")
 
@@ -743,14 +732,13 @@ def gen_config(args):
     with open(configfile, "w+") as configf:
         configf.writelines(configlines)
 
-    proc = yield from asyncio.create_subprocess_exec(
+    proc = await asyncio.create_subprocess_exec(
         "make", "O=%s" % args.outputdir, "-C", args.buildrootdir, "olddefconfig")
-    ret = yield from proc.wait()
+    ret = await proc.wait()
     if ret:
         return ret
 
-    toolchain_usable = yield from is_toolchain_usable(configfile, toolchainconfig)
-    if not toolchain_usable:
+    if not await is_toolchain_usable(configfile, toolchainconfig):
         return 2
 
     # Now, generate the random selection of packages, and fixup
@@ -764,37 +752,33 @@ def gen_config(args):
                   file=sys.stderr)
             return 1
         bounded_loop -= 1
-        make_rand = [
+        proc = await asyncio.create_subprocess_exec(
             "make", "O=%s" % args.outputdir, "-C", args.buildrootdir,
             "KCONFIG_SEED=0x%s" % hexlify(os.urandom(4)).decode("ascii").upper(),
             "KCONFIG_PROBABILITY=%d" % randint(1, 20),
-            "randpackageconfig" if args.toolchains_csv else "randconfig"
-        ]
-        proc = yield from asyncio.create_subprocess_exec(*make_rand)
-        ret = yield from proc.wait()
+            "randpackageconfig" if args.toolchains_csv else "randconfig")
+        ret = await proc.wait()
         if ret:
             return ret
 
-        ret = yield from fixup_config(sysinfo, configfile)
-        if ret:
+        if await fixup_config(sysinfo, configfile):
             break
 
-    proc = yield from asyncio.create_subprocess_exec(
+    proc = await asyncio.create_subprocess_exec(
         "make", "O=%s" % args.outputdir, "-C", args.buildrootdir, "olddefconfig")
-    ret = yield from proc.wait()
+    ret = await proc.wait()
     if ret:
         return ret
 
-    proc = yield from asyncio.create_subprocess_exec(
+    proc = await asyncio.create_subprocess_exec(
         "make", "O=%s" % args.outputdir, "-C", args.buildrootdir, "savedefconfig")
-    ret = yield from proc.wait()
+    ret = await proc.wait()
     if ret:
         return ret
 
-    proc = yield from asyncio.create_subprocess_exec(
+    proc = await asyncio.create_subprocess_exec(
         "make", "O=%s" % args.outputdir, "-C", args.buildrootdir, "dependencies")
-    ret = yield from proc.wait()
-    return ret
+    return await proc.wait()
 
 
 if __name__ == '__main__':
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2 1/1] utils/genrandconfig: switch to async/await format
  2024-05-28 13:22 [Buildroot] [PATCH v2 1/1] utils/genrandconfig: switch to async/await format James Hilliard
@ 2024-05-28 13:31 ` Baruch Siach via buildroot
  2024-05-28 13:33   ` James Hilliard
  2024-05-31 18:48 ` [Buildroot] [External] - " Vincent Fazio
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Baruch Siach via buildroot @ 2024-05-28 13:31 UTC (permalink / raw)
  To: James Hilliard; +Cc: buildroot

Hi James,

On Tue, May 28 2024, James Hilliard wrote:
> This requires python 3.5 or newer but is a bit cleaner than the
> previous coroutine method.

This requires an update of BR2_PYTHON3_VERSION_MIN in
support/dependencies/check-host-python3.mk.

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2 1/1] utils/genrandconfig: switch to async/await format
  2024-05-28 13:31 ` Baruch Siach via buildroot
@ 2024-05-28 13:33   ` James Hilliard
  2024-05-28 13:45     ` Baruch Siach via buildroot
  0 siblings, 1 reply; 7+ messages in thread
From: James Hilliard @ 2024-05-28 13:33 UTC (permalink / raw)
  To: Baruch Siach; +Cc: buildroot

On Tue, May 28, 2024 at 7:31 AM Baruch Siach <baruch@tkos.co.il> wrote:
>
> Hi James,
>
> On Tue, May 28 2024, James Hilliard wrote:
> > This requires python 3.5 or newer but is a bit cleaner than the
> > previous coroutine method.
>
> This requires an update of BR2_PYTHON3_VERSION_MIN in
> support/dependencies/check-host-python3.mk.

I don't think this script uses host-python3 at all, it's mostly used for
autobuilders which always use the system python right?

>
> baruch
>
> --
>                                                      ~. .~   Tk Open Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
>    - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2 1/1] utils/genrandconfig: switch to async/await format
  2024-05-28 13:33   ` James Hilliard
@ 2024-05-28 13:45     ` Baruch Siach via buildroot
  0 siblings, 0 replies; 7+ messages in thread
From: Baruch Siach via buildroot @ 2024-05-28 13:45 UTC (permalink / raw)
  To: James Hilliard; +Cc: buildroot

Hi James,

On Tue, May 28 2024, James Hilliard wrote:
> On Tue, May 28, 2024 at 7:31 AM Baruch Siach <baruch@tkos.co.il> wrote:
>> On Tue, May 28 2024, James Hilliard wrote:
>> > This requires python 3.5 or newer but is a bit cleaner than the
>> > previous coroutine method.
>>
>> This requires an update of BR2_PYTHON3_VERSION_MIN in
>> support/dependencies/check-host-python3.mk.
>
> I don't think this script uses host-python3 at all, it's mostly used for
> autobuilders which always use the system python right?

Right. Nothing in Buildroot references the genrandconfig script.

Sorry for the noise,
baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [External] - [PATCH v2 1/1] utils/genrandconfig: switch to async/await format
  2024-05-28 13:22 [Buildroot] [PATCH v2 1/1] utils/genrandconfig: switch to async/await format James Hilliard
  2024-05-28 13:31 ` Baruch Siach via buildroot
@ 2024-05-31 18:48 ` Vincent Fazio
  2024-05-31 19:23 ` [Buildroot] " Yann E. MORIN
  2024-06-08 16:52 ` Peter Korsgaard
  3 siblings, 0 replies; 7+ messages in thread
From: Vincent Fazio @ 2024-05-31 18:48 UTC (permalink / raw)
  To: James Hilliard, buildroot@buildroot.org

James, All

> -----Original Message-----
> From: buildroot <buildroot-bounces@buildroot.org> On Behalf Of James
> Hilliard
> Sent: Tuesday, May 28, 2024 8:22 AM
> To: buildroot@buildroot.org
> Cc: James Hilliard <james.hilliard1@gmail.com>
> Subject: [External] - [Buildroot] [PATCH v2 1/1] utils/genrandconfig: switch to
> async/await format
> 
> This requires python 3.5 or newer but is a bit cleaner than the previous
> coroutine method.
> 
> This should also fix a python3.12 issue:
> [Tue, 28 May 2024 13:09:05] INFO: generate the configuration Traceback
> (most recent call last):
>   File "/home/autobuild/autobuild/instance-0/buildroot/utils/genrandconfig",
> line 833, in <module>
>     ret = asyncio.run(gen_config(args))
>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
>     return runner.run(main)
>            ^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3.12/asyncio/runners.py", line 89, in run
>     raise ValueError("a coroutine was expected, got {!r}".format(coro))
> ValueError: a coroutine was expected, got <generator object gen_config at
> 0xffff7bd822c0> [Tue, 28 May 2024 13:09:06] WARN: failed to generate
> configuration
> 
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

Reviewed-by: Vincent Fazio <vfazio@xes-inc.com>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2 1/1] utils/genrandconfig: switch to async/await format
  2024-05-28 13:22 [Buildroot] [PATCH v2 1/1] utils/genrandconfig: switch to async/await format James Hilliard
  2024-05-28 13:31 ` Baruch Siach via buildroot
  2024-05-31 18:48 ` [Buildroot] [External] - " Vincent Fazio
@ 2024-05-31 19:23 ` Yann E. MORIN
  2024-06-08 16:52 ` Peter Korsgaard
  3 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2024-05-31 19:23 UTC (permalink / raw)
  To: James Hilliard; +Cc: buildroot

James, all,

On 2024-05-28 07:22 -0600, James Hilliard spake thusly:
> This requires python 3.5 or newer but is a bit cleaner than the
> previous coroutine method.
> 
> This should also fix a python3.12 issue:
> [Tue, 28 May 2024 13:09:05] INFO: generate the configuration
> Traceback (most recent call last):
>   File "/home/autobuild/autobuild/instance-0/buildroot/utils/genrandconfig", line 833, in <module>
>     ret = asyncio.run(gen_config(args))
>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
>     return runner.run(main)
>            ^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3.12/asyncio/runners.py", line 89, in run
>     raise ValueError("a coroutine was expected, got {!r}".format(coro))
> ValueError: a coroutine was expected, got <generator object gen_config at 0xffff7bd822c0>
> [Tue, 28 May 2024 13:09:06] WARN: failed to generate configuration
> 
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
> Changes v1 -> v2:
>   - rebase
>   - update commit message with python 3.12 fix info
> ---
>  utils/genrandconfig | 62 +++++++++++++++++----------------------------
>  1 file changed, 23 insertions(+), 39 deletions(-)
> 
> diff --git a/utils/genrandconfig b/utils/genrandconfig
> index df6bede158..b838dda34d 100755
> --- a/utils/genrandconfig
> +++ b/utils/genrandconfig
> @@ -28,11 +28,6 @@ import traceback
>  from distutils.version import StrictVersion
>  import platform
>  
> -if sys.version_info < (3, 8):
> -    from asyncio import coroutine
> -else:
> -    from types import coroutine
> -
>  
>  class SystemInfo:
>      DEFAULT_NEEDED_PROGS = ["make", "git", "gcc", "timeout"]
> @@ -60,8 +55,7 @@ class SystemInfo:
>          # --
>          return None
>  
> -    @coroutine
> -    def has(self, prog):
> +    async def has(self, prog):
>          """Checks whether a program is available.
>          Lazily evaluates missing entries.
>  
> @@ -76,11 +70,11 @@ class SystemInfo:
>          have_it = self.find_prog(prog)
>          # java[c] needs special care
>          if have_it and prog in ('java', 'javac'):
> -            proc = yield from asyncio.create_subprocess_shell(
> +            proc = await asyncio.create_subprocess_shell(
>                  "%s -version | grep gcj" % prog,
>                  stdout=asyncio.subprocess.DEVNULL,
>                  stderr=asyncio.subprocess.DEVNULL)
> -            ret = yield from proc.wait()
> +            ret = await proc.wait()
>              if ret != 1:
>                  have_it = False
>          # --
> @@ -159,8 +153,7 @@ def get_toolchain_configs(toolchains_csv, buildrootdir):
>      return configs
>  
>  
> -@coroutine
> -def is_toolchain_usable(configfile, config):
> +async def is_toolchain_usable(configfile, config):
>      """Check if the toolchain is actually usable."""
>  
>      with open(configfile) as configf:
> @@ -180,9 +173,9 @@ def is_toolchain_usable(configfile, config):
>             'BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64=y\n' in configlines or \
>             'BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_BE=y\n' in configlines or \
>             'BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB=y\n' in configlines:
> -            proc = yield from asyncio.create_subprocess_exec(
> +            proc = await asyncio.create_subprocess_exec(
>                  'ldd', '--version', stdout=asyncio.subprocess.PIPE)
> -            ldd_version_output, _ = yield from proc.communicate()
> +            ldd_version_output, _ = await proc.communicate()
>              if proc.returncode:
>                  return False
>              glibc_version = ldd_version_output.decode().splitlines()[0].split()[-1]
> @@ -193,8 +186,7 @@ def is_toolchain_usable(configfile, config):
>      return True
>  
>  
> -@coroutine
> -def fixup_config(sysinfo, configfile):
> +async def fixup_config(sysinfo, configfile):
>      """Finalize the configuration and reject any problematic combinations
>  
>      This function returns 'True' when the configuration has been
> @@ -210,8 +202,7 @@ def fixup_config(sysinfo, configfile):
>  
>      BR2_TOOLCHAIN_EXTERNAL_URL = 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/'
>  
> -    has_java = yield from sysinfo.has("java")
> -    if "BR2_NEEDS_HOST_JAVA=y\n" in configlines and not has_java:
> +    if "BR2_NEEDS_HOST_JAVA=y\n" in configlines and not await sysinfo.has("java"):
>          return False
>      # The ctng toolchain is affected by PR58854
>      if 'BR2_PACKAGE_LTTNG_TOOLS=y\n' in configlines and \
> @@ -669,8 +660,7 @@ def fixup_config(sysinfo, configfile):
>      return True
>  
>  
> -@coroutine
> -def gen_config(args):
> +async def gen_config(args):
>      """Generate a new random configuration
>  
>      This function generates the configuration, by choosing a random
> @@ -728,8 +718,7 @@ def gen_config(args):
>  
>      # Randomly enable BR2_REPRODUCIBLE 10% of times
>      # also enable tar filesystem images for testing
> -    has_diffoscope = yield from sysinfo.has("diffoscope")
> -    if has_diffoscope and randint(0, 10) == 0:
> +    if await sysinfo.has("diffoscope") and randint(0, 10) == 0:
>          configlines.append("BR2_REPRODUCIBLE=y\n")
>          configlines.append("BR2_TARGET_ROOTFS_TAR=y\n")
>  
> @@ -743,14 +732,13 @@ def gen_config(args):
>      with open(configfile, "w+") as configf:
>          configf.writelines(configlines)
>  
> -    proc = yield from asyncio.create_subprocess_exec(
> +    proc = await asyncio.create_subprocess_exec(
>          "make", "O=%s" % args.outputdir, "-C", args.buildrootdir, "olddefconfig")
> -    ret = yield from proc.wait()
> +    ret = await proc.wait()
>      if ret:
>          return ret
>  
> -    toolchain_usable = yield from is_toolchain_usable(configfile, toolchainconfig)
> -    if not toolchain_usable:
> +    if not await is_toolchain_usable(configfile, toolchainconfig):
>          return 2
>  
>      # Now, generate the random selection of packages, and fixup
> @@ -764,37 +752,33 @@ def gen_config(args):
>                    file=sys.stderr)
>              return 1
>          bounded_loop -= 1
> -        make_rand = [
> +        proc = await asyncio.create_subprocess_exec(
>              "make", "O=%s" % args.outputdir, "-C", args.buildrootdir,
>              "KCONFIG_SEED=0x%s" % hexlify(os.urandom(4)).decode("ascii").upper(),
>              "KCONFIG_PROBABILITY=%d" % randint(1, 20),
> -            "randpackageconfig" if args.toolchains_csv else "randconfig"
> -        ]
> -        proc = yield from asyncio.create_subprocess_exec(*make_rand)
> -        ret = yield from proc.wait()
> +            "randpackageconfig" if args.toolchains_csv else "randconfig")
> +        ret = await proc.wait()
>          if ret:
>              return ret
>  
> -        ret = yield from fixup_config(sysinfo, configfile)
> -        if ret:
> +        if await fixup_config(sysinfo, configfile):
>              break
>  
> -    proc = yield from asyncio.create_subprocess_exec(
> +    proc = await asyncio.create_subprocess_exec(
>          "make", "O=%s" % args.outputdir, "-C", args.buildrootdir, "olddefconfig")
> -    ret = yield from proc.wait()
> +    ret = await proc.wait()
>      if ret:
>          return ret
>  
> -    proc = yield from asyncio.create_subprocess_exec(
> +    proc = await asyncio.create_subprocess_exec(
>          "make", "O=%s" % args.outputdir, "-C", args.buildrootdir, "savedefconfig")
> -    ret = yield from proc.wait()
> +    ret = await proc.wait()
>      if ret:
>          return ret
>  
> -    proc = yield from asyncio.create_subprocess_exec(
> +    proc = await asyncio.create_subprocess_exec(
>          "make", "O=%s" % args.outputdir, "-C", args.buildrootdir, "dependencies")
> -    ret = yield from proc.wait()
> -    return ret
> +    return await proc.wait()
>  
>  
>  if __name__ == '__main__':
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2 1/1] utils/genrandconfig: switch to async/await format
  2024-05-28 13:22 [Buildroot] [PATCH v2 1/1] utils/genrandconfig: switch to async/await format James Hilliard
                   ` (2 preceding siblings ...)
  2024-05-31 19:23 ` [Buildroot] " Yann E. MORIN
@ 2024-06-08 16:52 ` Peter Korsgaard
  3 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2024-06-08 16:52 UTC (permalink / raw)
  To: James Hilliard; +Cc: buildroot

>>>>> "James" == James Hilliard <james.hilliard1@gmail.com> writes:

 > This requires python 3.5 or newer but is a bit cleaner than the
 > previous coroutine method.

 > This should also fix a python3.12 issue:
 > [Tue, 28 May 2024 13:09:05] INFO: generate the configuration
 > Traceback (most recent call last):
 >   File "/home/autobuild/autobuild/instance-0/buildroot/utils/genrandconfig", line 833, in <module>
 >     ret = asyncio.run(gen_config(args))
 >           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >   File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
 >     return runner.run(main)
 >            ^^^^^^^^^^^^^^^^
 >   File "/usr/lib/python3.12/asyncio/runners.py", line 89, in run
 >     raise ValueError("a coroutine was expected, got {!r}".format(coro))
 > ValueError: a coroutine was expected, got <generator object gen_config at 0xffff7bd822c0>
 > [Tue, 28 May 2024 13:09:06] WARN: failed to generate configuration

 > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
 > ---
 > Changes v1 -> v2:
 >   - rebase
 >   - update commit message with python 3.12 fix info

Committed to 2024.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-06-08 16:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-28 13:22 [Buildroot] [PATCH v2 1/1] utils/genrandconfig: switch to async/await format James Hilliard
2024-05-28 13:31 ` Baruch Siach via buildroot
2024-05-28 13:33   ` James Hilliard
2024-05-28 13:45     ` Baruch Siach via buildroot
2024-05-31 18:48 ` [Buildroot] [External] - " Vincent Fazio
2024-05-31 19:23 ` [Buildroot] " Yann E. MORIN
2024-06-08 16:52 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox