FreeOpcUa / python-opcua

LGPL Pure Python OPC-UA Client and Server
http://freeopcua.github.io/
GNU Lesser General Public License v3.0
1.36k stars 658 forks source link

Compatibility with Python 3.4 / Micropython #1011

Open puchm opened 4 years ago

puchm commented 4 years ago

Hi,

In the Readme it says

Python > 3.4: cryptography, dateutil, lxml and pytz

Does this also apply for Python 3.4? I am using Micropython (which uses Python 3.4 syntax) for a specific project. Do you think that this will be compatible with that? I had problems with compiling (those are probably pretty specific to Micropython so I don't think they are important here).

I tried to compile the older version which I installed using pip (Python 2.7) but that doesn't compile due to an error with Trollius (async is a reserved keyword in newer Python version, but it gets used by Trollius in one file).

I see 2 options for me here: Either this implementation uses some things that don't work with Python 3.4, in that case it would be interesting to know if there is an older version of python-opcua that I can use. The second option is to maybe remove/rename the function from Trollius. It is called async and is in the file Tasks.py. Does that function get used by this project or can I safely remove it?

Thank you for your help. -Moritz

zerox1212 commented 4 years ago

I don't know much about Micropython, but if I had to guess I would say lxml is probably the problem.

There were older releases that definitely ran on 3.4, but I think there is some new stuff that requires 3.7 so the readme should be updated.

I would try to running older releases before lxml dependency.