Releases: SSS-Says-Snek/hisock
Hisock Version 3.0 Alpha
Full Changelog: 2.0.2...3.0a
It's been even longer since the last release! I just realized I had some commits that hadn't made its way over to a new release, so here's version 3. I originally hoped to have a bigger release, but this will do for now. There are a handful of breaking changes and bug fixes here, so listen up!
BREAKING CHANGES
dict
s are being phased out in place ofClientInfo
. The codebase now usesClientInfo
extensively in the API, and projects are strongly recommended to follow in that pursuit.- There have been some name changes for kwargs: I do not remember why I did that.
- Type casting has been completely revamped! Previously, in order to convey information, programmers utilized type hints to let hisock automatically know how to cast bytes to and from things. Now, it is automatically done for you! Now, type hints do NOT affect the outcome (although you should still type hint your codebase!) Note that this system is new, and there may be bugs.
IMPROVED
- Your usual doc improvements
- Minor codebase changes
- Hisock transitioned away from setup.py to pyproject.toml! This marks the transition into newer and more standard python technology.
BUG FIXES
- Fix bug regarding hisock's inability to send large amounts of data. Now, data above ~50kB at once can actually be sent without potentially crashing.
This is still an alpha release, so if there are bugs, please let us know. Otherwise, see you (maybe) next time!
Patch Version 2.0.2
Full Changelog: 2.0.1...2.0.2
It's been pretty long since the last release! The only thing this has is an important bug fix.
BUG FIXES
- (@SSS-Says-Snek) - Fix handling of the
client_disconnect
event being required for clients (I don't know how long that has gone unnoticed)
OTHER
- Bump pytest from 7.1.3 to 7.2.0 by @dependabot in #53
- Upgrade CodeSee workflow to version 2 by @codesee-maps in #55
- Bump pytest from 7.2.0 to 7.2.1 by @dependabot in #56
- Bump pycryptodome from 3.15.0 to 3.17 by @dependabot in #57
Patch Version 2.0.1
Full Changelog: 2.0...2.0.1
With 14
commits, 10
changed files, 171
additions, and 22
deletions, this is hisock's first patch version! There isn't much from this release, although there are some important bug fixes.
BUG FIXES
- ( @SSS-Says-Snek ) - Close server if the server raises an exception during runtime.
- ( @SSS-Says-Snek ) - Fixed miscellaneous client bugs.
- ( @sheepy0125 ) - Allow threaded reserved functions.
- ( @sheepy0125 ) - Fix bug involving client disconnects not sending properly.
- ( @sheepy0125 ) - Fix closing sometimes raising exceptions.
- ( @sheepy0125 ) - Fix some reserved events being treated as normal events.
OTHER
- Bump pytest from 7.1.1 to 7.1.2 by @dependabot in #50
- Bump pycryptodome from 3.14.1 to 3.15.0 by @dependabot in #51
- Bump pytest from 7.1.2 to 7.1.3 by @dependabot in #52
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!
Minor Version 1.2
Another version has dropped, this time it's 1.2! Over the past 18
days, we have pushed 51
commits to hisock, modifying 24
files. We also added 849
lines and deleted 430
lines! Now, let's get into the new features of version 1.2!
NEW
- Dictionary sending support for
HiSockServer
andHiSockClient
! Now you can send dictionaries with.send({"Hi": "Chicken Nugget"})
. - A message cache, also for
HiSockServer
! It's been a while since we added a message cache for the client, but now it's here for servers!
IMPROVED
- Documentation improvements! After all, it can't be a new version without some good improvements to the docs.
- Improved type hints in the codebase. Now, IDEs should provide more accurate code scanning.
- Added an
all_ips
flag forget_local_ip
. Now, the function will give you all of your local IPs if you setall_ips
to True! - Added an
emit_leave
flag for HiSockClient'sclose
(thanks @sheepy0125 !) Now, if you set the flag to True, the client should close its socket all by itself, without notifying the server that it's going to close. - Added a
force
flag for HiSockServer'sdisconnect_all_clients
. It will now brutally close all the client sockets and clear the client lists and dictionaries if you set the flag to True, ensuring that all clients would be disconnected. - Improve type casting.
- (For contributors) Improved
setup.py
! Now it looks very cool when building the wheels for hisock. - (For contributors) Cleaned up the root project. No more
Dockerfile
, yay! - (For contributors) Added some new tests for type casting.
BUG FIXES
- Add support for "bytes -> bytes" type casting. As @sheepy0125 pointed out, if a user type hints a function argument to
bytes
, then hisock versions1.1
and below would reject that. Now, that has been patched. - Fix two more type casting bugs. Both are STUPID ones.
- Fix a bug regarding clients not disconnecting, but raising a
NoMessageException
.
OTHER
- We welcome @sheepy0125 with his first code-based contribution to hisock!
That's it for this release of hisock, and I'll see you next time! Bye!
Minor Version 1.1
The first minor version of since Hisock 1.0! Over the course of 48
days, we (I) have pushed 47
commits to hisock, changing 26
files. We (I) have added 992
lines and deleted 647
lines! Originally, this was supposed to be a micro release of 1.0.1
. But, with the additions of some new functions and methods, I've decided to bump this release to a minor version. Without further ado, here are the changelogs of v1.1:
NEW
- A message cache for
HiSockClient
! The message cache allows you to view the last x messages sent by the client. Configuration of the message cache is available on creation of the instance. .disconnect_client()
,.disconnect_all_clients()
, and.close()
methods forHiSockServer
, as well as theforce_disconnect
reserved function forHiSockClient
! It's now easier to force disconnect of a client from a server with these functions. Theforce_disconnect
reserved function will be triggered when the client has been disconnected from the server with these functions.- Add
list
anddict
type casts forHiSockClient
.
IMPROVED
- Documentation improvements, yay!
- Handle hisock errors better (not crashes!). New exceptions have been created for specific causes of server/client errors.
cleancode.py
can now clean up the code, with the help ofblack
! So, the code has been PEP8-ified, for our (my) avid PEP8 fans.- Move
HiSockClient
andHiSockServer
to be available on import of hisock. - Move
__version__
to be available on import of hisock. - Separate
requirements.txt
into that andrequirements_contrib.txt
. Some of the requirements are actually just requirements for the tests to run.
BUG FIXES
- (Maybe) fix bug for the
.close()
method ofHiSockClient
. - Fixed a fatal import error of hisock.
OTHER
- Hisock now has a new logo, created by @sheepy0125!
- Hisock also has a discord server! However, we're (I'm) still setting it up, so the invite isn't public yet.
That's it for this release of 1.1
, and I'll see you next time! Bye!
Major Version 1.0
Because I don't feel "safe" starting the hisock
version counting from 0, I decided to bump it to 1.0.
For the full version of changelogs, click here.
So, the first major release of hisock! Over the course of 22
days, we have changed 36
files, added 1809
lines of code, and deleted 223
lines of code! That's pretty impressive if you ask me.
Now, to the actual changelog. Version 1.0
contains:
NEW:
- New examples have been added to hisock! Now, you can play a Tic-Tac-Toe game made in hisock
! There is also the addition of the example shown in the README
- HiSockClient
, HiSockServer
, and their threaded counterparts now support some dunder methods!
- More type casts have been added
- Ability to change name and group after client initialization has been added (change_name()
and change_group()
)
- A built-in way to obtain server and client configuration through inputs has been added (input_server_config()
and input_client_config()
)
IMPROVED:
- Of course, we have some documentation improvements!
- Pictures are starting to appear in the documentation
- I added a beginner's tutorial to get started on hisock
- I am currently working on another intermediate hisock tutorial, which covers the more advanced topics
- A new changelog page has been added
- Python docstrings have been improved
- Hisock error handling has been improved again
- Added classifiers in PyPI
BUG FIXES:
- The regular expression used in 0.1
and earlier has been replaced with a newer one, in order to respond against certain edge cases
- Bumped cryptography
module from 3.4.8 to 35.0.0 (security patches)
That's it for version 1.0, and I'll see you next time! Bye!
Minor Version 0.1
A minor version release for hisock. This version includes:
- Better documentation, hosted on ReadTheDocs!
- PyPI installation of hisock, with python -m pip install hisock
or pip3 install hisock
- New support for threaded HiSockServer
and HiSockClient
- Better traceback handling
That's it for this release!
Grand Release Version 0.0.1
The first version of hisock! Contains all the basics of what hisock can do, including;
- Name/Group feature to identify specific clients
- Decorators to handle message receiving
- Under-the-hood code that handles headers
- Type-casting receiving function arguments