|
| 1 | +# Changelog — python-mip 1.17 |
| 2 | + |
| 3 | +> Changes since **1.15.0** (1.16 was an unreleased RC) |
| 4 | +
|
| 5 | +--- |
| 6 | + |
| 7 | +## New Features |
| 8 | + |
| 9 | +### HiGHS Solver Support |
| 10 | +python-mip now ships with full support for the [HiGHS](https://highs.dev) open-source solver as a |
| 11 | +first-class backend (alongside CBC and Gurobi). HiGHS is a high-performance solver for LP and MIP |
| 12 | +problems with a permissive MIT licence. |
| 13 | + |
| 14 | +Key capabilities added: |
| 15 | +- Full LP and MIP solve via HiGHS C API (through `highsbox`) |
| 16 | +- Warm-start (basis handoff) for LP re-solves |
| 17 | +- `relax=True` support in `optimize()` |
| 18 | +- Variable and constraint inspection/modification |
| 19 | +- Correct handling of `UNBOUNDED` vs `INFEASIBLE` status |
| 20 | +- Reduced memory footprint and improved file read/write consistency |
| 21 | + |
| 22 | +HiGHS is installed as an optional dependency: `pip install mip[highs]`. |
| 23 | + |
| 24 | +### macOS Apple Silicon (M1/M2/M3) Native Support |
| 25 | +CBC now runs natively on Apple Silicon via a pre-built ARM64 binary, replacing the previous |
| 26 | +Rosetta 2 x86_64 fallback. |
| 27 | + |
| 28 | +--- |
| 29 | + |
| 30 | +## Infrastructure & Distribution |
| 31 | + |
| 32 | +### CBC Binaries via `cbcbox` |
| 33 | +The bundled CBC shared libraries (`.so`, `.dylib`, `.dll`) have been **removed from the |
| 34 | +python-mip source tree**. CBC binaries are now distributed through the |
| 35 | +[cbcbox](https://pypi.org/project/cbcbox/) PyPI package, which provides pre-built wheels for: |
| 36 | + |
| 37 | +- Linux x86\_64 and aarch64 (ARM64) |
| 38 | +- macOS x86\_64 and arm64 |
| 39 | +- Windows x64 |
| 40 | + |
| 41 | +`cbcbox` is a dedicated package whose sole job is to ship up-to-date CBC binaries for all |
| 42 | +major platforms. This decoupling means future CBC upgrades are released without touching |
| 43 | +python-mip itself. The minimum required version is `cbcbox>=2.902`. |
| 44 | + |
| 45 | +### Automated PyPI Publishing |
| 46 | +A new GitHub Actions workflow (`.github/workflows/publish.yml`) automatically publishes to |
| 47 | +PyPI whenever a `v*` tag is pushed. It uses OIDC Trusted Publisher authentication — no API |
| 48 | +tokens to rotate. |
| 49 | + |
| 50 | +### Modernised CI Matrix |
| 51 | +| Platform | OS | |
| 52 | +|---|---| |
| 53 | +| Linux x86\_64 | ubuntu-24.04 | |
| 54 | +| Linux aarch64 | ubuntu-24.04-arm *(new)* | |
| 55 | +| macOS ARM64 | macos-15 *(new)* | |
| 56 | +| Windows x64 | windows-2025 *(new)* | |
| 57 | + |
| 58 | +Python versions tested: **3.10, 3.11, 3.12, 3.13, PyPy 3.11**. |
| 59 | + |
| 60 | +--- |
| 61 | + |
| 62 | +## Bug Fixes |
| 63 | + |
| 64 | +- **CBC re-solve correctness**: A bug introduced by newer CBC versions caused stale solution |
| 65 | + data to be returned when `optimize()` was called multiple times on the same model. Fixed by |
| 66 | + calling `Cbc_reset()` before each `Cbc_solve()`, with objective sense saved and restored |
| 67 | + around the reset. |
| 68 | +- **`isfile` import missing in `SolverCbc.read()`**: `os.path.isfile` was used but not |
| 69 | + imported, causing a `NameError` when loading a model from a file. |
| 70 | +- **Windows DLL loading**: On Python 3.8+, Windows ignores `PATH` when resolving DLL |
| 71 | + dependencies. Fixed by calling `os.add_dll_directory()` on the cbcbox `bin/` directory. |
| 72 | +- **Empty `LinExpr` in constraints**: Constraints containing an empty linear expression were |
| 73 | + not handled correctly. Fixed by Sebastian Heger (#237). |
| 74 | + |
| 75 | +--- |
| 76 | + |
| 77 | +## Breaking Changes / Compatibility |
| 78 | + |
| 79 | +- **Minimum Python version raised to 3.10.** Python 3.8 and 3.9 have reached end-of-life and |
| 80 | + are no longer tested or supported. |
| 81 | +- Bundled CBC libraries removed — `cbcbox` is now a required dependency (installed |
| 82 | + automatically via pip). |
| 83 | +- `gurobipy` version constraint relaxed to `>=10` (no upper bound). |
| 84 | +- `cffi` version constraint relaxed to `>=1.15` (no upper bound). |
| 85 | +- `highsbox` version constraint relaxed to `>=1.10.0` (no upper bound). |
| 86 | + |
| 87 | +--- |
| 88 | + |
| 89 | +## Acknowledgements |
| 90 | + |
| 91 | +This release was a team effort. Thank you to everyone who contributed: |
| 92 | + |
| 93 | +- **Robert Schwarz** — HiGHS interface: initial implementation (PR #332) and extensive |
| 94 | + improvements (PR #418), including objective setter fix, option types, test coverage and |
| 95 | + `highsbox` migration. Co-authored with **Bernard Zweers** and **Miguel Hisojo**. |
| 96 | +- **Túlio Toffolo** — macOS Apple Silicon support, HiGHS testing infrastructure, CI |
| 97 | + modernisation, and many quality-of-life fixes. |
| 98 | +- **Sebastian Heger** — Bug fix for constraints with empty linear expressions (#237). |
| 99 | +- **Dominik Peters** — Removed upper limit on supported Python versions (#408). |
| 100 | +- **Adeel Khan** — HiGHS `_core` library support. |
| 101 | +- **Haroldo Santos** — cbcbox integration, CBC bug fixes, CI/CD automation, and release management. |
0 commit comments