Skip to content

Sync-stream

Compare
Choose a tag to compare
@cainmagi cainmagi released this 23 Jan 07:18
· 10 commits to main since this release
3b3af66

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

  1. Provide full typehints for all modules.
  2. Make the optional packages file and host lazy-loaded. If their dependencies are missing, these modules will be marked as placeholder and their corresponding members will be replaced by None.
  3. Provide context features to LineBuffer and Line*Mirror. Entering such contexts will redirect stdout and stderr to the corresponding buffer/mirror. Note that Line*Buffer does not support this feature.
  4. Make the version lazy-loaded when buliding the pacakge.
  5. Provide the docker scripts for fast-deployment of the testing environment.

🔧 Fix

  1. Fix: Previously, some typehints, for example, the out type of LineProcBuffer.read(), are not corrected. Now, these types got fixed.
  2. Fix: Previously, LineBuffer.write() may return None in some cases. Now, such methods will always return int.
  3. Fix: LineBuffer and Line*Mirror may not fit the type of contextlib.redirect_stdout/stderr. Now, we provide syncstream.redirect_stdout/stderr to solve this issue.
  4. 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.
  5. Fix: Move version as a pacakge because the module version is not compatible with Linux.

💾 Change

  1. Change the coding style to the Microsoft standards.
  2. Make the whole package blackified.
  3. Split the standard requirements, locked requirements, and developer's requirements.
  4. Drop the dependency flask-restful for the optional host module. Since the service provider falls back to flask, there will be no error handler.
  5. Refactor conftest.py and setup scripts to the modern style.
  6. Refactor the GitHub templates for fixing some typos.
  7. Update the GitHub Actions scripts to the newest versions.

Full Changelog: 0.3.3...1.0.0