<p></p>
<h3 dir="auto">Description</h3>
<p dir="auto">Using the KEMI async module in Python is not possible, since the <code class="notranslate">async</code> word is a reserved word in Python3. This leads to a syntax error.</p>
<h4 dir="auto">Reproduction</h4>
<div class="highlight highlight-source-python" dir="auto"><pre><span class="pl-k">import</span> <span class="pl-v">KSR</span>
<span class="pl-v">KSR</span>.<span class="pl-s1">async</span>.<span class="pl-en">task_route</span>(<span class="pl-s">""</span>)</pre></div>
<h3 dir="auto">Possible Solutions</h3>
<p dir="auto">The below code works, but not sure if this is a right approach to this issue.</p>
<p dir="auto"><code class="notranslate">KSR.__dict__["async"].task_route("my_route")</code></p>
<h3 dir="auto">Additional Information</h3>
<pre class="notranslate"><code class="notranslate">version: kamailio 5.6.1 (x86_64/linux) b36a13
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: b36a13
compiled on 10:06:47 Oct 25 2022 with gcc 10.2.1
</code></pre>
<pre class="notranslate"><code class="notranslate">Linux b0fe2a764c5e 5.10.124-linuxkit #1 SMP Thu Jun 30 08:19:10 UTC 2022 x86_64 GNU/Linux
</code></pre>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/3272">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZPLTH6SP3MZSWCVZH3WE7DA3ANCNFSM6AAAAAARN4SKW4">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZPRUCPTHV7DX2KQRNTWE7DA3A5CNFSM6AAAAAARN4SKW6WGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHFJRZWEU.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><kamailio/kamailio/issues/3272</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/3272",
"url": "https://github.com/kamailio/kamailio/issues/3272",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>