FreeOpcUa / opcua-asyncio

OPC UA library for python >= 3.7
GNU Lesser General Public License v3.0
1.04k stars 345 forks source link

[xmlimporter] Support to make auto load type definitions optional #1599

Closed bitkeeper closed 3 months ago

bitkeeper commented 4 months ago

To the import_xml an optional argument auto_load_definitions is added. Default is True.

Case: With commit https://github.com/FreeOpcUa/opcua-asyncio/commit/de8269e4dadcbc2e12773a35b415f55e54e8709c import_xml automatic load(on the fly code generation) the type defintions.

When using your own extension object and enum implementation (with ua.register_extension_object ua.register_enum) this is unwanted behaviour.

Previous work flow was:

To make this possible again an option is required to prevent the auto load definitions when calling the import_xml method.