Skip to content

txaio.time_ns requires networking framework selection #173

@oberstet

Description

@oberstet

The WAMP IDL code generator (xbrnetwork CLI included with Autobahn) currently generates code that imports txaio and select Twisted. When writing asyncio programs, this is inconvenient. The problem is time_ns:

(cpy392_1) oberstet@intel-nuci7:~$ python
Python 3.9.2 (default, Mar  8 2021, 02:05:12) 
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from txaio import time_ns
>>> time_ns()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/oberstet/scm/crossbario/txaio/txaio/_unframework.py", line 41, in _throw_usage_error
    raise RuntimeError(
RuntimeError: To use txaio, you must first select a framework with .use_twisted() or .use_asyncio()
>>> 

We either need a way to use txaio.time_ns without selecting a networking framework, or we need to move the helper eg to zLMDB.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions