Sync-stream
Introduction
Sync-stream is a pure python tool for synchronizing the messages (including stdout
, stderr
, and raised exceptions or warnings) among threads, processes, devices, and hosts. This powerful tool is useful for capturing the updating logs from the sub-processes in some projects.
Updating reports
1.0.0 @ 1/22/2024
📣 New
- Provide full typehints for all modules.
- Make the optional packages
file
andhost
lazy-loaded. If their dependencies are missing, these modules will be marked as placeholder and their corresponding members will be replaced byNone
. - Provide context features to
LineBuffer
andLine*Mirror
. Entering such contexts will redirectstdout
andstderr
to the corresponding buffer/mirror. Note thatLine*Buffer
does not support this feature. - Make the version lazy-loaded when buliding the pacakge.
- Provide the docker scripts for fast-deployment of the testing environment.
🔧 Fix
- Fix: Previously, some typehints, for example, the out type of
LineProcBuffer.read()
, are not corrected. Now, these types got fixed. - Fix: Previously,
LineBuffer.write()
may returnNone
in some cases. Now, such methods will always returnint
. - Fix:
LineBuffer
andLine*Mirror
may not fit the type ofcontextlib.redirect_stdout/stderr
. Now, we providesyncstream.redirect_stdout/stderr
to solve this issue. - Fix: PyTest will raises errors if optional dependencies are absent. Now, this issue has been fixed. If any optional dependencies are missing, the corresponding tests will be skipped.
- Fix: Move
version
as a pacakge because the module version is not compatible with Linux.
💾 Change
- Change the coding style to the Microsoft standards.
- Make the whole package blackified.
- Split the standard requirements, locked requirements, and developer's requirements.
- Drop the dependency
flask-restful
for the optionalhost
module. Since the service provider falls back toflask
, there will be no error handler. - Refactor
conftest.py
andsetup
scripts to the modern style. - Refactor the GitHub templates for fixing some typos.
- Update the GitHub Actions scripts to the newest versions.
Full Changelog: 0.3.3...1.0.0