1. 28 Feb, 2022 3 commits
  2. 25 Feb, 2022 2 commits
  3. 20 Feb, 2022 1 commit
  4. 14 Feb, 2022 1 commit
  5. 13 Feb, 2022 1 commit
  6. 02 Feb, 2022 1 commit
  7. 28 Jan, 2022 2 commits
  8. 24 Jan, 2022 2 commits
  9. 09 Jan, 2022 13 commits
  10. 15 Dec, 2021 4 commits
  11. 13 Dec, 2021 3 commits
  12. 27 Nov, 2021 1 commit
  13. 22 Nov, 2021 1 commit
  14. 19 Nov, 2021 1 commit
    • Julien Prigent's avatar
      [HaClient] Allow init from executor · 6a6b13e6
      Julien Prigent authored
      With py3.10, high level asyncio API can't specify the event_loop
      argument anymore.
      
      Consequently When using thread dedicated to run the event_.loop, we now need to
      instantiate object like asyncio.Lock within the thread. However, the
      event loop can't be running before creating these objects as
      `loop.run_for_ever()` must be the background running thread process.
      Therefore we can't have "get_running_loop()" calls in object
      constructors (like HaClient)
      when used with executors.
      
      Before
      ```
      In [15]: def get_t():
          ...:     loop = asyncio.new_event_loop()
          ...:     t = T()
          ...:     loop.run_for_ever()
      
      In [16]: class T:
          ...:     def __init__(self, loop):
          ...:         asyncio.set_event_loop(loop)
          ...:         asyncio.get_running_loop()
          ...:         self.l = asyncio.Lock()
          ...:         print("Lock created")
          ...:
      
      In [17]: t = Thread(target=get_t);t.start()
      
      Exception in thread Thread-9:
      Traceback (most recent call last):
        File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
      In [41]:     self.run()
        File "/usr/local//lib/python3.8/threading.py", line 870, in run
      In [41]:     self._target(*self._args, **self._kwargs)
        File "<ipython-input-32-c4a1ea4cfdac>", line 3, in get_t
        File "<ipython-input-39-ebeae10dd173>", line 4, in __init__
      RuntimeError: no running event loop
      ```
      After
      
      ```
      In [15]: def get_t():
          ...:     loop = asyncio.new_event_loop()
          ...:     t = T()
          ...:     loop.run_for_ever()
      
      In [16]: class T:
          ...:     def __init__(self, loop):
          ...:         asyncio.set_event_loop(loop)
          ...:         self.l = asyncio.Lock()
          ...:         print("Lock created")
          ...:
      
      In [17]: t = Thread(target=get_t);t.start()
      
      Lock created
      
      ```
      6a6b13e6
  15. 15 Nov, 2021 2 commits
  16. 12 Nov, 2021 2 commits
    • janfelixklein's avatar
      Changes to xmlimporter to load customn data types when needed (#719) · 77796a37
      janfelixklein authored
      * Update xmlimporter.py
      
      This allows to load information about newly created data types in the same import process
      
      * Update xmlparser.py
      
      with this we can set the value to newly created datatypes
      
      * Update ua_utils.py
      
      This is conform to the I40AAS nodeset enumerations, e.g. given enumeration as "AccessPermissionRule_0" specifying the type and the integer
      
      * Update xmlimporter.py
      
      small changes due to necessary async and await
      
      * Update xmlparser.py
      
      switched from try/catch to check
      77796a37
    • oroulet's avatar
      new release v0.9.92 · 9b717c81
      oroulet authored
      9b717c81