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 <module>
>     from plc4py.drivers.modbus.ModbusConnection import ModbusConnection
> plc4py/drivers/modbus/ModbusConnection.py:30: in <module>
>     from plc4py.drivers.modbus.ModbusProtocol import ModbusProtocol
> plc4py/drivers/modbus/ModbusProtocol.py:21: in <module>
>     from plc4py.spi.Plc4xBaseProtocol import Plc4xBaseProtocol
> plc4py/spi/Plc4xBaseProtocol.py:25: in <module>
>     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 <module>
>     from plc4py.spi.Plc4xBaseProtocol import Plc4xBaseProtocol
> plc4py/spi/Plc4xBaseProtocol.py:25: in <module>
>     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 <ben.hut...@gmail.com>
> Date: Friday, 11. November 2022 at 11:46
> To: dev@plc4x.apache.org <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
> >
> >
>

Reply via email to