Commit Graph

16 Commits

Author SHA1 Message Date
Lonami Exo
015acf20c6 Handle TypeNotFoundError during gzip packed msgs 2022-01-23 13:26:53 +01:00
Lonami Exo
f1a517dee6 Process self-produced updates like any other 2022-01-23 13:20:35 +01:00
Lonami Exo
f6df5d377c Begin reworking update handling
Use a fixed-size queue instead of a callback to deal with updates.

Port the message box and entity cache from grammers to start off
with a clean design.

Temporarily get rid of other cruft such as automatic pings or old
catch up implementation.
2022-01-18 19:46:19 +01:00
Lonami Exo
3afabdd7c0 Remove auto-reconnect callback
It's an abstraction leak.
The client should know to refetch updates if a long period passed
without them on its own.
2022-01-18 18:21:56 +01:00
Lonami Exo
4f4c7040d1 Stop using futures as one-shot channels
Instead, use a single-item queue. This is asyncio.run-friendly,
even when the client is initialized outside of async def.
2022-01-16 13:59:43 +01:00
Lonami Exo
a62627534e Get rid of client.loop
Instead, use the asyncio-intended way of implicit loop.
2022-01-16 13:51:23 +01:00
Lonami Exo
f5f0c84553 Completely overhaul connections and transports
Reduce abstraction leaks. Now the transport can hold any state,
rather than just the tag. It's also responsible to initialize on
the first connection, and they can be cleanly reset.

asyncio connections are no longer used, in favour of raw sockets,
which should avoid some annoyances.

For the time being, more obscure transport modes have been removed,
as well as proxy support, until further cleaning is done.
2022-01-15 13:33:50 +01:00
Lonami Exo
691160bd92 Remove 3.7 workarounds 2022-01-09 13:03:02 +01:00
Lonami Exo
197a1ca996 Fix some modules were public when they should not have been 2021-09-26 19:58:42 +02:00
Lonami Exo
debde6e856 Completely overhaul errors to be generated dynamically 2021-09-24 20:12:00 +02:00
Lonami Exo
81b4957d9b Update code to deal with the new sessions 2021-09-19 16:38:11 +02:00
Lonami Exo
943ad892f7 Address remaining uses of the Request suffix with raw API 2021-09-13 21:00:31 +02:00
Lonami Exo
499fc9f603 Move alltlobjects.py and fix imports 2021-09-12 16:58:06 +02:00
Lonami Exo
f222dc167e Fix imports 2021-09-12 13:27:13 +02:00
Lonami Exo
d48649602b Replace most raw API usage with new location 2021-09-12 12:16:02 +02:00
Lonami Exo
a901d43a6d Rename more subpackages and modules 2021-09-11 17:48:23 +02:00