-
Notifications
You must be signed in to change notification settings - Fork 0
Implement asynchronous unpacking API #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 28 28
Lines 1843 2136 +293
==========================================
+ Hits 1843 2136 +293 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… and improve the testing utilities
Tests will be converted to the new testing APIs for |
…acket's async API
I'm being a little sloppier than I normally would be with commit hygiene and whatnot, but only because I expect this PR to be merged soon and want to focus on that |
…to align with Python 3.13 behavior
There are certain protocols which do not know how much data their packets take up before unpacking them, which poses a problem when attempting to parse such packets from an
asyncio.StreamReader
. Therefore after much deliberation, I have decided to implement an asynchronous API adjacent to the pre-existing synchronous one.It will be up to each
Type
to implement one API or the other or both, and I aim for pre-existing user code to be largely, if not totally, unaffected.All types in Pak will support both APIs, and testing will need to be adjusted accordingly. Towards that, the
pak.test
APIs will also be updated to ease that testing.I don't envision these changes to be so invasive towards the codebase, but it will result in largely duplicate codepaths for synchronous and asynchronous unpacking. Unfortunately, it seems to me the best option.