Skip to content

Feature/upgrade pymodbus#50

Merged
cybcon merged 8 commits intomainfrom
feature/upgrade_pymodbus
Feb 7, 2026
Merged

Feature/upgrade pymodbus#50
cybcon merged 8 commits intomainfrom
feature/upgrade_pymodbus

Conversation

@cybcon
Copy link
Owner

@cybcon cybcon commented Feb 7, 2026

Summary

This PR upgrades the Modbus Server project to PyModbus v3.11 and includes several maintenance updates and improvements.

Key Changes

Dependency Upgrades

  • PyModbus v3.11: Major version upgrade with updated API and imports
    • Changed from pymodbus.server.sync to pymodbus.server module imports
    • Updated datastore imports: removed deprecated ModbusSlaveContext, now using ModbusDeviceContext
    • Updated device module path: pymodbus.devicepymodbus.pdu.device
    • Adjusted function signatures and data block handling to match new API

Infrastructure Updates

  • Alpine base image: Updated from 3.23.2 to 3.23.3 (security & patch updates)
  • Version bump: 1.4.1 → 2.0.0 (reflects major PyModbus upgrade)
  • Copyright year: Updated to 2026

Feature Removals

  • Removed zeroMode configuration: The deprecated zeroMode option has been removed from both the configuration file and the codebase. This simplification aligns with PyModbus v3.11 standards and reduces unnecessary complexity.

Documentation & CI/CD Improvements

  • CI/CD workflow enhancement: Updated GitHub Actions test workflow to install dependencies from dedicated tests/requirements.txt file, improving setup clarity and maintainability
  • Improved configuration handling: Updated default config file path logic for better portability
  • Added Copilot Instructions: New .github/copilot-instructions.md with comprehensive project documentation including architecture, build commands, conventions, and configuration guidelines
  • Updated documentation: README and code comments reflect new version and removed features

Code Quality

  • Updated docstring format and type hints throughout modbus_server.py
  • Enhanced error handling documentation

Files Changed

  • .github/copilot-instructions.md (new)
  • .github/workflows/test.yaml
  • Dockerfile
  • LICENSE
  • README.md
  • src/app/modbus_server.json
  • src/app/modbus_server.py
  • src/requirements.txt
  • tests/requirements.txt

Testing

All changes are backward compatible with existing configurations (except for removal of zeroMode). The upgrade has been validated across Python 3.10, 3.11, and 3.12.

@cybcon cybcon added the major Breaking Changes label Feb 7, 2026
@cybcon cybcon merged commit 745ba68 into main Feb 7, 2026
27 checks passed
@cybcon cybcon deleted the feature/upgrade_pymodbus branch February 7, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

major Breaking Changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant