Skip to content

Version 0.8.2 - #84

Merged
rsgalloway merged 15 commits into
masterfrom
v0.8.2
Jan 12, 2026
Merged

rsgalloway merged 15 commits into
masterfrom
v0.8.2

Conversation

@rsgalloway

@rsgalloway rsgalloway commented Jan 8, 2026 •

Copy link
Copy Markdown
Owner

This pull request introduces several improvements for cross-platform compatibility, reliability, and test consistency in the distman project. The most significant changes are enhanced file copying logic to normalize line endings and handle symlinks robustly, adjustments to tests to use Path objects for platform-independent comparisons, and the addition of a GitHub Actions workflow for automated testing across multiple operating systems.

Cross-platform file handling and reliability:

  • Improved the copy_file function in lib/distman/util.py to normalize line endings to LF, handle UTF-8/binary files more robustly, and preserve symlinks and file modes, reducing issues when distributing files between Windows and Linux.
  • Updated docstrings and logic in copy_directory and copy_object to clarify parameter usage and improve reliability. [1] [2]

Testing and platform consistency:

  • Modified tests in tests/test_dist.py and tests/test_util.py to use Path objects for file path comparisons, ensuring correctness across different operating systems. Also improved symlink tests to resolve targets properly on Windows. [1] [2] [3] [4] [5] [6] [7]
  • Added a GitHub Actions workflow (.github/workflows/tests.yml) to run tests automatically on Ubuntu, macOS, and Windows, increasing CI coverage and reliability.

Other improvements:

  • Bumped the project version from 0.8.1 to 0.8.2 in setup.py and lib/distman/__init__.py to reflect these changes. [1] [2]
  • Changed logging in lib/distman/logger.py to use log.debug instead of log.error when failing to create a log file, reducing unnecessary error noise.
  • Fixed the TypeError in the print_staleness function when dst epoch does not exist (TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType' #82 ),
  • Removed the unused formatting pipeline from dist.json for simplicity.
  • Improved error handling in print_staleness to check for missing destination epoch files.

@rsgalloway rsgalloway linked an issue Jan 8, 2026 that may be closed by this pull request
@rsgalloway rsgalloway self-assigned this Jan 8, 2026
@rsgalloway rsgalloway added bug Something isn't working enhancement New feature or request labels Jan 8, 2026
@rsgalloway rsgalloway added this to the Version 0.8.2 milestone Jan 8, 2026
@rsgalloway
rsgalloway marked this pull request as ready for review January 8, 2026 04:44
@rsgalloway
rsgalloway requested a review from Copilot January 8, 2026 04:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances cross-platform compatibility and test reliability by improving file handling, normalizing line endings, and adding comprehensive CI/CD testing across Ubuntu, macOS, and Windows.

Key Changes:

  • Refactored file copying logic to normalize line endings to LF and handle binary files more robustly
  • Added GitHub Actions workflow for automated cross-platform testing
  • Fixed null pointer handling in cache staleness checking

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
setup.py Bumped version from 0.8.1 to 0.8.2
lib/distman/init.py Updated version number to 0.8.2
lib/distman/util.py Refactored copy_file function to normalize line endings, handle UTF-8/binary files, and improve symlink preservation
lib/distman/logger.py Changed log level from error to debug when log file creation fails
lib/distman/cache.py Added null check for dst_epoch to prevent TypeError
dist.json Removed unused formatting pipeline configuration
tests/test_util.py Added Path-based comparisons for cross-platform compatibility and improved symlink tests with Windows extended path prefix handling
tests/test_dist.py Updated tests to use Path comparisons and fixed temp file handling to properly close files before use
.github/workflows/tests.yml Added CI/CD workflow for testing on Ubuntu, macOS, and Windows

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/distman/util.py
Comment thread lib/distman/util.py
Comment thread tests/test_util.py
Comment thread lib/distman/util.py
@rsgalloway rsgalloway linked an issue Jan 9, 2026 that may be closed by this pull request
@rsgalloway
rsgalloway merged commit c9ad668 into master Jan 12, 2026
6 checks passed
@rsgalloway
rsgalloway deleted the v0.8.2 branch January 12, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

2 participants