Major Version 2.0
Full Changelog: 1.2...2.0
After over two months, we have finally finished the biggest HiSock
version since v0.0.1: Version 2.0
! This release is huge, with 174
commits, 52
changed files, 5,464
added lines, and 3,331
deleted lines. A HUGE shoutout to @sheepy0125, as this release wouldn't have been possible without his contributions.
Now, without further ado, let's get into the changelog!
NOTE: As this release is major, there are some major API-breaking changes, which are marked with a bold asterisk. Please refer to the newly-updated documentation if you have any questions.
MAJOR BREAKING CHANGES
- ( @sheepy0125 )*
ThreadedHiSockClient
andThreadedHiSockServer
'sstart_client()
andstart_server()
have been renamed tostart()
. - ( @sheepy0125 )* Both of the threaded client's and server's
stop_client()
andstop_server()
have been renamed tostop()
. - ( @sheepy0125 )* Both of the threaded client's and server's receive methods have been replaced by
recv()
, also with a new API. Check the documentation and the examples for how to use the new method.
NEW
- ( @SSS-Says-Snek ) A new reserved command
*
! This command would be sent whenever a command not handled by a client's functions is detected. - ( @SSS-Says-Snek )*
start()
forHiSockClient
andHiSockServer
! Instead of having to program a while loop themselves that callsupdate()
orrun()
(which has now been privatized), all you have to do is to callclient.start()
orserver.start()
. - ( @SSS-Says-Snek ) A keepalive for
HiSockServer
has been added! Every minute, the server sends a request to all clients to check whether they are active. If they aren't, they will be disconnected from the server. This functionality can be disabled via a parameter to the constructor. - ( @sheepy0125 )
on()
has a new parameteroverride
. If the event has the same name as a reserved event and this isTrue
, it'd behave like a regular event listener. - ( @sheepy0125 ) The client and server now have a callback and error handling system! If a function is passed to the
callback
parameter instart()
, the function will get called every time the client/server gets "updated" (_run()
or_update()
finish). Similarly, if a function is passed to theerror_handler
parameter instart()
, the function will get called if the client/server ever encounters an exception. - ( @sheepy0125 ) Event listeners now have "dynamic arguments". Check the documentation and the examples for how to use this new feature.
IMPROVED
- ( @sheepy0125 ) The entire codebase of HiSock has been refactored! Now, it is much cleaner and easier to understand than the previous release's codebase. Huge shoutout to @sheepy0125 again for spending his time on refactoring HiSock.
- ( @sheepy0125, @SSS-Says-Snek ) Documentation of HiSock has also been massively improved!
- ( @SSS-Says-Snek ) Improved cache by switching from dictionaries to instances of
MessageCacheMember
. Now, you can use the dot notation (e.g.cache.header
) to access a cache member's contents. - ( @SSS-Says-Snek ) Changed client data parameter in functions from dictionaries to instances of
ClientInfo
. Now, you can use dot notation to access a client's info. You can also directly pass this to.send()
and other related commands, instead of passing the IP attribute. - ( @SSS-Says-Snek ) Not passing any name in
change_name()
andchange_group()
resets the client to its original name. - ( @SSS-Says-Snek, For Contributors) Improved
setup.py
yet again, with new commands, more colors, and more debug information. - ( @sheepy0125, @SSS-Says-Snek, For Contributors) Refactored and added tests.
BUG FIXES
- ( @SSS-Says-Snek ) Fix numerous threaded client and server bugs.
- ( @SSS-Says-Snek ) Fix two group bugs involving name changes.
That's all for this release; it's been a while since we released the latest version, but we hope that HiSock improved with this version. Bye!