!JiiOHXrIUCtcOJsZCa:matrix.org

nio

210 Members
The nio matrix python library | Latest release 0.17.0 https://pypi.org/project/matrix-nio/ | Documentation: https://matrix-nio.readthedocs.io/en/stable/110 Servers

Load older messages


SenderMessageTime
26 Feb 2021
@poljar:matrix.orgpoljarheh, that's one way to do it, aiohttp doesn't expose anything to get that and i don't think there's a reliable way considering that it uses a connection pool13:55:01
@peetz0r:glitch.imPeetz0rGotta recheck every time sync returns I guess13:55:35
@fuzzmz:fuzz.me.ukfuzzmz left the room.14:51:06
@meskio:sindominio.netmeskio left the room.17:14:34
@bill48105:matrix.orgBill48105I use nio on a multi coin multi platform bot for matrix support so thanks for the work put into it. :)17:55:41
@bill48105:matrix.orgBill48105i see i t's not been updated in long time which is good in that it must be pretty stable. i was tempted to put in a pull request for some tweaks/mods i did to work right (better) with my bot but not sure if i should bother if i'm the only one experiencing the issues I was or if perhaps I was doing something wrong17:57:35
@bill48105:matrix.orgBill48105in fact i had forgotten about the mods until i came in here asking about how to stop matrix & the custom loop fix ended up breaking my other fixes since I made the mitake of using the original source loop for my custom loop & not the hacked up local copy i had been using17:58:48
@bill48105:matrix.orgBill48105the issue I was having is that no users on matrix could issue bot commands until the previous user's command had finished. for quick command like ping or balance that's not really a big deal and could even be the desired way for the matrix library to work. but hardly ideal for a multi user bot using asynchronous features of python having to make users wait until the other user's command finished before they could use the bot18:01:31
@bill48105:matrix.orgBill48105having run into the same issue with telegram i pretty much knew right away what the issue was or least why it was doing it but had to dig into mio to find it in the sync_forever loop18:02:56
@bill48105:matrix.orgBill48105so i guess my question is, was that intentional in nio to make it so only 1 task could run at a time? or is that a bug? or does it point to me doing something wrong in how I'm using nio?18:04:22
@bill48105:matrix.orgBill48105and btw i know my mods are not ideal & point to not being the best or correct option in that i have to set loop_sleep_time to at least 1000 to not be rate limited with "please try in ___" responses from matrix which in turn causes all commands having a 1 to 10+ sec lag time before the bot responds. but at least it actually responds unlike without the mods. i suspect there's a better way but haven't spent the time digging into nio since what i have mostly works or at least works better than without the mods.18:10:35
@poljar:matrix.orgpoljaris the problem that you have event handlers which execute those user commands and since the event handlers wait for the handler to be done you see that users have to wait?18:22:02
@poljar:matrix.orgpoljaryou can always just spawn a new task from the event handler callback, no?18:22:19
@bill48105:matrix.orgBill48105right that's basically the issue. the callback from nio waits until that call is done before it processes another matrix event18:26:31
@bill48105:matrix.orgBill48105and yes the fix was to use ensure_future() instead of await18:28:31
@bill48105:matrix.orgBill48105on py 3.7 still18:28:46
@poljar:matrix.orgpoljarthe reason why this is done so is to ensure that the state of objects (the room name, membership state of users) moves at the same pace that you handle the events18:29:32
@poljar:matrix.orgpoljarso if you want to handle a message and print out the sender, the sender will have the correct display name18:29:54
@bill48105:matrix.orgBill48105that makes sense and explains why matrix isn't too happy with it done this way when the loop sleep is too low18:30:41
28 Feb 2021
@miruka:matrix.orgmiruka

poljar: can we get a release? Updated the changelog

22:41:04
1 Mar 2021
@poljar:matrix.orgpoljarsure, sometime today07:50:16
@adam.jurkiewicz:matrix.orgABIX adam.jurkiewicz Hi - I want to use nio with IBM Watson (Python Jupiter onine), Anyone has any experience with such? I would like to make some simple chatbot... 09:06:12
@poljar:matrix.orgpoljarpypi seems to be having a bad day, an upload fails, will try again tomorrow20:46:22
3 Mar 2021
@fecub:yazcub.comfecub left the room.12:03:42
@fecub:yazcub.comfecub joined the room.12:38:35
@poljar:matrix.orgpoljar changed the room topic to "The nio matrix python library | Latest release 0.17.0 https://pypi.org/project/matrix-nio/ | Documentation: https://matrix-nio.readthedocs.io/en/stable/" from "The nio matrix python library | Latest release 0.16.0 https://pypi.org/project/matrix-nio/ | Documentation: https://matrix-nio.readthedocs.io/en/stable/".18:43:05
4 Mar 2021
@tom:lant.uktoml joined the room.17:55:19
6 Mar 2021
@abdoatef55:matrix.orgAɓb Do joined the room.00:28:58
7 Mar 2021
@bobdobberson:matrix.orgOften High Pope Bob Dobberson changed their display name from DJ OHP Bob Dobberson Esquire to Often High Pope Bob Dobberson.04:15:56
8 Mar 2021
@mishra:matrix.orgmishra joined the room.06:22:14

There are no newer messages yet.


Back to Room List