Re: [PLC4PY] Required setup for building?
yes leave it at 3.7. They are currently improving a lot - 3.10 was a major shift and 3.11 has lot of neat improvements concerning error handling. See also: Built-in Exceptions — Python 3.11.0 documentation <https://docs.python.org/3/library/exceptions.html> and Python 3.11 Preview: Even Better Error Messages – Real Python <https://realpython.com/python311-error-messages/> So yes when Plc4Py gets actually usable we can bump it to a stable 3.XX version. Am Fr., 11. Nov. 2022 um 12:08 Uhr schrieb Ben Hutcheson < ben.hut...@gmail.com>: > No, just leave the prerequisite check, 3.7 is still a reasonable starting > point (Although by the time Plc4Py actually gets useable it probably won't > be) > > On Fri, Nov 11, 2022 at 5:03 AM Christofer Dutz > > wrote: > > > Oh … > > > > if it’s just that, I can simply add that to the prerequisite check. > > That currently checks, if python is at least 3.7.0, I can bump that to > > 3.10.0 … however it seems that 3.9 is simpler to setup (As I didn’t > > explicitly select a version and that one was installed). So if the > benefit > > of 3.10+ is not too big, perhaps make it work with 3.9.x. > > > > Chris > > > > > > From: Ben Hutcheson > > Date: Friday, 11. November 2022 at 11:55 > > To: dev@plc4x.apache.org > > Subject: Re: [PLC4PY] Required setup for building? > > Hi, > > > > Yeah it looks like we'll have to work on support for Python version < > 3.10. > > It should be an easy fix to use the Union operator for type hints instead > > of the Pipe symbol. > > > > Ben > > > > On Fri, Nov 11, 2022 at 4:50 AM Christofer Dutz < > christofer.d...@c-ware.de > > > > > wrote: > > > > > [INFO] --- exec-maven-plugin:3.1.0:exec (python-test) @ plc4py --- > > > = test session starts > > > == > > > platform darwin -- Python 3.9.12, pytest-7.2.0, pluggy-1.0.0 -- > > > > > > /Users/christoferdutz/Projects/Apache/PLC4X/plc4x/sandbox/plc4py/venv/bin/python3 > > > cachedir: .pytest_cache > > > rootdir: > > /Users/christoferdutz/Projects/Apache/PLC4X/plc4x/sandbox/plc4py, > > > configfile: setup.cfg > > > plugins: mock-3.10.0, asyncio-0.20.1 > > > asyncio: mode=auto > > > collecting ... collected 16 items / 2 errors > > > > > > ERRORS > > > > > > ERROR collecting tests/test_plc4py.py > > > _ > > > tests/test_plc4py.py:28: in > > > from plc4py.drivers.modbus.ModbusConnection import ModbusConnection > > > plc4py/drivers/modbus/ModbusConnection.py:30: in > > > from plc4py.drivers.modbus.ModbusProtocol import ModbusProtocol > > > plc4py/drivers/modbus/ModbusProtocol.py:21: in > > > from plc4py.spi.Plc4xBaseProtocol import Plc4xBaseProtocol > > > plc4py/spi/Plc4xBaseProtocol.py:25: in > > > class Plc4xBaseProtocol(Protocol): > > > plc4py/spi/Plc4xBaseProtocol.py:35: in Plc4xBaseProtocol > > > def connection_lost(self, exc: Exception | None) -> None: > > > E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' > > > ___ ERROR collecting tests/unit/plc4py/spi/test_protocol.py > > > > > > tests/unit/plc4py/spi/test_protocol.py:26: in > > > from plc4py.spi.Plc4xBaseProtocol import Plc4xBaseProtocol > > > plc4py/spi/Plc4xBaseProtocol.py:25: in > > > class Plc4xBaseProtocol(Protocol): > > > plc4py/spi/Plc4xBaseProtocol.py:35: in Plc4xBaseProtocol > > > def connection_lost(self, exc: Exception | None) -> None: > > > E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' > > > === short test summary info > > > > > > ERROR tests/test_plc4py.py - TypeError: unsupported operand type(s) for > > |: > > > 't... > > > ERROR tests/unit/plc4py/spi/test_protocol.py - TypeError: unsupported > > > operand... > > > !!! Interrupted: 2 errors during collection > > > > > > == 2 errors in 0.08s > > > === > > > [ERROR] Command execution failed. > > > org.apache.commons.exec.ExecuteException: Process exited with an > error: 2 > > > (Exit value: 2) > > > at org.apache.commons.exec.DefaultExecutor.executeInte
Re: [PLC4PY] Required setup for building?
No, just leave the prerequisite check, 3.7 is still a reasonable starting point (Although by the time Plc4Py actually gets useable it probably won't be) On Fri, Nov 11, 2022 at 5:03 AM Christofer Dutz wrote: > Oh … > > if it’s just that, I can simply add that to the prerequisite check. > That currently checks, if python is at least 3.7.0, I can bump that to > 3.10.0 … however it seems that 3.9 is simpler to setup (As I didn’t > explicitly select a version and that one was installed). So if the benefit > of 3.10+ is not too big, perhaps make it work with 3.9.x. > > Chris > > > From: Ben Hutcheson > Date: Friday, 11. November 2022 at 11:55 > To: dev@plc4x.apache.org > Subject: Re: [PLC4PY] Required setup for building? > Hi, > > Yeah it looks like we'll have to work on support for Python version < 3.10. > It should be an easy fix to use the Union operator for type hints instead > of the Pipe symbol. > > Ben > > On Fri, Nov 11, 2022 at 4:50 AM Christofer Dutz > > wrote: > > > [INFO] --- exec-maven-plugin:3.1.0:exec (python-test) @ plc4py --- > > = test session starts > > == > > platform darwin -- Python 3.9.12, pytest-7.2.0, pluggy-1.0.0 -- > > > /Users/christoferdutz/Projects/Apache/PLC4X/plc4x/sandbox/plc4py/venv/bin/python3 > > cachedir: .pytest_cache > > rootdir: > /Users/christoferdutz/Projects/Apache/PLC4X/plc4x/sandbox/plc4py, > > configfile: setup.cfg > > plugins: mock-3.10.0, asyncio-0.20.1 > > asyncio: mode=auto > > collecting ... collected 16 items / 2 errors > > > > ERRORS > > > > ERROR collecting tests/test_plc4py.py > > _ > > tests/test_plc4py.py:28: in > > from plc4py.drivers.modbus.ModbusConnection import ModbusConnection > > plc4py/drivers/modbus/ModbusConnection.py:30: in > > from plc4py.drivers.modbus.ModbusProtocol import ModbusProtocol > > plc4py/drivers/modbus/ModbusProtocol.py:21: in > > from plc4py.spi.Plc4xBaseProtocol import Plc4xBaseProtocol > > plc4py/spi/Plc4xBaseProtocol.py:25: in > > class Plc4xBaseProtocol(Protocol): > > plc4py/spi/Plc4xBaseProtocol.py:35: in Plc4xBaseProtocol > > def connection_lost(self, exc: Exception | None) -> None: > > E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' > > ___ ERROR collecting tests/unit/plc4py/spi/test_protocol.py > > > > tests/unit/plc4py/spi/test_protocol.py:26: in > > from plc4py.spi.Plc4xBaseProtocol import Plc4xBaseProtocol > > plc4py/spi/Plc4xBaseProtocol.py:25: in > > class Plc4xBaseProtocol(Protocol): > > plc4py/spi/Plc4xBaseProtocol.py:35: in Plc4xBaseProtocol > > def connection_lost(self, exc: Exception | None) -> None: > > E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' > > === short test summary info > > > > ERROR tests/test_plc4py.py - TypeError: unsupported operand type(s) for > |: > > 't... > > ERROR tests/unit/plc4py/spi/test_protocol.py - TypeError: unsupported > > operand... > > !!! Interrupted: 2 errors during collection > > > > == 2 errors in 0.08s > > === > > [ERROR] Command execution failed. > > org.apache.commons.exec.ExecuteException: Process exited with an error: 2 > > (Exit value: 2) > > at org.apache.commons.exec.DefaultExecutor.executeInternal > > (DefaultExecutor.java:404) > > at org.apache.commons.exec.DefaultExecutor.execute > > (DefaultExecutor.java:166) > > at org.codehaus.mojo.exec.ExecMojo.executeCommandLine > > (ExecMojo.java:1000) > > at org.codehaus.mojo.exec.ExecMojo.executeCommandLine > > (ExecMojo.java:947) > > at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:471) > > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > > (DefaultBuildPluginManager.java:137) > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > > (MojoExecutor.java:210) > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > > (MojoExecutor.java:156) > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > > (MojoExecutor.java:148) > > at > > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > > (LifecycleModuleBuilder.java:117) > > at > > org.apache.maven.lifecycle
Re: [PLC4PY] Required setup for building?
Oh … if it’s just that, I can simply add that to the prerequisite check. That currently checks, if python is at least 3.7.0, I can bump that to 3.10.0 … however it seems that 3.9 is simpler to setup (As I didn’t explicitly select a version and that one was installed). So if the benefit of 3.10+ is not too big, perhaps make it work with 3.9.x. Chris From: Ben Hutcheson Date: Friday, 11. November 2022 at 11:55 To: dev@plc4x.apache.org Subject: Re: [PLC4PY] Required setup for building? Hi, Yeah it looks like we'll have to work on support for Python version < 3.10. It should be an easy fix to use the Union operator for type hints instead of the Pipe symbol. Ben On Fri, Nov 11, 2022 at 4:50 AM Christofer Dutz wrote: > [INFO] --- exec-maven-plugin:3.1.0:exec (python-test) @ plc4py --- > = test session starts > == > platform darwin -- Python 3.9.12, pytest-7.2.0, pluggy-1.0.0 -- > /Users/christoferdutz/Projects/Apache/PLC4X/plc4x/sandbox/plc4py/venv/bin/python3 > cachedir: .pytest_cache > rootdir: /Users/christoferdutz/Projects/Apache/PLC4X/plc4x/sandbox/plc4py, > configfile: setup.cfg > plugins: mock-3.10.0, asyncio-0.20.1 > asyncio: mode=auto > collecting ... collected 16 items / 2 errors > > ERRORS > > ERROR collecting tests/test_plc4py.py > _ > tests/test_plc4py.py:28: in > from plc4py.drivers.modbus.ModbusConnection import ModbusConnection > plc4py/drivers/modbus/ModbusConnection.py:30: in > from plc4py.drivers.modbus.ModbusProtocol import ModbusProtocol > plc4py/drivers/modbus/ModbusProtocol.py:21: in > from plc4py.spi.Plc4xBaseProtocol import Plc4xBaseProtocol > plc4py/spi/Plc4xBaseProtocol.py:25: in > class Plc4xBaseProtocol(Protocol): > plc4py/spi/Plc4xBaseProtocol.py:35: in Plc4xBaseProtocol > def connection_lost(self, exc: Exception | None) -> None: > E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' > ___ ERROR collecting tests/unit/plc4py/spi/test_protocol.py > > tests/unit/plc4py/spi/test_protocol.py:26: in > from plc4py.spi.Plc4xBaseProtocol import Plc4xBaseProtocol > plc4py/spi/Plc4xBaseProtocol.py:25: in > class Plc4xBaseProtocol(Protocol): > plc4py/spi/Plc4xBaseProtocol.py:35: in Plc4xBaseProtocol > def connection_lost(self, exc: Exception | None) -> None: > E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' > === short test summary info > > ERROR tests/test_plc4py.py - TypeError: unsupported operand type(s) for |: > 't... > ERROR tests/unit/plc4py/spi/test_protocol.py - TypeError: unsupported > operand... > !!! Interrupted: 2 errors during collection > > == 2 errors in 0.08s > === > [ERROR] Command execution failed. > org.apache.commons.exec.ExecuteException: Process exited with an error: 2 > (Exit value: 2) > at org.apache.commons.exec.DefaultExecutor.executeInternal > (DefaultExecutor.java:404) > at org.apache.commons.exec.DefaultExecutor.execute > (DefaultExecutor.java:166) > at org.codehaus.mojo.exec.ExecMojo.executeCommandLine > (ExecMojo.java:1000) > at org.codehaus.mojo.exec.ExecMojo.executeCommandLine > (ExecMojo.java:947) > at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:471) > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:137) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:210) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:156) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:148) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:117) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:81) > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:56) > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:128) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) > at org.apache.maven.cli.MavenC
Re: [PLC4PY] Required setup for building?
in (MavenCli.java:289) >> at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) >> at jdk.internal.reflect.DirectMethodHandleAccessor.invoke >> (DirectMethodHandleAccessor.java:104) >> at java.lang.reflect.Method.invoke (Method.java:577) >> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced >> (Launcher.java:282) >> at org.codehaus.plexus.classworlds.launcher.Launcher.launch >> (Launcher.java:225) >> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode >> (Launcher.java:406) >> at org.codehaus.plexus.classworlds.launcher.Launcher.main >> (Launcher.java:347) >> at org.codehaus.classworlds.Launcher.main (Launcher.java:47) >> [INFO] >> >> [INFO] BUILD FAILURE >> [INFO] >> >> [INFO] Total time: 11.937 s >> [INFO] Finished at: 2022-11-11T11:49:37+01:00 >> [INFO] >> >> >> From: Ben Hutcheson >> Date: Friday, 11. November 2022 at 11:46 >> To: dev@plc4x.apache.org >> Subject: Re: [PLC4PY] Required setup for building? >> Hi Chris, >> >> I'm not sure much has changed since last time, can you send me the output >> you're seeing? >> >> Ben >> >> On Fri, Nov 11, 2022 at 4:07 AM Christofer Dutz < >> christofer.d...@c-ware.de> >> wrote: >> >> > Hi all, >> > >> > some time ago I added some checks to the prerequisite check to ensure >> I’m >> > able to build PLC4PY before even trying. For some time now this has been >> > failing on my side, so I guess there are some changes there. >> > >> > Could someone please help me adjust the prerequisite check to work for >> > PLC4Py again? >> > >> > Chris >> > >> > >> >
Re: [PLC4PY] Required setup for building?
> (Launcher.java:406) > at org.codehaus.plexus.classworlds.launcher.Launcher.main > (Launcher.java:347) > at org.codehaus.classworlds.Launcher.main (Launcher.java:47) > [INFO] > > [INFO] BUILD FAILURE > [INFO] > ---------------- > [INFO] Total time: 11.937 s > [INFO] Finished at: 2022-11-11T11:49:37+01:00 > [INFO] > > > From: Ben Hutcheson > Date: Friday, 11. November 2022 at 11:46 > To: dev@plc4x.apache.org > Subject: Re: [PLC4PY] Required setup for building? > Hi Chris, > > I'm not sure much has changed since last time, can you send me the output > you're seeing? > > Ben > > On Fri, Nov 11, 2022 at 4:07 AM Christofer Dutz > > wrote: > > > Hi all, > > > > some time ago I added some checks to the prerequisite check to ensure I’m > > able to build PLC4PY before even trying. For some time now this has been > > failing on my side, so I guess there are some changes there. > > > > Could someone please help me adjust the prerequisite check to work for > > PLC4Py again? > > > > Chris > > > > >
Re: [PLC4PY] Required setup for building?
[INFO] --- exec-maven-plugin:3.1.0:exec (python-test) @ plc4py --- = test session starts == platform darwin -- Python 3.9.12, pytest-7.2.0, pluggy-1.0.0 -- /Users/christoferdutz/Projects/Apache/PLC4X/plc4x/sandbox/plc4py/venv/bin/python3 cachedir: .pytest_cache rootdir: /Users/christoferdutz/Projects/Apache/PLC4X/plc4x/sandbox/plc4py, configfile: setup.cfg plugins: mock-3.10.0, asyncio-0.20.1 asyncio: mode=auto collecting ... collected 16 items / 2 errors ERRORS ERROR collecting tests/test_plc4py.py _ tests/test_plc4py.py:28: in from plc4py.drivers.modbus.ModbusConnection import ModbusConnection plc4py/drivers/modbus/ModbusConnection.py:30: in from plc4py.drivers.modbus.ModbusProtocol import ModbusProtocol plc4py/drivers/modbus/ModbusProtocol.py:21: in from plc4py.spi.Plc4xBaseProtocol import Plc4xBaseProtocol plc4py/spi/Plc4xBaseProtocol.py:25: in class Plc4xBaseProtocol(Protocol): plc4py/spi/Plc4xBaseProtocol.py:35: in Plc4xBaseProtocol def connection_lost(self, exc: Exception | None) -> None: E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' ___ ERROR collecting tests/unit/plc4py/spi/test_protocol.py tests/unit/plc4py/spi/test_protocol.py:26: in from plc4py.spi.Plc4xBaseProtocol import Plc4xBaseProtocol plc4py/spi/Plc4xBaseProtocol.py:25: in class Plc4xBaseProtocol(Protocol): plc4py/spi/Plc4xBaseProtocol.py:35: in Plc4xBaseProtocol def connection_lost(self, exc: Exception | None) -> None: E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' === short test summary info ERROR tests/test_plc4py.py - TypeError: unsupported operand type(s) for |: 't... ERROR tests/unit/plc4py/spi/test_protocol.py - TypeError: unsupported operand... !!! Interrupted: 2 errors during collection == 2 errors in 0.08s === [ERROR] Command execution failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2) at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404) at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166) at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:1000) at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:947) at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:471) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104) at java.lang.reflect.Method.invoke (Method.java:577) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) at org.codehaus.classworlds.Launcher.main (Launcher.java:47) [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 11.937 s [INFO] Finished at: 2022-11-11T11:49:37+01:00 [INFO] From: Ben Hutcheson Date: Friday, 11. November 2022 at 11:46 To: dev@plc4x.apache.org Subject: Re: [PLC4PY] Required setup for building? Hi Chris, I'm not sure much has c
Re: [PLC4PY] Required setup for building?
Hi Chris, I'm not sure much has changed since last time, can you send me the output you're seeing? Ben On Fri, Nov 11, 2022 at 4:07 AM Christofer Dutz wrote: > Hi all, > > some time ago I added some checks to the prerequisite check to ensure I’m > able to build PLC4PY before even trying. For some time now this has been > failing on my side, so I guess there are some changes there. > > Could someone please help me adjust the prerequisite check to work for > PLC4Py again? > > Chris > >